I am designing a big travel market agency, where I have 170000 hotels and 3000 room types.
A simple representation of my entities is:
Hotel:
destination: Paris
rooms:
room_a:
type: single
room_b:
type: double
RoomType:
name: double
paxes(people in room): 2
The most basic search action requires from the user the destination and the number of required rooms and the paxes(people) in each room.
It seems to me a simple SQL query to get all the hotels that provide the required rooms, but I am concerned about the size of my data.
Until now, I have used only relational databases and I have no previous experience with NoSQL databases such as MongoDB and ElasticSearch and I would like to know how much faster it would be to use MongoDB or ElasticSearch vs a relational database. I have read that the typical usecase for elasticsearch is full text search but I do not know how much faster it would be for a search like this.
Thank you
答案 0 :(得分:2)
每个数据库框架都有自己的优点和缺点,但根据我的经验,Elasticsearch有以下几个原因:
答案 1 :(得分:0)
非关系选项可能会为您提供显着的搜索速度增强功能,因为大型数据集上的连接速度可能。使用Mongo或Elasticsearch之类的东西,您可以创建一个包含所有相关信息的单个文档并进行搜索。从关系背景来看,这似乎是违反直觉的 - 但这个想法是将一起访问的信息存储在一起。
对于elasticsearch与mongo,需要考虑以下几点: