Home Library Relation Assignment

 

Sample Assignment

Table 1 : Home Library

Below is the Home Library table

















































































ISBNTitleAuthor_LastNameAuthor_FirstNamePublisherDateEditionMedia
369852CosmosSaganCarlRandom House19801Book
741258No ScretsSimonCarlyElektra19721CD
654789Symphony No 3 Dur Eroica Op 55BeethovenLudwig 18051CD
789654On the Decay of the Art of LyingTwainMarkProject Gutenberg18801eBook
258963The Adventures of Sherlock HolmesConan DoyleArthurProject Gutenberg 1eBook
125896The Divine ComedyAlighieriDanteProject Gutenberg 1eBook
357951The Hitchhickers Guide to the GalaxyAdamsDouglasPan books19791Book
852369The Return of the King, SoundtrackShoreHowardReprise20031CD
831975Unseen AcademicalsPratchettTerryDobleday20091Book
 

Dependency diagram

The dependency diagram for the Home Library table is as shown below.

 

 

 

 

 

 

 

 

1NF Relations

The 1NF relation involves removing repeating groups in individual tables, creating separate tables for every set of related data, and identifying the primary key in the related data. The Home Library relation to 1NF is as shown below.








ISBNTitleAuthor_LastNameAuthor_FirstNamePublisherDateEditionMedia

 

2NF Relations

In 2NF all non-key attributes should be fully functional and dependent on the primary key. The Home Library 2NF relation is as shown below.



ISBNAuthorIDPublisherID

 


ISBNTitle

 



AuthorIDAuthor_LastNameAuthor_FirstName

 





PublisherIDPublisherDateEditionMedia

 

3NF Relations

In the 3NF relation there should not be any transitive functional dependancies.

The 3NF relations for the Home Library table are as shown below




ISBNAuthorIDPublisherIDTitle

 



AuthorIDAuthor_LastNameAuthor_FirstName

 





PublisherIDPublisherDateEditionMedia

 

 

 

 

 

 

 

Relational Schema

The relational schema for the 3NF relations is as shown below.

BOOK(ISBN[PRIMARY KEY], Publisher, Date, Edition, Media)

When creating the table BOOK, below are the constraints used.

CREATE TABLE BOOK(

ISBN INT NOT NULL,

Publisher VARCHAR (100) NOT NULL,

Date DATE,

Edition VARCHAR (100),

PRIMARY KEY (ISBN)

);

 

 

AUTHOR(ISBN[FOREIGN KEY], Author_LastName, Author_FirstName)

The unique field in the Home Library is the ISBN which becomes the primary key in the BOOK relation and the foreign key in the AUTHOR relation.

When creating the table AUTHOR, below are the constraints used.

CREATE TABLE(ISBN INT NOT NULL,Author_LastName VARCHAR (100) NOT NULL,Author_FirstName VARCHAR (100),PRIMARY KEY (ISBN));

For this assignment contact www.punjabassignmenthelp.com

 

 

Comments

Popular posts from this blog

ACC030243 Corporate Governance SCU Assignment 2

Accounting Assignment Solution

CSG1207 | DATABASE DESIGN AND IMPLEMENTATION ONLINE STORE