Ch 27: SQL Integrity Constraints

16 Questions16 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS403 - Database Management Systems Examination Practice

Timed practice exam simulation for CS403 - Database Management Systems.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 1 โ€“ 10 of 16 Questions
Page 1 of 2
Q1
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.3. Data Manipulation Language (DML) OverviewEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Under standard relational database management guidelines, which classification of SQL commands is used to insert, retrieve, modify, or delete data instances inside tables?
๐Ÿ’ป sql Snippet
INSERT INTO Teacher(TeacherID, Name, Office, Phone, Salary, Email)
VALUES('T001','Dr. Najma Waheed','F001', 9125, 150000,'najma@uni.edu.pk');
  1. A.Data Definition Language (DDL)
  2. B.Data Query Language (DQL)
  3. C.Data Manipulation Language (DML)
  4. D.Data Control Language (DCL)
Q2
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.3. Data Manipulation Language (DML) OverviewEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following commands is classified as a Data Manipulation Language (DML) command under standard database management system guidelines?
๐Ÿ’ป sql Snippet
SELECT empName, salary 
FROM Employee 
WHERE department = 'Sales';
  1. A.SELECT
  2. B.CREATE
  3. C.ALTER
  4. D.DROP
Q3
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.3. Data Manipulation Language (DML) OverviewEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Under standard SQL query classifications, which of the following commands is NOT classified as a Data Manipulation Language (DML) command?
๐Ÿ’ป sql Snippet
CREATE TABLE Program (
    prName char(4)
);
  1. A.UPDATE
  2. B.SELECT
  3. C.INSERT
  4. D.CREATE
Q4
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.3. Data Manipulation Language (DML) OverviewEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following database query statements is classified as a Data Manipulation Language (DML) command?
๐Ÿ’ป sql Snippet
SELECT stId, stName FROM student;
  1. A.SELECT
  2. B.ALTER
  3. C.CREATE
  4. D.DROP
Q5
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.4. Insertion, Deletion and Update CommandsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following SQL commands correctly deletes an employee record with the employee_id '12345' from a table named 'PERSON'?
๐Ÿ’ป sql Snippet
DELETE FROM person WHERE employee_id = '12345';
  1. A.DELETE FROM person WHERE employee_id = '12345';
  2. B.DELETE WHERE person FROM employee_id = 12345;
  3. C.DROP FROM person WHERE employee_id = 12345;
  4. D.DELETE WHERE person WHERE employee_id = 12345;
Q6
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.1. Alter Table StatementMediumโญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Analyze the following SQL statement: ```sql ALTER TABLE exams RENAME COLUMN Q_description TO Question_Descp, Std_ID to Student_ID; ``` True or False: The syntax of this ALTER TABLE statement is NOT correct.
๐Ÿ’ป sql Snippet
ALTER TABLE exams RENAME COLUMN Q_description TO Question_Descp, Std_ID to Student_ID;
  1. A.True
  2. B.False
Q7
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.4. Insertion, Deletion and Update CommandsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In relational database management systems, Data Manipulation Language (DML) commands are primarily used for:
  1. A.Inserting, retrieving, and modifying data in databases
  2. B.Creating databases and schemas
  3. C.Destroying databases and schemas
  4. D.Creating and altering database objects
Q8
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.1. Alter Table StatementEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following table properties, structures, or entries will be completely deleted and removed from the database if you execute a 'TRUNCATE TABLE' command?
๐Ÿ’ป sql Snippet
TRUNCATE TABLE Student_Grades;
  1. A.All data rows stored within the table
  2. B.The physical indexes created on the table columns
  3. C.The table definition structure and its declared columns
  4. D.The table constraints and referential definitions
Q9
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.4. Insertion, Deletion and Update CommandsMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following statements is strictly true regarding the SQL 'DELETE' command?
๐Ÿ’ป sql Snippet
BEGIN TRANSACTION;
DELETE FROM Employee WHERE Age > 60;
ROLLBACK; -- RESTORES THE RECORD
  1. A.It is classified as a Data Definition Language (DDL) command.
  2. B.It automatically resets the auto-increment/identity value of the table to its initial seed.
  3. C.It cannot activate or execute database delete triggers.
  4. D.Its changes can be fully rolled back within an active transaction.
Q10
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 27๐Ÿท๏ธ 27.4. Insertion, Deletion and Update CommandsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following SQL commands correctly deletes a record of an employee with the employee_id '12345' from a table named 'PERSON'?
๐Ÿ’ป sql Snippet
DELETE FROM person WHERE employee_id = '12345';
  1. A.DELETE FROM person WHERE employee_id = '12345';
  2. B.DELETE WHERE person FROM employee_id = 12345;
  3. C.DROP FROM person WHERE employee_id = 12345;
  4. D.DELETE WHERE person WHERE employee_id = 12345;