Wk2 Tutorial Solution
Wk2 Tutorial Solution
A data model is a relatively simple representation, usually graphical, of a more complex real
world object event. The data model’s main function is to help us understand the complexities
of the real-world environment. The database designer uses data models to facilitate the
interaction among designers, application programmers, and end users. In short, a good data
model is a communications device that helps eliminate (or at least substantially reduce)
discrepancies between the database design’s components and the real world data
environment. The development of data models, bolstered by powerful database design tools,
has made it possible to substantially diminish the database design error potential. (Review
Section 2.1 in detail.)
2. Describe the basic features of the relational data model and discuss their importance
to the end user and the designer.
A relational database is a single data repository that provides both structural and data
independence while maintaining conceptual simplicity.
The relational database model is perceived by the user to be a collection of tables in which
data are stored. Each table resembles a matrix composed of row and columns. Tables are
related to each other by sharing a common value in one of their columns.
The relational model represents a breakthrough for users and designers because it lets them
operate in a simpler conceptual environment. End users find it easier to visualize their data as
a collection of data organized as a matrix. Designers find it easier to deal with conceptual
data representation, freeing them from the complexities associated with physical data
representation.
3. Explain how the entity relationship (ER) model helped produce a more structured
relational database design environment.
An entity relationship model, also known as an ERM, helps identify the database's main
entities and their relationships. Because the ERM components are graphically represented,
their role is more easily understood. Using the ER diagram, it’s easy to map the ERM to the
relational database model’s tables and attributes. This mapping process uses a series of well-
defined steps to generate all the required database structures. (This structures mapping
approach is augmented by a process known as normalization, which is covered in detail in
Chapter 6 “Normalization of Database Tables.”)
4. Consider the scenario described by the statement “A customer can make many
payments, but each payment is made by only one customer” as the basis for an
entity relationship diagram (ERD) representation.
This scenario yields the ERDs shown in Figure Q2.7. (Note the use of the PowerPoint
Crow’s Foot template. We will start using the Visio Professional-generated Crow’s Foot
ERDs in Chapter 3, but you can, of course, continue to use the template if you do not
have access to Visio Professional.)
Figure Q2.7 The Chen and Crow’s Foot ERDs for Question 7
Chen model
1 M
CUSTOMER makes PAYMENT
makes
CUSTOMER PAYMENT
An object has greater semantic content because it embodies both data and behavior. That is,
the object contains, in addition to data, also the description of the operations that may be
performed by the object.
6. What is the difference between an object and a class in the object oriented data
model (OODM)?
An object is an instance of a specific class. It is useful to point out that the object is a run-
time concept, while the class is a more static description.
Objects that share similar characteristics are grouped in classes. A class is a collection of
similar objects with shared structure (attributes) and behavior (methods.) Therefore, a class
resembles an entity set. However, a class also includes a set of procedures known as methods.
1:1
An academic department is chaired by one professor; a professor may chair only one
academic department.
1:M
A customer may generate many invoices; each invoice is generated by one customer.
M:N
An employee may have earned many degrees; a degree may have been earned by many
employees.
9. What is a table, and what role does it play in the relational model?
Strictly speaking, the relational data model bases data storage on relations. These relations
are based on algebraic set theory. However, the user perceives the relations to be tables. In
the relational database environment, designers and users perceive a table to be a matrix
consisting of a series of row/column intersections.Tables, also called relations, are related to
each other by sharing a common entity characteristic. For example, an INVOICE table would
contain a customer number that points to that same number in the CUSTOMER table. This
feature enables the RDBMS to link invoices to the customers who generated them.
Tables are especially useful from the modeling and implementation perspecectives. Because
tables are used to describe the entities they represent, they provide ane asy way to summarize
entity characteristics and relationships among entities. And, because they are purely
conceptual constructs, the designer does not need to be concerned about the physical
implementation aspects of the database design.
Connectivity is the relational term to describe the types of relationships (1:1, 1:M, M:N).
In the figure, the businesss rule that an advisor can advise many students and a student has
only one assigned advisor is shown with in a relationship with a connectivity of 1:M. The
business rule that a student can register only one vehicle to park on campus and a vehicle can
be registered by only one student is shown with a relationship with a connectivity of 1:1.
Finally, the rule that a student can register for many classes, and a class can be registered for
by many students, is shown by the relationship with a connectivity of M:N.