Ch 17: Functional Dependencies

12 Questions12 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 12 Questions
Page 1 of 2
Q1
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.3. Select (sigma) and Project (pi) OperatorsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In relational algebra, which of the following operators is used to select specific columns (attributes) vertically from a single table while discarding all others?
๐Ÿ’ป text Snippet
โˆ stId, stName (STUDENT)
  1. A.Project operator
  2. B.Cartesian operator
  3. C.Select operator
  4. D.Conjugate operator
Q2
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.5. Cartesian Product OperatorMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
If relation M has C tuples (rows) and relation N has D tuples (rows), how many total tuples will their resulting Cartesian product (M x N) contain?
๐Ÿ’ป text Snippet
COURSE X STUDENT
  1. A.C + D
  2. B.C * D
  3. C.C ^ D
  4. D.C - D
Q3
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.3. Select (sigma) and Project (pi) OperatorsMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In relational algebra, which of the following pairs represent unary operations, meaning they operate strictly on a single input relation?
๐Ÿ’ป text Snippet
-- Relational Algebra Unary Operations:
-- ฯƒ Curr_Sem > 3 (STUDENT)
-- โˆ FacId, Salary (FACULTY)
  1. A.SELECT and CARTESIAN
  2. B.UNION and PROJECT
  3. C.SELECT and PROJECT
  4. D.PROJECT and CARTESIAN
Q4
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.4. Union, Intersection and Difference OperatorsMedium๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider two union-compatible database relations representing employee records from two different software house branches: 1. 'Lahore_Branch(EmpName, Designation, Age, Salary)' 2. 'Islamabad_Branch(EmpName, Designation, Age, Salary)' Which relational algebra operation should be applied to find only those employees who work in both branches with identical details, and what is its mathematical representation?
๐Ÿ’ป text Snippet
Lahore_Branch โˆฉ Islamabad_Branch
  1. A.Intersection Operation; represented as: Lahore_Branch โˆฉ Islamabad_Branch
  2. B.Union Operation; represented as: Lahore_Branch โˆช Islamabad_Branch
  3. C.Set-Difference Operation; represented as: Lahore_Branch - Islamabad_Branch
  4. D.Cartesian Product Operation; represented as: Lahore_Branch X Islamabad_Branch
Q5
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.4. Union, Intersection and Difference OperatorsHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider the relations Student(Fname, Lname, MajorCode) and Instructor(First_Name, Last_Name, DeptID) representing university members, where Fname and First_Name, and Lname and Last_Name share compatible character domains respectively. Which of the following statements is correct regarding their relational algebra union-compatibility?
๐Ÿ’ป sql Snippet
-- Relational Set Difference query (Students not Instructors):
SELECT Fname, Lname FROM Student
EXCEPT
SELECT First_Name, Last_Name FROM Instructor;
  1. A.The two relations are not union-compatible since their attribute names differ.
  2. B.The two relations are union-compatible since they have the same type of tuples (same degree and domain-compatible attribute positions).
  3. C.The set operations such as CARTESIAN PRODUCT and DIVISION can be applied on these two relations only if they are union-compatible.
  4. D.To find out the students who are not instructors, it is necessary to perform the operation Student รท Instructor.
Q6
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.4. Union, Intersection and Difference OperatorsHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider two database relations, Student(Fname, Lname, MajorCode) and Instructor(First_Name, Last_Name, DeptID), where Fname and First_Name, Lname and Last_Name share compatible character domains respectively. Which of the following statements is correct regarding their relational algebra set compatibility?
๐Ÿ’ป sql Snippet
-- Relational Set Difference query (Students not Instructors):
SELECT Fname, Lname FROM Student
EXCEPT
SELECT First_Name, Last_Name FROM Instructor;
  1. A.The two relations are not union-compatible because their attribute names are different.
  2. B.The two relations are union-compatible because they share the same degree (number of columns) and domain-compatible attributes (same type of tuples).
  3. C.Set operations like Cartesian Product and Division can only be applied on these relations if they are union-compatible.
  4. D.To find students who are not instructors, we must perform the relational algebra Division operation (Student รท Instructor).
Q7
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.5. Cartesian Product OperatorEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
In standard relational database management systems and SQL, what is the precise mathematical behavior and output of a CROSS JOIN (Cartesian Product) executed between two tables, Table_A (containing R rows and C columns) and Table_B (containing S rows and D columns)?
๐Ÿ’ป sql Snippet
SELECT * FROM Table_A CROSS JOIN Table_B;
  1. A.It returns a table containing R + S rows and C + D columns, where unmatched rows are represented as NULL values.
  2. B.It returns a table containing R * S rows and C + D columns, pairing every single row from Table_A with every possible row from Table_B.
  3. C.It returns a table containing only matching rows where Table_A's primary key is identical to Table_B's foreign key.
  4. D.It returns a table with R * S rows and C * D columns, containing only unique non-duplicate rows across both relations.
Q8
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.4. Union, Intersection and Difference OperatorsHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider two database relations: Student(Fname, Lname, MajorCode) and Instructor(First_Name, Last_Name, DeptID), where Fname/First_Name and Lname/Last_Name represent compatible character datatypes. Which of the following statements is correct with respect to the two relations?
๐Ÿ’ป sql Snippet
-- Relational Set Difference query (Students not Instructors):
SELECT Fname, Lname FROM Student
EXCEPT
SELECT First_Name, Last_Name FROM Instructor;
  1. A.The two relations are not union-compatible since their attribute names differ.
  2. B.The two relations are union-compatible since they have the same type of tuples (same degree and domain-compatible attributes).
  3. C.The set operations such as CARTESIAN PRODUCT and DIVISION can be applied on these two relations.
  4. D.To find out the students who are not instructors, it is necessary to perform the operation Student รท Instructor.
Q9
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.4. Union, Intersection and Difference OperatorsHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider two database relations representing members of a university department: Student(Fname, Lname, MajorCode) and Instructor(First_Name, Last_Name, DeptID), where Fname/First_Name and Lname/Last_Name represent compatible character datatypes. Which of the following statements is correct regarding the relational algebra union-compatibility of these two relations?
๐Ÿ’ป sql Snippet
-- Relational Set Difference query (Students not Instructors):
SELECT Fname, Lname FROM Student
EXCEPT
SELECT First_Name, Last_Name FROM Instructor;
  1. A.The two relations are not union-compatible since their attribute names differ.
  2. B.The two relations are union-compatible since they have the same type of tuples (same degree and domain-compatible attribute positions).
  3. C.The set operations such as CARTESIAN PRODUCT and DIVISION can be applied on these two relations only if they are union-compatible.
  4. D.To find out the students who are not instructors, it is necessary to perform the Operation Student รท Instructor.
Q10
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 17๐Ÿท๏ธ 17.4. Union, Intersection and Difference OperatorsHard๐Ÿ”โญ๐Ÿ’ก๐ŸŒŸ๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Consider two database relations representing members of a university department: Student(Fname, Lname, MajorCode) and Instructor(First_Name, Last_Name, DeptID), where Fname/First_Name and Lname/Last_Name represent compatible character datatypes. Which of the following statements is strictly correct regarding the relational algebra union-compatibility of these two relations?
๐Ÿ’ป sql Snippet
-- Relational Set Difference query (Students not Instructors):
SELECT Fname, Lname FROM Student
EXCEPT
SELECT First_Name, Last_Name FROM Instructor;
  1. A.The two relations are not union-compatible because their attribute names are different.
  2. B.The two relations are union-compatible because they share the same degree (number of attributes) and domain-compatible attribute positions (same type of tuples).
  3. C.Set operations like Cartesian Product and Division can only be applied if relations are union-compatible.
  4. D.To find out the students who are not instructors, it is necessary to perform the relational algebra Division operation (Student รท Instructor).