SER 322 Midterm Exam | Questions and Answers (Complete Solutions) What is a Composite attribute? A. An attribute that represents a value that is derivable from a related attribute or set of attributes, not necessarily
...
SER 322 Midterm Exam | Questions and Answers (Complete Solutions) What is a Composite attribute? A. An attribute that represents a value that is derivable from a related attribute or set of attributes, not necessarily in the same entity B. An attribute that holds multiple values for a single component C. An attribute composed of multiple components each with individual existence D. An attribute that holds a single value for a single entity E. An attribute composed of a single component with an independent existence A condition that an entity can be a member of at most one of the subclasses of the specialization is called ______________. A. completeness constraint B. overlapping constraint C. disjointness constraint D. predicate constraint A condition that an entity can be a member of more than one of the subclasses of the specialization is called ______________. A. completeness constraint B. overlapping constraint C. disjointness constraint D. predicate constraint A condition that every entity in the superclass must be a member of some subclass in the specialization/ generalization is called ______________. A. completeness constraint B. overlapping constraint C. disjointness constraint D. predicate constraint An entity is ____________. A. an inanimate object in an application B. a collection of items in a mini-world C. a distinct object or thing in a mini-world D. data structure An entity that does not have sufficient attributes to form a primary key is termed a __________. A. Variant B. Strong entity C. Weak entity D. Variable In an E-R diagram entities are represented by _______________. A. diamond shaped box B. circles C. ellipse D. rectangles In an E-R diagram Attributes are represented by _______________. A. diamond shaped box B. circles C. ellipse D. rectangles In an E-R diagram Attributes are represented by _______________. A. diamond shaped box B. circles C. ellipse D. rectangles In an E-R diagram Relationship Set are represented by _______________. A. diamond shaped box B. circles C. ellipse D. rectangles A double rectangle represents a: Weak Set Relationship types of degree 3 are called _______________. A. ternary B. binary C. n-ary Suppose: VEHICLE is a superclass{CAR, TRUCK} are subclasses of VEHICLEVEHICLE is a _____________________of {CAR, TRUCK}. A. union-type B. specialization C. generalization D. category What is Specialization? A. the process of defining a set of subclasses of a superclass B. the process of defining a set of superclasses of a subclass C. the process of identifying and defining classes What is a Derived attribute? A. An attribute composed of multiple components each with individual existence B. An attribute that holds multiple values for a single component C. An attribute that holds a single value for a single entity D. An attribute composed of a single component with an independent existence E. An attribute that represents a value that is derivable from a related attribute or set of attributes, not necessarily in the same entity What is a Single-valued attribute? A. An attribute that represents a value that is derivable from a related attribute or set of attributes, not necessarily in the same entity B. An attribute that holds multiple values for a single component C. An attribute that holds a single value for a single entity D. An attribute composed of multiple components each with individual existence E. An attribute composed of a single component with an independent existence What is a Multi-valued attribute? A. An attribute that represents a value that is derivable from a related attribute or set of attributes, not necessarily in the same entity B. An attribute that holds multiple values for a single component C. An attribute that holds a single value for a single entity D. An attribute composed of multiple components each with individual existence E. An attribute composed of a single component with an independent existence What is a Simple attribute? A. An attribute that represents a value that is derivable from a related attribute or set of attributes, not necessarily in the same entity B. An attribute that holds multiple values for a single component C. An attribute that holds a single value for a single entity D. An attribute composed of multiple components each with individual existence E. An attribute composed of a single component with an independent existence What type of relationship is described by the following rule? For one instance of entity A, there exists zero, one, or many instances of entity B; and for one instance of entity B, there exists zero, one, or many instances of entity A. Select the best answer. A. 1:1 relationship B. 1:N relationship C. M:N relationship What type of relationship is described by this rule? For one instance of entity A, there exists zero, one, or many instances of entity B; but for one instance of entity B, there exists zero or one instance of entity A. Select the best answer. A. 1:1 relationship B. 1:N relationship C. M:N relationship _____ is a attribute (or a set of attributes) in a database relation that has a unique value. A. Foreign Key B. Super Key C. Secondary Key D. Alternate Key _____ constraint dictates that the foreign key must contain values that match the primary key in the related table, or must contain null. A. Domain B. Key C. Referential Integrity D. Entity Integrity Consider the following relations for a database that keeps track of business trips of salespersons in a sales office: SALESPERSON (SSN, Name, Start_Year, Dept_No) TRIP (TripID, SSN, From_City, To_City, Departure_Date, Return_Date) EXPENSE (TripID, Account#, Amount) Identify the foreign keys for this schema. A. TripID in EXPENSE relation references TRIP relation; SSN in TRIP relation references SALESPERSON relation B. TripID in EXPENSE relation references TRIP relation C. SSN in SALESPERSON relation D. Account# in EXPENSE relation Consider the following relations for a database that keeps track of business trips of salespersons in a sales office: SALESPERSON (SSN, Name, Start_Year, Dept_No) TRIP (TripID, SSN, From_City, To_City, Departure_Date, Return_Date) EXPENSE (TripID, Account#, Amount) Which one of the following is a valid super key for TRIP relation? A. SSN, To_City B. SSN C. From_city, Departure_Date D. TripID, SSN, Return_Date In relational model terminology, table is considered as A. query B. domain C. relation D. tuple Suppose R(A, B) has the following tuples: A B 3 3 6 5 2 3 and relation S(B, C) has the following tuples: B C 1 6 5 8 3 5 Compute the natural join of R and S. Which of the following tuples is in the resulting relation with schema (A, B, C). A. (3 3 5) B. (6 5 6) C. (3 3 1) D. (2 3 3) Suppose relation R(A,B) has the following tuples:A B2 a4 t2 g4 c9 tand relation S(B,C,D) has the following tuples:B C Dc 5 6a 7 8t 8 3 Compute the theta-join of R and S with the condition R.B = S.B AND R.A < S.C Which of the following tuples is in the result? Assume each tuple has schema (A, R.B, S.B, C, D). A. (9, t, t, 8, 3) B. (2, g, t, 8, 3) C. (4, t, t, 8, 3) D. (2, g, g, 7, 8) Suppose relation R(A,B,C) has the following tuples: ABC123427456253126 Compute the projection π C,B (R). Which of the following tuples is in the result? A. (2,5) B. (2,6) C. (7,2) D. (6,4) The division operation is applied to two relations: R(Z) divided by S(X) where __________. A. X is a subset of Z B. Z is a subset of X C. Z and X are union/type compatible D. Z = X What is the purpose of select operation in Relational Algebra? A. Selects all tuples that satisfy the selection condition from a relation R. B. Produce a new relation with only some of the attributes of relation R, and removes duplicate tuples. C. Produces all combinations of tuples from relations R1 and R2 that satisfy the join condition D. Produces a relation that includes all tuples from relation R. Which of the following operation(s) require that relations on which they are applied be union-compatible? A. UNION B. INTERSECTION C. DIFFERENCE D. NATURAL JOIN E. ALL OF THE ABOVE The following keyword selects records that have matching values in both tables. A. LEFT JOIN B. INNER JOIN C. RIGHT JOIN D. SELF JOIN With SQL, how can you delete the records from "Students" table where the "LastName" is Williams . A. DELETE ROW Students WHERE LastName ='Williams'; B. DELETE FROM Students WHERE LastName ='Williams'; C. DELETE Students WHERE LastName ='Williams'; D. DELETE TABLE Students WHERE LastName = 'Williams'; With SQL, how do you select all the records from a table named "Students" where the "FirstName" is Jack and "Marks" are greater than 65? A. SELECT * FROM Students WHERE 'FirstName'='Jack' AND 'Marks'>65; B. SELECT * FROM Students WHERE 'FirstName'='Jack', 'Marks'>65; C. SELECT * FROM Students WHERE FirstName='Jack' AND Marks>65; Which SQL keyword is used to group rows with same values . A. JOIN B. ORDER BY C. COMBINE D. GROUP BY How do you change the marks of all students in Students table with marks 65 to 70 with SQL. A. UPDATE Students SET Marks=65 WHERE Marks = 70;
[Show More]