top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

MongoDB for any type of bookable resources

+1 vote
248 views

I am going to build a application for booking any type of resource. (Hotel, movie tickets,doctors,etc..) Any thing bookable. My initial plan was use MongoDB for back end. My idea is keep common data set in a different collection and put reference to base collection dataset like SQL. Below is a sample of that data set.

resources collection
{
_id:100,
name : standard room,
},
{
_id:101,
name : VIP room,
},
{
_id:102,
name : double room,
},

base data collection
{
_id:300,
name : ABC Hotel,
resources:[_id:100,101,102]
address :xxxxx
}

So this type of data set need joins when user requesting hotel details. Is that good practice?
I want to keep the document for each resources. But it duplicate the same data. And also we need to filter the data with already booked once as well as on going transactions. So need to keep connection with transaction collection as well.

I want to know how I will use properly.

posted Jul 30, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

We all know that mongoDB provide different type of indexing (ascending, descending, geo2D, geo2d sphere, or text), so which type of indexing considered more efficient for indexing boolean field?

0 votes

I want compress the data stored in column more efficient, because mydata is timeseries of stock or future price.
Most of them is similar, so I thought I could compress the price data(float, uint64, int) more efficient than zlib,like what infobright do.

Could any one tell me how to compress the column more efficient or could I get the blocks data type when I write the compress plug.

...