将书存储在数据库中 [英] Storing books in a database

查看:117
本文介绍了将书存储在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个存储图书(和一些其他文档)的系统。用户将能够登录到系统,他们可以看到所有图书的列表或输入一些搜索字符串,并获得包含搜索字符串的书籍列表。我的问题是,我不知道我应该怎么去存储我的书。书籍必须是可搜索的,搜索需要返回书籍ID,名称和首选页面。

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.


  • 数据库不必是免费的。如果SQL Server或Oracle DB将帮助我,我所有的。

  • 书籍约为100页(2-600页)

  • 文件约为1000页(10-50页)

  • 添加图书和文档将是一个很慢的过程,很少发生,因此任何类型的表重新索引不需要快速。

  • 我尚未决定如何搜寻文件。我确实需要我的搜索结果根据相关性排名。

  • 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

推荐答案

不要使用RDBMS数据库。 RDBMS适用于存储关系数据。您尝试存储的数据是一组文档。使用像couchDB或mongoDB的文档存储。但是,你以后必须搜索这些数据,最好在为这样的需求构建的lucene中索引这些数据。

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

这篇关于将书存储在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆