Professional Documents
Culture Documents
COM222 Test2 Marksheet
COM222 Test2 Marksheet
COM222 Test2 Marksheet
CA- ii
Eos
EoS-deferred
[A software system that enables users to define (1), create (1), maintain (1), and control
access (1) to the database --4]
2. Explain how SQL provides physical and logical data independence.
(4)
[physical: the DDL does not specify how the records will be stored on disk, the file
structure and choice of index to be used (1). So as long as the schema in the DDL is
maintained, changes to storage details eg change in indexing algorithm, will not affect
applications using the schema except performance wise (1)
logical: DML - if a schema changes using a DDL, corresponding changes to the DML
can be made to obtain the same result for the user (1). This insulates the user from
noticing those changes (1)]
]
5. Consider the two tables 𝑇 and 𝑆 shown below.
T S
P Q R A B C
10 a 5 10 b 6
15 b 8 25 c 3
25 a 6 10 b 5
7. A first try to design a database for bookshop to track details of books sold by the
bookshop produced the schema, BOOKSHOP (Bookshop#, Bookshop_Addr, (BookNo,
BookTitle, BookAuthor, BookPublisher, Copies_Sold)). Assume that
Act[a,b,c(FK),(d,e)] represents a schema “Act” where a,b,..,e are attributes, (d,e)
represent a repeating group, c represent primary key and (FK) indicates attribute c is a
foreign key.
[FDS:
FD 1 BookNo → BookTitle, BookAuthor, BookPublisher
FD 2 Bookshop → Bookshop_Addr
FD 3 Bookshop, BookNo → Copies_sold --- 3 marks each FD
b. Normalise the table into 3rd Normal form. Show all the intermediate normal forms and
the functional dependencies defining the forms or otherwise. (11)
[ ]
b. Assuming that (ii) is transformed from (i), Explain why query (ii) can be
considered to be more efficient than query (i) (4)
[The select operations (𝜋𝑣 ) and 𝜋𝑤𝑦𝑧 reduce the number of columns being carried
on to the join - 2
A more restricted relation A swapped with C in ii – 2 --- 4]