使用类图,分别对 Asg_RH 文档中 Make Reservation 用例以及 Payment 用例开展领域建模。然后,根据上述模型,给出建议的数据表以及主要字段,特别是主键和外键。
- 注意事项:
- 对象必须是名词、特别是技术名词、报表、描述类的处理;
- 关联必须有多重性、部分有名称与导航方向
- 属性要注意计算字段
类图
Reservation
Payment
数据建模
Hotel (ID/Key, LocationID/FKey, Name, Address, isFavorite, isLowestPrice, Rating)
Location (ID/Key, Name)
Traveler (ID/Key, Name, Email)
Reservation (ID/Key, TravelerID/FKey, Date, Time)
ReservationItem (ID/Key, ReservationID/FKey, HotelID/FKey, CheckInDate, CheckOutDate, NumberofNights, NumberofAdults, NumberofChildren, ageOfChildren)
Room (ID/Key, HotelID/FKey, Number, Type, Status, Price)
RoomDescription(RoomID/FKey, total, list-price, description)
Payment (ID/Key, ReservationID/FKey, TotalCost,Date,Time)
PaymentItem (ID/Key, PaymentID/FKey, Details)
CreditCard (ID/Key, CardholderID/FKey, Type, CardNumber, SecurityCode, ExpiryDate)
Customer (ID/Key, Name, Email,Address)
使用 UML State Model,参考 Asg_RH 文档, 对 Reservation/Order 对象建模