Database Reference
In-Depth Information
at most one or several values, respectively. In our example, all attributes
are monovalued. However, if it is the case that a customer has one or more
phones, then the attribute Phone will be labeled (1,n).
Further, attributes may be composed of other attributes, as shown by
the attribute Name of the entity type Employees in our example, which is
composed of FirstName and LastName . Such attributes are called complex
attributes , while those that do not have components are called simple
attributes . Finally, some attributes may be derived , as shown for the
attribute NumberOrders of Products . This means that the number of orders
in which a product participates may be derived using a formula that involves
other elements of the schema and stored as an attribute. In our case, the
derived attribute records the number of times that a particular product
participates in the relationship OrderDetails .
A common situation in real-world applications is that one or several
attributes uniquely identify a particular object; such attributes are called
identifiers . In Fig. 2.1 , identifiers are underlined; for example, EmployeeID
is the identifier of the entity type Employees , meaning that every employee
has a unique value for this attribute. In the figure, all entity type identifiers
are simple, that is, they are composed of only one attribute, although it is
common to have identifiers composed of two or more attributes.
Orders
OrderDetails
Composed
(1,1)
(1,n)
OrderID
OrderDate
RequiredDate
ShippedDate
...
Line N o
UnitPrice
Quantity
Discount
SalesAmount
Fig. 2.2 Relationship type OrderDetails modeled as a weak entity type
Entity types that do not have an identifier of their own are called weak
entity types and are represented with a double line on its name box. In
contrast, regular entity types that do have an identifier are called strong
entity types . In Fig. 2.1 , there are no weak entity types. However, note that
the relationship OrderDetails between Orders and Products can be modeled as
shown in Fig. 2.2 .
A weak entity type is dependent on the existence of another entity type,
called the identifying or owner entity type . The relationship type that
relates a weak entity type to its owner is called the identifying relationship
type of the weak entity type. A relationship type that is not an identifying
relationship type is called a regular relationship type .Thus,inFig. 2.2 ,
Orders is the owner entity type for the weak entity type OrderDetails ,and
Composed is its identifying relationship type. As shown in the figure, the
identifying relationship type and the role that connects it to the weak entity
Search WWH ::




Custom Search