I’m working on a hotel management system using GridDB as a database which provides their different hotel clients to manage and give service to their customers through mobile and web apps.
I’m sharing the sample data and container info:
`ContainerInfo = Hotel
Hotel_id, hotel_name, location
ContainerInfo = Room
Room_id, hotel_id, room_number, price_per_night
ContainerInfo = Service
service_id, hotel_id, service_name, service_fee
ContainerInfo = Customer
Customer_id, name, email, phone`
`
[
{"hotel_id": 1, "name": "Grand Hotel", "location": "City Center"},
{"hotel_id": 2, "name": "Seaside Resort", "location": "Beachfront"}
]
[
{"room_id": 101, "hotel_id": 1, "room_number": "101A", "price_per_night": 150.00},
{"room_id": 102, "hotel_id": 1, "room_number": "102B", "price_per_night": 120.00}
]
[
{"service_id": 1001, "hotel_id": 1, "service_name": "Room Service", "service_fee": 20.00},
{"service_id": 1002, "hotel_id": 1, "service_name": "Airport Shuttle", "service_fee": 30.00}
]
[
{"customer_id": 10001, "name": "John", "email": "[email protected]", "phone": "+123450"}
]`
I want to calculate the total cost for a customer including their booked rooms, services and food they ordered using the query and save it in the database. Although, I’m trying to write the query but wasn't able to fetch the desired result. If you want I'll post the query as well.
I even want some insights on getting dynamic cost optimisation via integrating AI-driven services to enhance overall experience for both the client and hotel customers. I would appreciate for all the insights and answers. Thank you in advance!