Java Reference
In-Depth Information
TimeRange
Address
dayofWeek
openingTime
closingTime
street1
street2
city
state
zip
Payment
Information
*
0. .1
0. .1
PendingOrder-
PaymentInformation
Pendi ngOrder-A ddress
Restaurant -TimeRange
PendingOrder-
Restaurant
0. .1
<<interface >>
Coupon
PendingOrder
Restaurant
PendingOrder
-Coupon
code
validFrom
validTo
Date deliveryTime
0. .1
name
serviceArea:Set < String >
PendingOrder-
PendingOrderLineItem
Restaurant -MenuItem
*
PendingOrderLineItem-
MenuItem
MenuItem
PendingOrder
LineItem
FreeShipping
Coupon
Percentage
DiscountCoupon
name
description
price
quantity
1
code
minimum
code
minimum
percentage
Figure 4.1
Part of the domain model for the Food to Go application
in a straightforward way into the database concepts. As a result, deciding how
each object, field, and relationship in the domain model is stored in the database
is a difficult problem. In this section, you will learn how.
4.1.1
Mapping classes
The central concept in a domain model is, of course, the class, which describes
the structure and behavior of its instances or objects. There are three main ways
to map a class to a database schema:
Map a class to its own table.
Map a class to some other class's table.
Map a class to multiple tables.
Let's look at each one.
 
 
Search WWH ::




Custom Search