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.