Quiz
Week 3 and 4
This quiz has a time limit, so it opens in the usual player.
Questions in this quiz (21)
1Consider the following relation:
STUDENT(studentID, studentName, dateOfBirth, address, emailAddress, phoneNumber)
Which of the following attributes is not a multi-valued attribute?- AphoneNumber
- BdateOfBirth
- CemailAddress
- Daddress
2Row is synonymous with the term:
- ARelation
- BColumn
- CRecord
- DAttribute
3The aim of using constraints like Foreign Key and Unique in a table is to
- Aconnect the table with other tables
- Bdefine domains for the table
- Cshow the quality of database design
- Dmaintain integrity of data values
4Depending on the design of a relation, changing the data can have undesirable effects and create:
- AAnomalies
- BReferential integrity constraints
- CSecurity
- DWorkplace enemies
5True or False: Association classes allow us to identify and illustrate a many-to-many relationship between two classes.
- ATrue
- BFalse
6UML Class Diagrams, in industry, generally will not show:
- ARelations
- BDomains
- CClasses
- DAttributes
7A domain
- Ais an extension
- Bcontains all possible values for an attribute
- Cis an intention
- Dis a synonym of attribute
8Consider the following relation:
STUDENT(studentID, studentName, dateOfBirth, address, emailAddress, programName, CGPA)
Which of the following attributes is a simple attribute?- ACGPA
- BstudentName
- CNone of these attributes
- Daddress
9Consider the business rules:
* A person is either a student or a staff, but not both
* Every person must be either a student or a staff
Which of the following designs is the best translation into logical design?
Select one:
- APerson(ID, name, address)
PK = (ID)
Student(program)
Staff(designation) - BStudent(ID, name, address, program)
PK = (ID)
Staff(ID, name, address, designation)
PK = (ID) - CPerson(ID, name, address)
PK = (ID)
Student(ID, name, address, program)
PK = (ID)
FK = (ID) ~> Person(ID)
Staff(ID, name, address, designation)
PK = (ID)
FK = (ID) ~> Person(ID) - DPerson(ID, name, address, program, designation)
PK = (ID)
- APerson(ID, name, address)
10Which of the following designs is the most appropriate translation?

- AStaff(staffID, staffName, staffEmail, staffJoinDate, staffSalary)
PK = (staffID)
AK = (staffEmailID) - BStaff(staffID, staffName, staffEmail, staffJoinDate, staffSalary)
PK = (staffID) - CStaff(staffID, staffName, staffEmail, staffJoinDate, staffSalary)
PK = (staffID, staffEmailID) - DStaff(staffID, staffName, staffEmail, staffJoinDate, staffSalary, yearsWithCompany)
PK = (staffID)
AK = (staffEmailID)
- AStaff(staffID, staffName, staffEmail, staffJoinDate, staffSalary)
11Consider the following relation:
STUDENT(studentID, studentName, dateOfBirth, address, emailAddress, programName, CGPA)
Which of the following attributes is a composite attribute?- ACGPA
- Baddress
- CstudentID
- DprogramName
12Consider the business rules:
* A person may be either a student or a staff, but not both
* There may be person who are neither a student nor a staff
Which of the following designs is the best translation into logical design?
- AStudent(ID, name, address, program)
PK = (ID)
Staff(ID, name, address, designation)
PK = (ID) - BPerson(ID, name, address)
PK = (ID)
Student(ID, name, address, program)
PK = (ID)
FK = (ID) ~> Person(ID)
Staff(ID, name, address, designation)
PK = (ID)
FK = (ID) ~> Person(ID) - CPerson(ID, name, address)
PK = (ID)
Student(program)
Staff(designation) - DPerson(ID, name, address, studentFlag, program, staffFlag, designation)
PK = (ID)
- AStudent(ID, name, address, program)
13Which of the following designs is the most appropriate translation?

- AStaff(staffID, staffName)
PK = (staffID)
Manages(ManagerID, employeeID)
PK = (ManagerID, employeeID)
FK1 = (ManagerID) ~> Staff(staffID)
FK2 = (employeeID) ~> Staff(staffID) - BStaff(staffID, staffName, managerFlag, employeeFlag)
PK = (staffID) - CManager(staffID, staffName)
PK = (staffID)
Employee(staffID, staffName, managerID)
PK = (staffID)
FK = (managerID) ~> Manager(staffID) - DManager(staffID, staffName)
PK = (staffID)
Employee(staffID, staffName)
PK = (staffID)
- AStaff(staffID, staffName)
14STUDENT(studentID, studentName, dateOfBirth, address, emailAddress, programName, CGPA)
Select the single-valued attributes.
Select one:- AprogramName
- BdateOfBirth, studentID
- CCGPA, studentID
- DdateOfBirth, CGPA
- Eaddress
15Here Room is a weak entity class, as it has no real unique attribute. However, given a hotelABN, roomNo can identify a room among the records in Room.
Which of following designs is the best translation for this conceptual model?
- AHotel(hotelABN, hotelName, hotelAddress)
PK = (hotelABN)
Room(roomNo, roomtype, roomRent, hotelNo)
FK = (hotelNo) ~> Hotel(hotelABN) - BHotel(hotelABN, hotelName, hotelAddress)
PK = (hotelABN)
Room(roomNo, roomtype, roomRent, hotelNo)
PK = (roomNo, hotelNo)
FK = (hotelNo) ~> Hotel(hotelABN) - CHotel(hotelABN, hotelName, hotelAddress)
PK = (hotelABN)
Room(roomNo, roomtype, roomRent, hotelNo)
PK = (roomNo)
FK = (hotelNo) ~> Hotel(hotelABN) - DHotel(hotelABN, hotelName, hotelAddress)
PK = (hotelABN)
Room(roomNo, roomtype, roomRent)
PK = (roomNo)
- AHotel(hotelABN, hotelName, hotelAddress)
16Which of the followings is not a fundamental operation in relational algebra?
- ASelection
- BProjection
- CJoin
- DCartesian Product
17Consider the following relation:
STUDENT(studentID, studentName, dateOfBirth, address, emailAddress, programName, CGPA)
Write a query in relational calculus to find the names and addresses of the students maintaining a CGPA of at least 6.50.
Select the query from the given options.- A{S.studentName, S.address | STUDENT(S) ∧ S.CGPA >= 6.5}
- B{S.studentName, S.address | STUDENT(S) ∧ S.CGPA > 6.5}
- C{S.studentName, S.address | STUDENT(S) ∧ S.CGPA <= 6.5}
- D{S | STUDENT(S) ∧ S.CGPA >= 6.5}
18For some binary operations, it is required that the two input relations must be union-compatible. In other words, if the schemas of the two input relations have the same number of attributes with each pair of corresponding attributes having the same domain.
Which of the follow operations does not require its input relations to be union-compatible?- ACartesian Product
- BSet difference
- CUnion
- DIntersection
19Which of the following statements is not true about joins?
- ANatural join is a type of Theta join.
- BSemijoin produces less number of tuples that need to be handled to form the join.
- CThe right outer join keeps every tuple in the left-hand relation in the result.
- DFull outer join that keeps all tuples in both relations, padding tuples with nulls when no matching tuples are found.
20The following schema forms part of a database held in a relational DBMS:
FILMS (FilmCode, Title, DirectorID, Year, ProductionCost)
ARTISTS (ArtistID, Surname, FirstName, Sex, BirthDate, Nationality)
ROLLS (FilmCode, ActorID, Character)
Note 1: Director is an artist who directed the film, hence DirectorID in FILMS is the FK referencing ArtistID in Artists.
Note 2: Actor is an artist who acted in the film, hence ActorID in ROLES is the FK referencing ArtistID in Artists.
Consider the business rules:
* This database holds the films directed by a single director.
* An actor can act in various roles in the same film.
* A character can be played by different actors in the same movie.
If FilmCode is the PK of FILMS and ArtistID is the PK of ARTISTS, what will be the PK of ROLES?
Select one:- ANo PK
- B{FilmCode, ActorID, Character}
- C{FilmCode, ActorID}
- D{Character}
21Consider the following relation:
STUDENT(studentID, studentFirstName, studentLastName, studentDOB, studentAddress, studentEmail, studentPhoneNumber)
Note 1: studentDOB refers to the date of birth of a student
Note 2: studentFirstName and studentLastName provides the name of a student.
If the business rules states that:
* Each student is assigned with unique 10 digits student identification number.
* There may be students with the same name.
* There may be students with same address.
* There may be students with same date of birth.
* Student's name and address together uniquely identifies a student in the system.
* Student's name and date of birth together does not uniquely identify a student in the system.
* Each student is given an unique email address, where the email id is generated from the student's last name, first name and an auto number.
If the system admin chooses {studentEmail} to uniquely identifies student records in the table during table designing, which of the following statement is NOT true?
Select one:- AstudentEmail is a surrogate key.
- BstudentID is the Foreign Key (FK).
- C{studentFirstName, studentLastName, studentAddress} is one of the Alternative Keys (AKs).
- DstudentEmail is the Primary Key (PK).
Information
- Description
- Quiz on Week 3 and 4, created by Dani Nunns on 27/10/2020.
- Author
- Dani Nunns
- Language
- English
- Views
- 2
- Rating
- No ratings yet Rate this quiz