Documente Academic
Documente Profesional
Documente Cultură
Mc180400574
Question No. 1
Consider the following schema related to a Social Media website named as ‘userPosts’. You
have to perform following tasks related to the provided schema:
1- Identify appropriate keys for following structure (Primary and/or foreign key(s))
Answer:
Primary key in userData will be uerID and foreignKey in PostData will be user
ID and primary Key in PostData will be Posted.
User table :
Question No. 2
Consider the following schemas relevant to a hotel booking website. You are required to De-
Normalization the given schemas using Collapsing Tables Technique.
De-Normalization
Room Visitor:
RoomeID visitorCNIC Date and Time
1 452-16-6666666 25/09/13, 6:20am
2 452-18-8888888 10/09/13 ,8:40pm
3 452-13-3333333 12/09/13 ,5:30pm
Room Charges:
De-Normalization