About Database filters
Application Type
Traditional Web

i am creating an online hotel booking demo. I am stuck with how to filter room that are empty and not reserved on a particular date. This is my database schema below. You are welcome to point out my mistakes. I am here for learning.


Hello there,

So I saw that you have an attribute to say if your rooms are available or not, maybe you can use that to see if is available or if has a reservation, and you can even give a double check by filtering through the reservation table.

So also what I think you need to do, is, filter all rooms that are not reserved on that date relative to DateIn and Date Out.

Can you share your OML?

Kind Regards,


Hi Marcio,

Please check oml and suggest some solutions.


Hy Deepak,

Got your point. You can you this filter in aggregate "(RoomRecord.IsAvailable = True) and (Reservation.DateIn <> OccupiedRoom.CheckIn)" . For empty room you can use before "and" statement, after "and" I also have confusion. Sharing screenshot. Please let us know its working or not.




Hi Deepak,

I have shared my oml kindly refer


CS File


Thanks Everyone for your precious time and solutions.

Hi Deepak, 

have you get your solution. And if, can you marked as solution so this case will mark as solved.

Thank you.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.