0% found this document useful (0 votes)
404 views6 pages

Testbank 2

The document describes a relational model for an employee database with tables for employees, departments, projects, and works on assignments. It then asks which statement about the model is not correct. The summary is: 1) According to the model, an employee can work in a different department than the one they manage. 2) The model represents that employees must be supervised by exactly one other employee. 3) Not all statements about the model are correct.

Uploaded by

Jan jan1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
404 views6 pages

Testbank 2

The document describes a relational model for an employee database with tables for employees, departments, projects, and works on assignments. It then asks which statement about the model is not correct. The summary is: 1) According to the model, an employee can work in a different department than the one they manage. 2) The model represents that employees must be supervised by exactly one other employee. 3) Not all statements about the model are correct.

Uploaded by

Jan jan1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

MC Given the following (normalized) relational model (primary keys are

underlined, foreign keys are in italics).<br><br>EMPLOYEE(<u>SSN</u>, ENAME,


EADDRESS, SEX, DATE_OF_BIRTH, <em>SUPERVISOR</em>, <em>DNR</em>)<br>SUPERVISOR:
<em>foreign key, refers to</em> SSN in EMPLOYEE, <em> NULL value
allowed</em><br>DNR: <em>foreign key, refers to</em> DNR in DEPARTMENT, <em>NULL
value not allowed</em><br><br>DEPARTMENT(<u>DNR</u>, DNAME, DLOCATION,
<em>MGNR</em>)<br>MGNR: <em>foreign key, refers to </em>SSN in EMPLOYEE, <em>NULL
value not allowed</em><br><br>PROJECT(<u>PNR</u>, PNAME, PDURATION,
<em>DNR</em>)<br>DNR: <em>foreign key, refers to</em> DNR in DEPARTMENT, <em>NULL
value not allowed</em>)<br><br>WORKS_ON(<u><em>SSN, PNR,</em></u>, HOURS)<br>SSN:
<em>foreign key, refers to </em>SSN in EMPLOYEE, <em>NULL value not
allowed</em><br>PNR: <em>foreign key, refers to </em>PNR in PROJECT, <em>NULL value
not allowed</em><br><br>Which statement is NOT CORRECT? According to the model,
a supervisor cannot supervise more than one employee. incorrect According to the
model, an employee can manage multiple departments. incorrect According to the
model, an employee can work in multiple departments. correct According to the
model, an employee should always work on projects assigned to his/her department.
incorrect
MC Which statement is CORRECT? A foreign key of a relation A cannot refer to
the primary key of the same relation A. incorrect A relation cannot have more
than 1 foreign key. incorrect Every relation must have a foreign key.
incorrect A foreign key can be NULL. correct
MC Consider a data model for the Olympics storing information about countries
and athletes. There is a 1-N relationship type between country and athlete and an
athlete always has to belong to exactly 1 country. A relational data model
containing only 1 table leads to: Unnecessary replication of data about athletes.
incorrect Unnecessary replication of data about countries. correct
Unnecessary replication of data about athletes and countries. incorrect
No unnecessary replication of data. incorrect
MC The following relational model represents a HRM system of a consultancy firm.
The primary keys are underlined while foreign keys are in italic
font.<br><br>Consultant (<u>ConsultantID</u>, Date of Birth,
Expertise)<br><br>Assigned_to (<u><em>ConsultantID</em>,
<em>ProjectID</em></u>)<br><em>ConsultantID</em> refers to ConsultantID in
Consultant<br><em>ProjectID</em> refers to ProjectID in Project<br><br>Project
(<u>ProjectID</u>, Description, Type, <em>Company</em>)<br><em>Company</em> refers
to Name in Company<br><br>Company (<u>Name</u>, Location)<br><br>Suppose a new
consultant is hired and immediately assigned to a new training project at a new
firm and to 2 other, already existing projects. How many rows (tuples) must be
added to the database to reflect this change? 1 incorrect 3 incorrect
5 incorrect 6 correct
MC Given the following (normalized) relational model (primary keys underlined;
foreign keys in italics):<br><br>EMPLOYEE(<u>SSN</u>, ENAME, EADDRESS, SEX,
DATE_OF_BIRTH, <em>SUPERVISOR</em>, <em>DNR</em>)<br>SUPERVISOR: <em>foreign key,
refers to</em> SSN in EMPLOYEE, <em>NULL value not allowed</em><br>DNR: <em>foreign
key, refers to</em> DNR in DEPARTMENT, <em>NULL value not
allowed</em><br><br>DEPARTMENT(<u>DNR</u>, DNAME, DLOCATION,
<em>MGNR</em>)<br>MGNR: <em>foreign key, refers to</em> SSN in EMPLOYEE, <em>NULL
value not allowed</em><br><br>PROJECT(<u>PNR</u>, PNAME, PDURATION,
<em>DNR</em>)<br>DNR: <em>foreign key, refers to</em> DNR in DEPARTMENT, <em>NULL
value not allowed</em><br><br>WORKS_ON(<u><em>SSN, PNR,</em></u> HOURS)<br>SSN:
<em>foreign key, refers to</em> SSN in EMPLOYEE, <em>NULL value not
allowed</em><br>PNR: <em>foreign key, refers to</em> PNR in PROJECT, <em>NULL value
not allowed</em><br><br>Which statement is NOT CORRECT? A department has always
exactly one manager. incorrect Every employee must be always supervised by
exactly one other employee. correct Every project is always assigned to
exactly one department. incorrect According to the model, an employee can work in
another department than he/she manages. incorrect
MC Given the following relational model (primary keys are underlined, foreign
keys in italics):<br><br>STUDENT(<u>studentnumber</u>, studentname, street name,
street number, zip code, city)<br>ENROLLED(<u><em>student_number</em>,
<em>course_number</em></u>)<br>COURSE(<u>course number</u>, course
name)<br>PROFESSOR(<u>professor number</u>, professor name)<br>TEACHES(<u>course
number, professor number</u>)<br><br>Which statement is CORRECT? The model does not
allow a course to be taught by multiple professors. incorrect The model can be
further normalized. correct The model does not allow a professor to teach
multiple courses. incorrect The model does not allow a course to be followed by
multiple students. incorrect
MC A relation is in 3 NF if it satisfies 2 NF and... no nonprime attribute
type of R is transitively dependent on the primary key. correct no prime
attribute type of R is transitively dependent on the primary key. incorrect
no primary key of R is transitively dependent on a prime attribute type.
incorrect no non-primary key of R is transitively dependent on a prime
attribute type. incorrect
MC Which statement is CORRECT? The Boyce Codd normal form is more strict than
the fourth normal form. incorrect The Boyce Codd normal form is more strict than
the third normal form. correct The second normal form is more strict than the
Boyce Codd normal form incorrect The first normal form is more strict than the
Boyce Codd normal form. incorrect
MC Consider following generalization / specialization.<br><br><img class="img-
fluid" src="http://www.pdbmbook.com/static/quiz/fig6_9.png"><br><br>Suppose we
represent this generalization / specialization by the following relational
model:<br><br>Discipline (<u>Disciplinenr</u>, Name)<br>Individual sport
(<u><em>Disciplinenr</u></em>) <em>Disciplinenr</em> refers to Disciplinenr in
Discipline<br>Teamsport (<u><em>Disciplinenr</u></em>, Number players)
<em>Disciplinenr</em> refers to Disciplinenr in Discipline<br><br>Consider the
following 4 statements:<br>1) The relational model does not allow to enforce the
completeness constraint; the disjointness constraint can be enforced.<br>2) The
relational model does not allow to enforce both the completeness constraint and the
disjointness constraint.<br>3) By dropping the relation 'Discipline' in the
relational model, the completeness constraint can be enforced.<br>4) The relational
model allows the specialization to be partial.<br><br>Which of the following
options is CORRECT? Statement 1 and 2 are both correct. incorrect Statement 1
and 4 are both incorrect. incorrect Only statement 1 is incorrect, the other
statements are correct. correct Only statement 4 is incorrect, the other
statements are correct. incorrect
MC Consider the following EER model <br><br><img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig6_10.png"><br><br>Which statement is
CORRECT? When mapping the EER relationship type IS_ENROLLED between COURSE and
STUDENT to the relational model, a new relation needs to be introduced. The
relation is identified by GRADE as its primary key. incorrect When mapping the
EER relationship type INVOLVE between COURSE and ASSIGNMENT to the relational
model, a new relation needs to be introduced. The 1..1 cardinalities of this
relationship type cannot be enforced in the relational model. incorrect When
mapping the EER relationship type PARTICIPATE between GROUP ASSIGNMENT and STUDENT
to the relational model, a new relation needs to be introduced. The 4 cardinalities
of this EER relationship type can be perfectly mapped to the relational model.
incorrect The partial inheritance relationship between STUDENT and
REPRESENTATIVE can be perfectly mapped to the relational model by the following two
relations: STUDENT(StudentID, FirstName, LastName) and REPRESENTATIVE (S-StudentID,
Email) whereby S-StudentID refers to StudentID in STUDENT. correct
MC Given the following relational model (primary keys are underlined, foreign
keys are in italics)<br><br>BOOK(<u>ISBN</u>, title, pages, price,
<em>publishername</em>)<br>AUTHOR(<u>authorname</u>,
date_of_birth)<br>WRITES(<u><em>authorname</em></u>,
<u><em>ISBN</em></u>)<br>PUBLISHER(<u>publishername</u>, streetnumber, streetname,
<em>zipcode</em>)<br>CITY(<u>zipcode</u>, city)<br><br>The assumptions are:
<ul><li>Each book has a unique ISBN number</li><li>Each author has a unique
name</li><li>Each publisher has a unique name</li><li>A book can have multiple
authors</li><li>An auther can write more than one book</li><li>A publisher can
publish more than one book</li><li>A book can have multiple publishers</li><li>A
publisher has only one address</li></ul>Which statement is CORRECT? The
relational model is not in first normal form. correct The relational model is
in first normal form but not in second normal form. incorrect The relational
model is in second normal form but not in third normal form. incorrect The
relational model is in third normal form. incorrect
MC Consider the following ER model for a course administration.<br><br><img
class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig6_12.png"><br><br>Which statement is
NOT CORRECT? When mapping the ER relationship type teaches between Session and
Teacher to the relational model, a new relation needs to be introduced. The 4
cardinalities of this ER relationship type can be perfectly mapped to the
relational model. correct When mapping the ER relationship type organizes
between Course and Session to the relational model, the primary key "cnb" of the
Course relation will be included as a NOT NULL foreign key in the Session relation.
The 4 cardinalities of this ER relationship type can be perfectly mapped to the
relational model. incorrect When mapping the ER relationship type enrollment
between Session and Student to the relational model, a new relation needs to be
introduced. The 4 cardinalities of this ER relationship type can be perfectly
mapped to the relational model. incorrect Both the ER and the relational
model cannot enforce that a teacher can only teach sessions of courses for which
he/she is qualified. incorrect
MC <img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_2.png"><br>In mapping this EER
specialization to a relational model, which statement is CORRECT? We can never
enforce a total specialization in the relational model. incorrect We can never
enforce a disjoint specialization in the relational model. incorrect Creating
three relations Customers(customerID, name), Private(<u><i>private-CID</i></u>) and
Business (<u><i>business-CID</i></u>, VATnumber) enforces both a total and disjoint
specialization. incorrect Creating two relations Private(customerID, name) and
Business(customerID, name, VATnumber) enforces a total but not disjoint
specialization correct
MC <img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_3.png"><br>Which statement is NOT
CORRECT when mapping the above EER model to a relational model? A new relation
should be created to model the EER relationship type between customer and
commercial flight. incorrect A new relation should be created to model the
EER relationship type between flight and airline. correct The total EER
specialization can be mapped to the relational model without loss of semantics.
incorrect The Airline's primary key should be included as a NOT NULL
foreign key in the relation 'Flight'. incorrect
MC <img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_4.png"><br>Consider this EER
model.<br><br>Which statement is CORRECT? All 4 cardinalities can be perfectly
mapped to the relational model. incorrect Both minimum cardinalities cannot
be successfully mapped to the relational model. correct Both maximum
cardinalities cannot be successfully mapped to the relational model. incorrect
The relational model cannot enforce that an employee can be supervised by M
other employees. incorrect
MC <img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_5.png"><br>Which statement is NOT
CORRECT when mapping the above EER model to a relational model? The minimum
cardinality of 1 at the 'Table' side of the EER relationship type between 'Table'
and 'Reservation can be successfully mapped to the relational model. correct
To map the weak entity type 'Table' to a relation, we should add the foreign
key 'restaurant name' to the corresponding relation and ensure that is not NULL.
incorrect We should create a new relation to model the EER relationship
type between 'Table' and 'Reservation'. incorrect The minimum cardinality of 1
at the side of 'Restaurant' in the EER relationship type between 'Restaurant' and
'Table' can be successfully mapped to the relational model.incorrect
MC <img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_6.png"><br>In order to turn this
EER model into a fully normalised relational model, how many relations do we need?
5 incorrect 6 correct 7 incorrect 8 incorrect
MC <img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_7.png"><br>Which of the following
statements on mapping the above EER model to a relational model is correct? We
cannot enforce all four cardinalities of the EER relationship type between 'Park'
and 'Activity area'. incorrect We cannot enforce all four cardinalities of the
EER relationship type between 'Bungalow' and 'Reservation'. correct The
minimum cardinality of 1 at the side of 'Customers' in the EER relationship type
between 'Customers' and 'Ticket' cannot be enforced. incorrect We cannot enforce
that the EER specialization is total in the relational model. incorrect
MC Consider the following EER categorisation<br><img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_10.png"><br>Suppose we map this to
the relational model as follows:<br><br>PERSON (<u>PNR</u>, ..., <i>P-CustNo</i>),
P-CustNo refers to CustNo in ACCOUNT-HOLDER<br>COMPANY (<u>CNR</u>, ..., <i>C-
CustNo</i>), C-CustNo refers to CustNo in ACCOUNT-HOLDER<br>ACCOUNT-HOLDER (CustNo,
...)<br><br>Which statement is correct? The categorisation can be perfectly
mapped to the relational model. incorrect The foreign keys P-CustNo and C-
CustNo should be defined as NOT NULL. incorrect We cannot guarantee that the
tuples of the category relation are a subset of the union of the tuples of the
superclasses. correct The categorisation can also be modelled as a
specialisation. incorrect
MC Consider the following EER model<br><img class="img-fluid"
src="http://www.pdbmbook.com/static/quiz/fig2_6_8.png"><br>Which statement is
correct? All 4 cardinalities can be perfectly mapped to the relational model.
incorrect The relational model cannot enforce that an employee supervises
at least one other employee. correct The relational model cannot enforce that
an employee can be supervised by at most one other employee. incorrect The
relational model cannot enforce that an employee can supervise N other employees.
incorrect
MC Consider the following EER ternary relationship type<br><img class="img-
fluid" src="http://www.pdbmbook.com/static/quiz/fig2_6_9.png"><br>Which statement
is correct? The minimum cardinality of 1 cannot be successfully mapped to the
relational model. correct All 6 cardinalities can be perfectly mapped to the
relational model. incorrect All maximum cardinalities of N cannot be successfully
mapped to the relational model. incorrect The corresponding relational model
has 3 relations. incorrect
MC Given the following relation:<br><br>HospitalRoom (<u>hospitalID</u>, roomNR,
street, number, zip code, city, department)<br><br>Which statement is not correct?
'(hospitalID, roomNR)' is a minimal superkey. incorrect Every non-prime
attribute of this relation is fully functionally dependent on any key of this
relation. correct 'roomNR' is a prime attribute type. incorrect 'city' is
transitive dependent on the primary key. incorrect
MC Given the following relation:<br><br>Wine (<u>ID</u>, name, grape, region,
country)<br><br>Which statement is correct? The relation is not in 1NF.
correct The relation is in 1NF but not in 2NF. incorrect The
relations is in 2NF but not in 3NF. incorrect The relation is in 3NF but not in
BCNF. incorrect
MC Given the following relations:<br><br>Artist (<u>ID</u>, name,
genre)<br><br>Tour (<u>name</u>, year, <i>artistID</i>)<br>'artistID' is a foreign
key referring to 'ID' in 'Artist'. This value cannot be NULL.<br><br>Show
(<u>venue, <i>tour name</i></u>, city)<br>'tour name' is a foreign key referring to
'name' in 'Tour'. This value cannot be NULL.<br><br>Customer (<u>ID</u>, name, date
of birth)<br><br>Ticket (<u><i>customerID, venue, tour
name</i></u>)<br>'customerID' is a foreign key referring to 'ID' in 'Customer'.
This value cannot be NULL.<br>'venue' is a foreign key referring to 'venue' in
'Show'. This value cannot be NULL.<br>'tour name' is a foreign key referring to
'name' in 'Tour'. This value cannot be NULL.<br><br>Which statement is correct?
An artist can only have one tour. incorrect All these relations are in
2NF, but not in 3NF. incorrect A customer can only buy one ticket for a
certain show. correct The relations can be further normalised. incorrect
MC Given the following relations:<br><br>Book (<u>ISBN</u>, name, author,
publisher, number of pages, <i>library</i>)<br>Library is a foreign key referring
to 'zip code' in 'Library'. This value can be NULL.<br><br>Library (<u>zip
code</u>, straat, nr, city, opening hours)<br><br>Customer (<u>ID</u>, name, date
of birth)<br><br>Loan (<u><i>ISBN, customerID</i></u>)<br>ISBN is a foreign key
referring to 'ISBN' in 'Book' and cannot be NULL.<br>customerID is a foreign key
referring to 'ID' in 'Customer' and cannot be NULL.<br><br>Which statement is not
correct? A book can be loaned by different customers. incorrect All the
relations are in 2NF but not in 3NF. correct A library can be uniquely
identified based on its zip code. incorrect A customer can loan multiple books.
incorrect
MC Given the following relations:<br><br>Cinema(<u>name</u>, street, number, zip
code)<br><br>Show(<u>movieID, <i>cinema name</i></u>, movie name, date,
time)<br>'cinema name' is a foreign key referring to 'name' in 'Cinema'. This value
cannot be NULL.<br><br>Which statement is CORRECT? This relation is in 2NF, but
not in 3NF. incorrect A cinema can show multiple movies. correct A
movie can only be shown in one cinema. incorrect This relation is in 3NF, but
not in BCNF. incorrect
MC Given this relation in 1NF:<br><br>Reservation(customerID, roomID, customer
name, room name, date, time)<br><br>Which of the following statement is correct?
The same room can be booked by the same customer on different dates and/or
time. incorrect A customer must have a unique name. incorrect A customer can
book multiple rooms at the same date and time. correct This relation is also in
2NF. incorrect
MC How many relations would have to be created to fully normalize the following
relation (including the relation 'Store')?<br><br>Store(ID, address(street, number,
zipcode, city)<br>Employee(SSN, name, date of birth)<br>Manager(SSN, name, date of
birth)<br>Product(ID, name, price))<br><br>Assume that a store can have multiple
employees but an employee works at only one store. A store has exactly one manager
and a manager can only manage one store. A store can have multiple products, and a
product can be sold in different stores. A store's ID, an employee's SSN and a
product's ID are unique. 4 incorrect 5 incorrect 6 correct
7 incorrect
MC Which statement is CORRECT? A superkey is a key that cannot have any of its
attribute types removed. This is also called a minimal key. incorrect The
referential integrity constraint poses that a primary key should never have a NULL
value. incorrect A prime attribute type is an attribute type that is part of
a candidate key. correct The Boyce-Codd normal form is more strict than the
fourth normal form. incorrect
MC Which statement is CORRECT? A relation is in 2NF if it is in 1NF and every
prime attribute type A in R is fully functionally dependent on any key of R.
incorrect A relation is in 4NF if it is in 3NF and no non-prime attribute
type of R is transitively dependent on the primary key. incorrect A relation
is in 3NF if it is in BCNF and no prime attribute type of R is transitively
dependent on the primary key. incorrect A relation is in 3NF if it is in
2NF and no non-prime attribute type of R is transitively dependent on the primary
key. correct
MC Which statement is CORRECT? An EER relationship type always asks for the
creation of a new corresponding relation R in the relational model. incorrect
A minimum cardinality of 1 in the EER model can never be enforced in the
relational model. incorrect In mapping an EER N:M relationship type to the
relational model, we create a new relation R. Its primary key is the combination of
the foreign keys referring to the primary keys of the relations corresponding to
the participating entity types. correct An EER aggregation cannot be mapped
in a straightforward way to a relational model. incorrect

You might also like