Question

i am developing software in ASP.NET 2010.. for library management...

i am facing the problem in database... in the table book i have primary key on BOOK Id, which is system generated. in my library for each book i have single copy....but if suppose i have 7 copies of one book then how should i arrange this record...because for 7 copies only the book id is different,status for CHECK IN/OUT is different. ISBN no is same...how should i implement data redundancy over here.....

i have 1 to 30 type of category of books, for each category books there is different sr no. means for these seven copy books the book id, category sr no is different but author, price, publication,price, category is same.. whether such structure is correct...?

Was it helpful?

Solution

In first step, You have to consider one table as master table which contains details about only books, not related with counts.

Book ( id {system_generate}, name, isbn_10, isbn_13, author, category_id )
Category ( id, name )

Create another table to maintain details about copies of book. for eg BookPieces ( your choice to keep different name as comfortable to you ). I will suggest you to create some random alphanumeric value for each book ie each book should have some 5 to 6 unique character for identication. You can use those number for transaction and references rather than 105, 2045, 23654 etc.

BooksPieces ( id, book_id )

Category is used to filter the data among the whole bunch.

EER Daigram for Online Library Management System : Click Here For DocStoc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top