Jump to content
Larry Ullman's Book Forums

Recommended Posts

A database design example commonly available pressumes that one wants to organize a collection of books, and depicts the usual author, title, isbn, etc., breakdown, and may even normalize to several tables.

 

Generally not seen, however, is an example that includes the books contents, i.e., chapters, headings, footnotes, and body copy

 

Any thoughs on why this is?

 

Would MYSQL even be capable of managing the task?

 

 

~ David

Share this post


Link to post
Share on other sites

Just a couple of ideas:

- Have the actual book contents in separate PDF files, and then manage those as files with metadata about the files in the DB. Larry actually does this for the first of two sites he constructs in his e-commerce book.

- Use one of the TEXT or BLOB datatypes (i.e., TEXT, MEDIUMTEXT, LARGETEXT, BLOB, MEDIUMBLOB, etc.). The TEXT and BLOB datatypes are capable of storing massive amounts of data. In addition, while it may appear so in the DB interface, the data is not actually stored in the DB, but in separate text files to which pointers are stored in the DB.

 

Either one of those solutions would probably be fine. These days, most people seem to go the PDF route though.

Share this post


Link to post
Share on other sites

Just a couple of ideas:

 

Thank you.

 

Ideas will help get me going in the right direction - or at least any direction, at this point..

 

 

- Have the actual book contents in separate PDF files, and then manage those as files with metadata about the files in the DB.

 

This would definitely get the job done in short order.

 

You could not have known - however - that I had neglected to mention that the reader will need to be able to perform a search and see every hit returned with a link attached that - when clicked - takes them to the part of the book (or, displays the 'page') where the search term(s) are/is located.

 

 

- Use one of the TEXT or BLOB datatypes (i.e., TEXT, MEDIUMTEXT, LARGETEXT, BLOB, MEDIUMBLOB, etc.). The TEXT and BLOB datatypes are capable of storing massive amounts of data. In addition, while it may appear so in the DB interface, the data is not actually stored in the DB, but in separate text files to which pointers are stored in the DB.

 

Interesting. Very interesting. And, this method would concievably allow for a search function to perform as required.

 

Again, thank you for the insight.

 

~ David

Share this post


Link to post
Share on other sites

Just a couple of thoughts (and this is coming from a non-DB expert):

 

Being able to search the entire contents of a book will be super, super slow. Larry made a post somewhere else a while ago about how to create a search feature for just such occasions.

The basic gist is that you have to pick certain keywords from each page (or every so many pages) and then store those keywords in a DB to be searched on. I would recommend a similar methodology.

As for jumping to the correct page, well, I don't know much about handling PDFs in browsers, but I'm sure PHP has some sort of plug-in that would allow you to do that.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...