You are on page 1of 8

Self-test RDBMS concepts

Document: E1034Test.fm 10/02/2010

ABIS Training & Consulting P.O. Box 220 B-3000 Leuven Belgium

TRAINING & CONSULTING

INTRODUCTION SELF-TEST RDBMS CONCEPTS With this self-test you can see for yourself if you have enough background on relational database concepts to follow more advanced courses in this domain. This test consists of 20 multiple choice questions. Write down your responses and compare them with the solutions given on the last page. 10/02/2010 Self-test RDBMS concepts 2 . The test is based on topics treated in the RDBMS concepts course. This test will take about fifteen minutes.

Indicate whether this statement is true or false. INT of SMALLINT). The primary key column must contain unique values. true false Dit is zelfs de enige manier (naast een before-trigger). dus verschillend van het domein van dagnummers. O (a) O (b) true false 10/02/2010 Self-test RDBMS concepts 3 . O (a) O (b) 3. vandaar het bepaald lidwoord. vermits er geen datatype “positive int” bestaat. O (a) O (b) 6. true false Uiteraard in de onderstelling dat de PK uit slechts 1 kolom bestaat. Het datatype daarentegen is mogelijk hetzelfde (nl. or that a feature does not apply to a certain individual. Indicate whether this statement is true or false. true false Een check constraint kan geen “NOT NULL”-conditie specifiëren: daarvoor dient de NOT NULL-optie. true false Indicate whether this statement is true or false. The primary key column may contain NULL values.QUESTIONS SELF-TEST RDBMS CONCEPTS 1. Indicate whether this statement is true or false. The domain of a column containing the month number of the date of birth of employees differs from the domain of a column with the day number of that date.12. O (a) O (b) 2. The restriction on the domain for the date of birth must be implemented with a check constraint when the aim is that for every employee the date of birth must be known. O (a) O (b) 4. Indicate whether this statement is true or false.. Restricting the domain of a numeric column to non-negative values can be implemented with a check constraint. true false Het domein van “maandnummers” is 1. O (a) O (b) 5. A NULL value means that a value is not known. Indicate whether this statement is true or false.

O (a) O (b) 11. A view is an alternative method to store data. A trigger can be used instead of a foreign key to implement referential integrity. A foreign key column must contain unique values. A foreign key column may contain NULL values. O (a) O (b) 12. Indicate whether this statement is true or false. A trigger can be used instead of a check constraint.v. dus een alternatief zicht op data. Indicate whether this statement is true or false. 10/02/2010 Self-test RDBMS concepts 4 . een trigger. true false Dit is uiteraard minder gebruikelijk: een before-trigger kan een andere tabel ondervragen met een subquery. true false Indicate whether this statement is true or false. true false Een VIEW is een virtuele tabel. geen alternatieve data-opslag. O (a) O (b) 10. Omgekeerd echter zijn er trigger-condities die niet met een check-constraint kunnen geïmplementeerd worden: wanneer de conditie verwijst naar andere rijen dan de pas ingevoegde of gewijzigde rij. A stored procedure is only executed when asked for explicitly. true false Dit in tegenstelling tot b. O (a) O (b) 8. O (a) O (b) 9. O (a) O (b) true false Een before-trigger kan exact dezelfde conditie meegegeven worden als een check-constraint.7. true false Indicate whether this statement is true or false. Indicate whether this statement is true or false. Indicate whether this statement is true or false. en de ingevoerde waarde weigeren indien die niet in de output van de subquery voorkomt.

althans niet in de eerste normaalvorm. Can the following construction be used in a relational system. if we want to assign a single name (first name and last name) and one or more telephone numbers to a certain person? person number 1 1 2 2 3 3 name Wouters Peter Peeters Jan Janssens Wouter phone number 016/549216 016/549216 0488/965235 0488/965235 03/5214963 03/5214963 O (a) O (b) yes no Nu is er geen mogelijkheid meer om voornaam en familienaam van elkaar te onderscheiden. telkens met een ander telefoonnummer. yes no Een veld kan geen lijst bevatten. 0478/625398 O (a) O (b) 14.13. if we want to assign a single name (first name and last name) and one or more telephone numbers to a certain person? person number 1 1 3 3 2 name Wouters Peter Wouters Peter Janssens Wouter Janssens Wouter Peeters Jan phone number 016/549216 0498/526984 03/5214963 0478/625398 0488/965235 O (a) O (b) 15. if we want to assign a single name (first name and last name) and one or more telephone numbers to a certain person? person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter phone number 016/549216. Can the following construction be used in a relational system. Can the following construction be used in a relational system. 0498/526984 0488/965235 03/5214963. yes no Eenzelfde persoonsnummer (en/of naam) wijst op dezelfde “persoon”. 10/02/2010 Self-test RDBMS concepts 5 .

person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter language N N F O (a) O (b) yes no Niet elke waarde van het domein hoeft voor te komen. yes no Rijvolgorde is niet relevant. if we want to assign a single name (first name and last name) and one or more telephone numbers to a certain person? person number 1 1 2 3 3 phone number 016/549216 0498/526984 0488/965235 03/5214963 0478/625398 person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter O (a) O (b) 17. de PK van de eerste tabel is uiteraard niet de eerste kolom: hetzij de tweede kolom.E}. hetzij beide kolommen samen. Can the following construction be used in a relational system? The domain of the “language” column is {N. Can the following construction be used in a relational system.F.16.. resp. yes no De eerste kolom van elke tabel zorgt voor de koppeling: FK en PK. De aanwezigheid van een artificiële PK is niet nodig maar wel mogelijk. Can the following construction be used in a relational system. 10/02/2010 Self-test RDBMS concepts 6 . if we want to assign a single name (first name and last name) and one or more telephone numbers to a certain person? PK ID 1 2 3 4 5 Foreign Key person number 2 1 3 1 3 phone number 0488/965235 016/549216 03/5214963 0498/526984 0478/625398 Primary Key person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter O (a) O (b) 18.

Can the following construction be used in a relational system? The delete rule for both primary keys is ‘on delete cascade’. onafhankelijk van de domeinbeperkingen.N}.19. 10/02/2010 Self-test RDBMS concepts 7 . person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter married N NULL Y O (a) O (b) yes no Een NULL-waarde is mogelijk. PK ID 1 2 3 4 5 Foreign Key person number 1 1 2 3 3 phone number 016/549216 0498/526984 0488/965235 03/5214963 0478/625398 Primary Key person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter O (a) O (b) 20. yes no Can the following construction be used in a relational system? The domain of the “married” column is {Y.

10/02/2010 Self-test RDBMS concepts 8 . a 20. If you have less than 14 correct answers. If you have more than 17 correct answers.EVALUATION. 6. a 15. 2. a 18. 9. b 16. b 14. a 19. Oracle. a Give yourself 1 point for each correctly answered question. a a b a a b b a b 10. 5. a 12. a 17. If your score is between 14 and 17.). we advise you to follow the RDBMS concepts course. 7. Here are the correct answers to all questions: 1. a 11.. it is not useful anymore to follow this course. MySQL or SQLServer . 3. DB2. 8.. 4. you have already some background knowledge on relational databases. You can immediately register for other database courses (SQL fundamentals. You may check your SQL background first with our selftest SQL and our self-test SQL workshop. but you will certainly still learn a lot in the RDBMS concepts course. a 13.