Introduction to Database
|
Pg. 01 |
|
Question Four |
|
|
|
|
( Assignment 1 Deadline: Saturday 1 3/ 1 0/2018 @ 23:59 [Total Mark for this Assignment is 6 ] ) ( Introduction to Database IT244 )
( Instructions: This Assignment must be submitted on Blackboard ( WORD format only ) via the allocated folder. Email submission will not be accepted. You are advised to make your work clear and well-presented , marks may be reduced for poor presentation . This includes filling your information on the cover page. You MUST show all your work , and text must not be converted into an image, unless specified otherwise by the question . Late submission will result in ZERO marks being awarded. The work should be your own, copying from students or other resources will result in ZERO marks . Use Times New Roman font for all your answers . ) ( Student Details: Name: ### CRN : ### ID: ### )
College of Computing and Informatics
|
|
|
|
|
|
|
|
( Marks : 1 ) ( Learning Outcome(s): Explain database concep ts, systems, and architectures. )Question One
What is Data-Manipulation Language (DML)? There are four types of access in DML, explain each one.
Ans.
( Marks 2 ) ( Learning Outcome(s): Create entity-relationship model, relational model, and write queries. )Question Two
Assume we have a Library Database consists of the following relations:
author(author_id, first_name, last_name)
author_publication(author_id, publication_id, author_position)
book(book_id, book_title, month, year, editor)
publication(publication_id, title, book_id)
Note: (editor) in book’s relation refers to (author_id) in author’s relation. Some of authors are book editors.
(a) Underline the appropriate primary keys/foreign keys in the above relations. (mark: 1)
Ans.
(b) Write two relational algebra expressions that retrieve:
· The last names of all authors who are book editors only. (mark: 0.5)
Ans.
· The first name of all authors who are not book editors. (mark: 0.5)
Ans.
( Marks 2 ) ( Learning Outcome(s): Create entity-relationship model, relational mod el, and write SQL queries. )Question Three
(a) Consider that you are asked to design an entity relationship diagram based on the below scenario:
A university consists of a number of departments (id, d_name) and each department offers some courses. A number of modules make up each course. Students enroll their Id, full name, and gender in a particular course and take modules towards the completion of that course. Each module is taught by a lecturer from the appropriate department. (1.5 Marks)
(b) We can convert any weak entity set to a strong entity set by simply adding appropriate attributes. Why, then do we have weak entity sets? Write about the weak entities for several reasons. (0.5 Mark)
Ans.
( Marks 1 ) ( Learning Outcome(s): Design a database starting from the conceptual design to the implement ation of database schemas. )Question Four
Convert the following ER diagrams into relational schemas with the primary key defined for each relation.
Ans.