Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing books in a database

I want to create a system that stores books (and some other documents). Users will be able to log into the system where they can either see a list of all books or enter some search string and get a list of the books containing the search string. My problem is that I don´t know how I should go about storing my books. The books obv have to be searchable and the search needs to return the books ID, Name, and preferable page. Anything more like the text surrounding the search term would be a nice extra.

Some facts that might help you help me get the best answer.

  • The database does not have to be free. If SQL Server or an Oracle DB will help me than I´m all for that.
  • The books will be about ~100 (2-600 pages)
  • The documents will be about ~1000 (10-50 pages)
  • Adding books and documents will be a slow process that will happen infrequently so any type of re-indexing of tables does not need to be fast.
  • I have not decided how to search the documents. I do need my search results to be ranked based on relevance somehow. This might become a source of another question in the future
like image 301
Mannsi Avatar asked Jan 16 '11 16:01

Mannsi


People also ask

Is it good to store files in database?

DB provides data integrity between the file and its metadata. Database Security is available by default. Backups automatically include files, no extra management of file system necessary. Database indexes perform better than file system trees when more number of items are to be stored.

What is a book database?

A library database is a searchable electronic index of published, reliable resources. Databases provide access to a wealth of useful research materials from academic journals, newspapers, and magazines. Some databases also include e-books, relevant Web resources, and various multimedia.


1 Answers

Do not use a RDBMS database. RDBMS are good for storing relational data. Data you are trying to store are a set of documents. Use a document store like couchDB or mongoDB. However, you since have to search this data, it is better to index this data in lucene which is built for such needs

like image 158
piyush Avatar answered Oct 23 '22 16:10

piyush