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))
2- Convert
this schema into 2 NF
userPosts (userID, userName, password, address, postId, postDate,
postContent)
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.
roomVisitor (roomID,
visitorCNIC, dateTime)
roomCharges (roomID, spentDays, roomRent)
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 1 | 2 |