A relationship between two sets A and B is:
A subset of A - B
A subset of A Ç B
A subset of A È B
A subset of A x B
None of the above
A sound reason to why storing data in a database can be superior to storing it in files is:
A database provides much larger storage space than a file does
A database system provides concurrency control whereas a file system does not
A database can be accessed through the internet whereas a file system cannot
None of the above
The fact that in a database system changing the data types does not necessarily lead
to changing the data access methods, is referred to as:
Data consistency
Minimal data redundancy
Data security
Program-data independence
None of the above
A multivalued attribute of an entity class is:
An attribute with several components that need to be put together to determine the value of the attribute
An attribute whose value is not stored but rather computed from multiple existing attribute values
An attribute whose value is a collection of values
An attribute that uniquely determines all other attributes of the entity class
None of the above
A derived attribute is usually represented in the E-R diagram by:
Drawing it underlined inside an oval
Drawing it inside a rectangle
Drawing it inside a double oval
Drawing it inside a dashed oval
None of the above
A many-to-many relationship type R between two entity classes S and T is represented in relational model by:
Adding the key attribute of S to the schema of T
Adding the key attribute of T to the schema of S
Creating a new schema for the relationship type R
None of the above
In the above E-R diagram, the attribute Ename of the entity class Employee is:
A composite attribute
A multivalued attribute
A derived attribute
A key attribute
None of the above
Which of the following statements best describes the attribute Color in the above E-R diagram?
Automobiles cannot be of multiple colors and any given automobile cannot have multiple colors simultaneously
Automobiles cannot be of multiple colors but any given automobile can have multiple colors simultaneously
Automobiles can be of multiple colors and any given automobile can have multiple colors simultaneously
Automobiles can be of multiple colors but any given automobile cannot have multiple colors simultaneously
None of the above
Based on the above E-R diagram, which of the following statements is TRUE?
Every employee is assigned an automobile
Every automobile is assigned to an employee
Every employee has a reference
A reference may or may not belong to an employee
None of the above
Which of the following relations is part of your relational schema when mapping
the above E-R diagram to a relational schema?
Reference(Emp#, RName , Title, NumberOf)
Employee(Emp# , First, Last, VIN#, Date)
Automobile(VIN# , Emp#, Color, Date)
Color(VIN# , Color)
None of the above
Based on the above given E-R diagram, RName is a(n)
Candidate key
Partial key
Foreign key
Primary key
None of the above
Which of the following is the complete mapping of the above E-R diagram to a relational schema?
Reference(Emp#, RName , Title, NumberOf)
Employee(Emp# , EName, First, Last, VIN#, Date)
Automobile(VIN# , Emp#, Color, Date)
Color(VIN#, Color )
Reference(Emp#, RName , Title)
Employee(Emp# , EName, First, Last, VIN#, Date)
Automobile(VIN# , Emp#, Date)
Color(VIN#, Color )
Reference(Emp#, RName , Title)
Employee(Emp# , EName, First, Last, VIN#, Date)
Automobile(VIN# )
Color(VIN#, Color )
Reference(Emp#, RName , Title)
Employee(Emp# , EName, VIN#, First, Last)
Automobile(VIN#, Emp# , Date)
Color(VIN#, Color )
None of the above
Consider the following relational schema
Employee (SSN , Fname, Lname,Superssn, Dept_Num)
Department (Dept_Number , Dept_Name)
Dependent (Emp_SSN, Dependent_Name )
Project (Project_Number , Project_Name, Dept_Num)
Works_On (Emp_SSN, Proj_Num ).
Which of the following SQL statements retrieves all the employees with no dependents?
Select * from Employee, Dependent where Dependent_Name = NULL;
Select * from Employee, Dependent where (SSN=Emp_SSN) and (Dependent_Name = NULL)
Select * from Employee where not Exists(Select * from Dependent where SSN = Emp_SSN);
Select * from Employee where SSN IN (select Emp_SSN from Dependent where Emp_SSN = NULL);
None of the above
Based on the above relational schema, which SQL statement lists, for every project, the project number,
and the number of employees working on the project?
Select Pnumber, count(*) from Employee, Project where Employee.Dept_Num = Project.Dept_Num;
Select Proj_Num, count(*) from Works_On group by Proj_Num;
Select Proj_Num, count(*) from Works_On, Employee where SSN = Emp_SNN;
Select Proj_Num, count(*) from Employee, Project;
None of the above
Based on the above relational schema, which SQL statement lists the name of every
employee whose supervisor's first name is Pinocchio, or the first name of his
supervisor's supervisor is Pinocchio?
Select Fname, Lname from Employee where Fname='Pinocchio';
Select Fname, Lname from Employee E1, Employee E2 where (E1.SSN = E2.SSN) and (Fname = 'Pinocchio');
Select Fname, Lname from Employee E1, Employee E2, Employee E3 where ((E1.Superssn = E2.SSN) and (E2.Fname = 'Pinocchio')) or ((E1.Superssn = E2.SSN) and (E2.Superssn = E3.SSN) and (E3.Fname = 'Pinocchio'));
Select Fname, Lname from Employee E1, Employee E2 where ((E1.Superssn = E2.SSN) and (E2.Fname = 'Pinocchio'))
None of the above