In the unit 1 assignment, we defined the relations and keys for a library system
ID: 3852774 • Letter: I
Question
In the unit 1 assignment, we defined the relations and keys for a library system. In unit 2 we learned about constraints. For your unit 2 assignment, identify and describe the constraints that would be appropriate for the relations that we have within our library system. Constraints that you should consider may include:
Entity integrity constraint
Referential integrity constraint
Semantic integrity constraint
Domain constraint
Null constraint
Unique constraint
The constraints in Bold type should all be present in your assignment.
Book Relation Text (up to 60 characters Text lup to 40 characters) Title Author DSN_numbe Text Publicationdate Date Cost number Degree of relation: 5 Cardinality of re latian: cannot be defined at this point Primary key Candidate keys: IOSN_Number (number) uniquely identifies an instance (tuple) of a boak Author, Title Title, Author, PublicationDate IOSN number, Publication Date Borrower Relation card # 1 number Text Address Postal Code PhoneNumbernumber Membership Date Date 6 Library Card Name, Address, Postalcode Name, PhaneNumber Degree of relstion: Primary key Candidate keys: BookLended Relation Data CheckoutDateDate ReturnDate Book Librarian Date ext Text Degree of relation: Cardinality of relatian: Primary key Candidate keys: 5 cannot be defined at ths point Book, Borrower, CheckoutDate Book, Borrower, ReturnDate Book, Borower, Librarian Librarian Relation Data Number ubrarian Id Namc Phone Number ext Number Degree of relation: Cardinality of relation: Primary key: Candidate keys: 3 cannot be defined at this point Librarian id Name, Phone NumberExplanation / Answer
For this the book must be identified by the name only. So it must contain the title that needs to be unique and not null.
If there is a book means that was written by an author which because it doesn't contain null values.
Isdn number for the book must be unique because by this id only we can refer the book .
These are the constraints must need to be applied on the book relation.
These two are enough to represent the barrower. And the library can issue many cards so that each should have unique number and at the same time it shouldn't be null.
If there is library card issued that must be to some person so the name shouldn't be empty inorder to identify the barrower.
Here in this all the barrower , book and librarian who issued are recorded and these are foreign key relations because these details are already in the database so that we are referring to them inorder to get the clear picture.
Checkout date should be not null because the library should maintain dates when the books are lended then only they can charge or other.
Here in this librarian information is maintained so each librarian will have unique identification number so that it was given primary key and the name should not be null.