Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABIS Training & Consulting P.O. Box 220 B-3000 Leuven Belgium
19/04/2012
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.
O (a) O (b) 2. true false
The domain of month numbers goes from 1 to 12, so differs from the domain of day numbers. However, the datatype might be the same (INT or SMALLINT).
Restricting the domain of a numeric column to non-negative values can be implemented with a check constraint.
O (a) O (b) 3. true false
Except with a before-trigger, this is the only way to restrict a value to the positive range, since there is no datatype as a POSITIVEINT.
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. true false
A check constraint cant specify a NOT NULL condition. Thats why there is a NOT NULL option in the definition of each column.
A NULL value means that a value is not known, or that a feature does not apply to a certain individual.
O (a) O (b) 5. true false
19/04/2012
7.
19/04/2012
13.
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 2 3 name Wouters Peter Peeters Jan Janssens Wouter phone number 016/549216, 0498/526984 0488/965235 03/5214963, 0478/625398
yes no
A single field cant contain a list of values, at least not in the first base table form.
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 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
yes no
The same PERSON NUMBER and/or NAME refers to the same person, each time with a different PHONE NUMBER. Take notice PERSON NUMBER isnt the PK for this table.
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
In this case theres no way to distinguish between firt and last name.
19/04/2012
16.
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 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
yes no
The first column of each table guarantees the link, respectively FK and PK. The PK of the first table isnt the first column; its either the second or the combination of first and second.
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?
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
yes no
The order of the rows isnt relevant. The occurance of an artificial PK isnt necessary, but it is possible.
Can the following construction be used in a relational system? The domain of the language column is {N,F,E}.
person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter language N N F
O (a) O (b)
yes no
Not every possible value of a domain must be present in the actual column.
19/04/2012
19.
Can the following construction be used in a relational system? The delete rule for both primary keys is on delete cascade.
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
yes no
Can the following construction be used in a relational system? The domain of the married column is {Y,N}.
person number 1 2 3 name Wouters Peter Peeters Jan Janssens Wouter married N NULL Y
O (a) O (b)
yes no
A NULL-value is possible, independent of any limitations due to domain definition.
19/04/2012
EVALUATION.
Here are the correct answers to all questions: 1. 2. 3. 4. 5. 6. 7. 8. 9. a a b a a b b a b
10. a 11. a 12. a 13. b 14. a 15. b 16. a 17. a 18. a 19. a 20. a Give yourself 1 point for each correctly answered question. If you have less than 14 correct answers, we advise you to follow the RDBMS concepts course. If you have more than 17 correct answers, it is not useful anymore to follow this course. You can immediately register for other database courses (SQL fundamentals, DB2, Oracle, MySQL or SQLServer ...). You may check your SQL background first with our selftest SQL and our self-test SQL workshop. If your score is between 14 and 17, you have already some background knowledge on relational databases, but you will certainly still learn a lot in the RDBMS concepts course.
19/04/2012