PDA

View Full Version : MySQL OPINIONS


terrencebrown
10-09-2001, 11:58 PM
If one were inclined to create a database based on the bible would you:

A) Create 1 table 4 columns book, chapter, verse, text

B) Create 66 tables 3 columns book, chapter, verse, text

or C) (describe one of your own)

Opinions are greatly encouraged.

Dan
10-10-2001, 12:32 AM
it depends on your needs, but this is what I would do:

table 1 = listing of books, columns book_id, book_title, testament
table 2 = verses/chapters, columns book_id, verse_num, chapter_num

something like that.

terrencebrown
10-10-2001, 12:40 AM
Thanks for the reply!

Since the data is fixed, why wouldn't A work? The book, chapters, and verses would sort themselves.

terrencebrown
10-10-2001, 12:46 AM
book chapter verse text
Genesis 001 001 In the beginning God...
Genesis 001 002 And the earth was...
Genesis 001 003 And God said, Let there...

Just an opinion.

Dan
10-10-2001, 12:54 AM
Ot certainly is feasible, but the true beauty of mySQL lies in its communication between tables, not so much the power of one table alone. That's where the 'R' in RDBMS (relational database management system) comes in.

terrencebrown
10-10-2001, 01:01 AM
Thanks for the discussion!

I can see creating relationships for changing data, but fixed data?

Shouldn't a properly written SQL statement enable the user to find what he needs?

Dan
10-10-2001, 01:17 AM
That is very true and would work perfectly fine, based on what I understand. But in the future, you may or may not add different versions of the Bible and whatnot, and you'd have to design your db according to this. Not that I know how this would affect your table design. I'm exhausted, and I'm still plowing through my homework. :D

terrencebrown
10-10-2001, 01:20 AM
Thanks for opinions! Good night.

Dan
10-10-2001, 01:34 AM
Good night, then. I'll still be on for a while X_x

terrencebrown
10-10-2001, 10:36 AM
Good day then.

terrencebrown
10-10-2001, 01:37 PM
I believe it is necessary to add a book id in order to counter the automatic sorting by mysql.


mysql> SELECT bookid, COUNT(*) FROM books GROUP BY bookid;

Dan
10-10-2001, 04:29 PM
I wouldn't know. I borrowed a mySQL book from the library over the summer but never finished it... and I've never done anything with mySQL before (tee hee, I plan to, though!)

terrencebrown
10-10-2001, 04:31 PM
Oh.