What are the business rules for a Hotel including room rates
What are the business rules for a Hotel? including room rates, salary and hourly employees, scheduling employees, guest information, room bookings (including different room types), and amenities?
****business rules should always be two-sided as they in turn map to entities and their relationships. For example, if you have multiple employees that work in a department, your business rule might state:
A DEPARTMENT employs zero or more EMPLOYEEs. An EMPLOYEE works in one and only one DEPARTMENT.
In this example, note:
a) I state zero or more on the \"employs\" part of the relationship instead of many. By doing so you know that the EMPLOYEE side is optional, i.e. a DEPARTMENT may have no employees assigned. If I had stated \"A DEPARTMENT employs one or more EMPLOYEEs\", then I would know that the EMPLOYEE is mandatory, i.e. the department must contain at least one employee.
b) Note that the 2nd sentence is NOT a repeat of the first sentence. If you were drawing these in Crow\'s foot notation, and you had a DEPARTMENT entity on the left and a EMPLOYEE entity on the right, the first sentence tells you that you would have a crow\'s foot on the EMPLOYEE side of the relationship line (along with the O to mark it optional). The 2nd sentence tells us what goes on the other side (i.e. on the DEPARTMENT side of the line). Since we have \"one and only one\" DEPARTMENT for the given (An) EMPLOYEE, it tells use that the left side of the notation would be a || (indicating one and only one), i.e.that DEPARTMENT is mandatory for an EMPLOYEE. The two statements TOGETHER tell us that DEPTMENT to EMPLOYEE is 1:M.
c)You could also show the Business rule as:
A DEPARTMENT employees many EMPLOYEES.
A DEPARTMENT may have no EMPLOYEES.
An EMPLOYEE works in a DEPARTMENT.
An EMPLOYEE must have a DEPARTMENT assigned.
Solution
A DEPARTMENT employs zero or more EMPLOYEEs.
An EMPLOYEE works in one and only one DEPARTMENT.
An employee is provided health insurance and accidental insurance.
An EMPLOYEE must have a DEPARTMENT assigned.
An employee has to come to work 6 days week as per job roster.
A EMPLOYEE has to work a minimum of 8 hours.
Beyond 8 hours EMPLOYEEs are entitled to special allowance at a rate of $100/hour
A EMPLOYEE is entitled to get 20 Casual leave in a year.
Any leave beyond casual leave limit would be considered as \"Leave without pay\".
A DEPARTMENT pays compensation to zero or more employees.
An employee get compensation from only one DEPARTMENT.
Hotel has different category rooms.
A room is belongs to a single category.
Every room has a price tagged with.
Advanced booking amount can be refunded till 3 days before to the booking date.
Customer has to pay a charge of 10% penalty as cancelation fee.
Check-in time is 11 AM and check-out time is 10 AM.
Room price changed as demand increases.
A customer can rent zero or more room.
A room can be rented to a single customer.
Premium category room is having air conditioner.
Customer has to pay penalty for any physical damage of room.
All guest\'s govt ID proof is verified during check-in.
All guest are provided complimentary breakfast.
