Sunday, February 19, 2012

Database Design

This may not be the right place to ask this, but I'm not sure where the discussion forum for Database Design is. Basically I need to turn like a regular book for instance into a database design. It's a regular book with table of contents with titles and sub-titles. How would I make that into a database?

Here is a quick and very basic way to approach at the problem:

Tables:

Books

BookID

Title

ISBN

PublisherID

Date

{Other Base publication info}

BookFormat

BookID

Format (hard/soft/electronic/cd/tape, etc.)

DateAvailable

{Format specific Info}

Chapters

BookID

chNumber

chTitle

chSubTitle

chContents

Authors

AuthorID

LastName

FirstName

{contact info}

BooksAuthors

BookID

AuthorID

TOC and Index are often an artifact of the print-prep process. Most TOC information can be 'pulled' from the other tables. Page numbers are assiged depending upon the format/size.

Here is a good source for data models. While there isn't one for a Publisher, perhaps some amalgamation of 'Books and Libraries' and 'CD Collection' will get you thinking in a direction that will serves your needs.

http://www.databaseanswers.org/data_models/index.htm

|||Oh Wow! That site has so many designs, it will become very valuable to me. Thanks for pointing me to that site, I'm sure it will point me in the right direction.|||

It is an okay site, but it never seems to go nearly deep enough. I once started trying to put together a book of database design blueprints, but situations are all so different. You really need to take every situation differently.

Like for a book design, in addition to what Arnie noted, you might want Genre, Sections, Author of Section (or Chapter). It really depends on context. So you have to study what you are trying to convey in a database, determine everything you want to store about it, normalize it so that it works well with a relational database, and then you will have what you want..

And for any questions, yes, this is the place on the MSDN forums where I would take design questions. The first step to writing good SQL is having a good foundation to query Smile

No comments:

Post a Comment