1. 使用类图,分别对 Asg_RH 文档中 Make Reservation 用例以及 Payment 用例开展领域建模。然后,根据上述模型,给出建议的数据表以及主要字段,特别是主键和外键
领域建模如下所示:
数据建模如下所示:
1. Hotel(HotelID/Key, Name, LocationID/Fkey, ReservationID/Fkey, Address, star-rating, info)
2. Reservation(ReservationID/Key, HotelID/FKey, ShoppingBasketID/FKey, PaymentID/FKey, RoomItemsID/Fkey, checkInDate, checkOutDate, numOfNights, customerFullName, customerSmoking,
contactEmail)
3. Location(LocationID/Key)
4. Customer(CustomerID/Key, ReservationID/FKey)
5. ShoppingBasket(ShoppingBasketID/Key)
6. Payment(PaymentID/Key)
7. RoomItems(RoomItemsID/Key, type, adults, children, ageFrom, ageTo)
8. Room(RoomID/Key, RoomDescriptionID/FKey type, date, price, isAvailabel, reservedNum)
9. RoomDescription(RoomDescriptionID/Key, type, listPrice, Info)
10.RoomType(RoomTypeID)
领域建模如下所示:
数据建模如下所示:
1. Customer(CustomerID/Key, ShoppingBasketID/FKey, Name)
2. Payment(PaymentID/Key, CarditCardID/Key, TotalPrice)
3. CreditCard(CredotCardID/Key, CHADID/FKey, type, isAvailabel, CardNumber, CardSecurityCode, ExpityDate)
4. CardHolderAddressDetail(CHADID/Key, FirstName, LastName, Address1, Address2, City, County/State, Country, Postcode, DaytimeTelephone, EveningTelephone)
5. ShoppingBasket(ShoppingBasketID/Key, BookingDetailID/FKey)
6. BookingDetail(BookingDetailID/Key, BookingDetailDescription/FKey, TotalPrice, check-in-date, numberOfDate, check-out-date)
7. BookingDescription(BookingDescriptionID/Key, Name, Number, Price)
2. 使用 UML State Model,对每个订单对象生命周期建模
原文:https://www.cnblogs.com/alva112358/p/11047969.html