Uploaded by Gosiame Mogomotsi

mock exam

advertisement
MOCK Exam
Question 1
a. What is a relational database?
b. What is a disjoint subtype? Give an example.
c. Explain why database design is important.
Question 2
a. Some Tiny University staff employees are information technology (It) personnel. Some IT
personnel provide technology support for academic programmes. Some IT personnel provide
technology infrastructure support. Some IT personnel provide technology support for academic
programmes and technology infrastructure support. IT personnel are not lecturers. IT personnel
are required to take periodic training to retain their technical expertise. Tiny University tracks all
IT personnel training by date, type and results (completed vs, not completed). Given that
information, create the complete ERD containing all primary keys, foreign keys and main
attributes.
Question 3
a. Define third normal form. What types of problems would you find in tables that are not in third
normal form?
b. BITS is considering changing its business model so that many consultants can service one client
and one consultant can represent many clients. Using this information, convert the following
unnormalized relation to fourth normal form:
Client (ConsltUum, LastName, FirstName, Street, City, State, Zip_Code, Rate, (ClientNum, ClientName, Street,
City, State, ZipCode, Balance, CreditLimit)).
Question 4
a. When do you use a delete query?
b. Given the below CAR entity attributes, use SQL commands to answer questions 1-3:
CAR
CAR_REG(PK)
MOD_CODE
CAR_YEAR
CAR_COLOR
1. Write the SQL code that will create the table structure above.
2. Write the SQL code to change the color of the car 245 to Red color.
3. Write the SQL code that will restore the data to its original status.
Download