The integrity rules in dbms are:
1) No component of the primary key of a base relation is allowed to accept nulls.
2)Nulls cannot be in primary keys, but can be in alternate keys.
3) A foreign key is an attribute of one relation R2, whose values are required to match those of the primary key of some other relation R1
a) If one tries to insert a new row into the item table with (item5, orange, food, 5), the insertion will violate the third integrity rule because the primary key here is doubled as there is already item5,food present in the column.
Part b and c does not violate the integrity rule .
QUESTION 1 The following tables form part of a database held in a relational DBMS for storing the information of Customer, Item, Transaction, and temSale A transaction can contain multiple ite...
The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName, city) Room (roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) where Hotel contains hotel details and hotelNo is the primary key; Room contains room details for each hotel and (roomNo, hoteINo) forms the primary key; Booking contains details of bookings and (hoteINo, guestNo, dateFrom) forms the primary key; Guest contains guest details and guestNo is the primary key....