ADVANCED DATABASE SYSTEMS EXAM

ADVANCED DATABASE SYSTEMS EXAM

University

33 Qs

quiz-placeholder

Similar activities

Cybersecurity I: Unit 1  - Foundations & Threats Exam Review

Cybersecurity I: Unit 1 - Foundations & Threats Exam Review

9th Grade - University

37 Qs

Вопросы по SQL

Вопросы по SQL

University

34 Qs

Python Básico

Python Básico

University

30 Qs

Phishing Awareness Quiz

Phishing Awareness Quiz

University

30 Qs

Asesmen Akhir Informatika Kelas VII Semester Ganjil

Asesmen Akhir Informatika Kelas VII Semester Ganjil

7th Grade - University

32 Qs

Kuis Algoritma dan Pemrograman

Kuis Algoritma dan Pemrograman

University

37 Qs

Kuis Basis Data

Kuis Basis Data

University

30 Qs

C-Volution (Easy 1)

C-Volution (Easy 1)

University

30 Qs

ADVANCED DATABASE SYSTEMS EXAM

ADVANCED DATABASE SYSTEMS EXAM

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

ARLENE QUICAY

Used 8+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

33 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which SQL command is used to update a student's email address in the Students table?

UPDATE Students SET Email = 'new@uni.edu' WHERE StudentID = 1;

SELECT Email FROM Students WHERE StudentID = 1;

ALTER Students SET Email = 'new@uni.edu' WHERE StudentID = 1;

INSERT INTO Students (Email) VALUES ('new@uni.edu');

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

You want to create a table for courses offered in the current semester. Which is correct?

CREATE TABLE Courses (CourseID INT, CourseName VARCHAR(100), Credits INT);

CREATE TABLE Courses (CourseID INT, CourseName VARCHAR(100), Credits INT(5,2));

CREATE TABLE Courses (CourseID, CourseName, Credits);

CREATE TABLE Courses (CourseID INT, CourseName TEXT(100), Credits INT);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To ensure each enrolled student is a valid student, which constraint is appropriate?

CHECK

PRIMARY KEY

FOREIGN KEY

NOT NULL

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

You want to count students per course and display those with more than 10. What query should you use?

SELECT CourseID, COUNT(StudentID) FROM Enrollments GROUP BY CourseID HAVING COUNT(StudentID) > 10;

SELECT COUNT(StudentID), CourseID FROM Enrollments GROUP HAVING COUNT > 10;

SELECT CourseID, COUNT(StudentID) FROM Enrollments WHERE COUNT(StudentID) > 10;

SELECT CourseID FROM Enrollments GROUP BY CourseID WHERE COUNT(StudentID) > 10;

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which function would format the EnrollmentDate as "April 05, 2023"?

FORMAT(EnrollmentDate, 'MMMM dd, yyyy')

FORMAT(EnrollmentDate, 'mmmm dd, yyyy')

FORMAT(EnrollmentDate, 'yyyy/MM/dd')

FORMAT(EnrollmentDate, ' MMMM dddd, yyyy')

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How do you find students enrolled in the last 30 days?

SELECT * FROM Students WHERE EnrollmentDate <= DATEADD(DAY, -30, GETDATE());

SELECT * FROM Students WHERE EnrollmentDate >= DATEADD(DAY, -30, GETDATE());

SELECT * FROM Students WHERE EnrollmentDate = GETDATE();

SELECT * FROM Students WHERE EnrollmentDate < GETDATE();

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

A database administrator needs to update the status of one specific student record. However, the UPDATE statement is written without a WHERE clause. What is the most likely outcome of executing this command?

No rows in the table will be affected

An error will occur because a condition is required

All records in the Students table will have their values updated

Only records with NULL values in the updated column will be changed

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?