0% found this document useful (0 votes)
65 views

Lecture 3

The document discusses different types of data models including hierarchical, network, relational, entity-relationship, and object-oriented models. It describes the hierarchical model as having a tree-like structure with parent-child relationships and the network model as allowing a record to have more than one parent. The document also discusses conceptual, logical, and physical data modeling and different levels of abstraction in data modeling from an external view to implementation details.

Uploaded by

Ram Rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

Lecture 3

The document discusses different types of data models including hierarchical, network, relational, entity-relationship, and object-oriented models. It describes the hierarchical model as having a tree-like structure with parent-child relationships and the network model as allowing a record to have more than one parent. The document also discusses conceptual, logical, and physical data modeling and different levels of abstraction in data modeling from an external view to implementation details.

Uploaded by

Ram Rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Data Models

(Continued)
Samreen kazi

“The goal is to transform data into information, and information into insight”
Carly Fiorina
(Executive and president of Hewlett-Packard Co. in 1999. Chairwoman in 2000)
Exercise

What are building blocks of data


models?
Types of Data Models
• Data modeling and its types
• Hierarchical
• Network
• Relation Model
• Entity Relationship Model
• Object Oriented Model
Types of Data Models
Degree of Database Abstraction
If you ask 10 database designers what a data model is, you will end up with 10
different answers—depending on the degree of data abstraction. To illustrate the
meaning of data abstraction, consider the example of automotive design. A car
designer begins by drawing the concept of the car that is to be produced. Next,
engineers design the details that help transfer the basic concept into a structure
that can be produced. Finally, the engineering drawings are translated into
production specifications to be used on the factory floor. As you can see, the
process of producing the car begins at a high level of abstraction and proceeds to
an ever-increasing level of detail. The factory floor process cannot proceed unless
the engineering details are properly specified, and the engineering details cannot
exist without the basic conceptual framework created by the designer. Designing
a usable database follows the same basic process. That is, a database designer
starts with an abstract view of the overall data environment and adds details as
the design comes closer to implementation.
Data Abstraction Levels
Stages of Data Modeling
External Model
• The external model is the end users’ view of the data
environment. The term end users refers to people who use the
application programs to manipulate the data and generate
information.
• For example: A PROFESSOR may teach many Classes, and each
CLASS is taught by only one PROFESSOR; that is, there is a 1:M
relationship between PROFESSOR and CLASS.
• A CLASS may ENROLL many students, and each student may
ENROLL in many Classes, thus creating an M:N relationship
between STUDENT and CLASS. (You will learn about the precise
nature of the ENROLL entity in Chapter 4.)
• Each COURSE may generate many Classes, but each Class
references a single COURSE. For example, there may be several
classes (sections) of a database course having a course code of
CIS-420. One of those classes might be offered on MWF from 8:00
a.m. to 8:50 a.m., another might be offered on MWF from 1:00
p.m. to 1:50 p.m., while a third might be offered on Thursdays
from 6:00 p.m. to 8:40 p.m. Yet all three classes have the course
code CIS-420.
• Finally, a CLASS requires one ROOM, but a ROOM may be
scheduled for many Classes. That is, each classroom may be used
for several classes: one at 9:00 a.m., one at 11:00 a.m., and one at
1 p.m., for example. In other words, there is a 1:M relationship
between ROOM and CLASS.
Conceptual Model
• Having identified the external views, a
conceptual model is used, graphically
represented by an ERD (as in Figure 2.8), to
integrate all external views into a single view.
• The conceptual model represents a global view
of the entire database as viewed by the entire
organization. That is, the conceptual model
integrates all external views (entities,
relationships, constraints, and processes) into a
single global view of the data in the enterprise.
• Second, the conceptual model is independent
of both software and hardware. Software
independence means that the model does not
depend on the DBMS software used to
implement the model. Hardware independence
means that the model does not depend on the
hardware used in the implementation of the
model.
What Problems can occur during
conceptual data modeling?
Conceptual Data model
Excercise
Physical Model
• The physical model operates at the lowest level of abstraction,
describing the way data are saved on storage media such as disks or
tapes. The physical model requires the definition of both the physical
storage devices and the (physical) access methods required to reach
the data within those storage devices, making it both software- and
hardware dependent.
• The physical model is dependent on the DBMS, methods of accessing
files, and types of hardware storage devices supported by the
operating system. When you can change the physical model without
affecting the internal model, you have physical independence.
Exercise:
Looking at following table draw simple model
logical and conceptual model of your choice
Hierarchical Model
The hierarchical structure contains
levels, or segments. A segment is the
equivalent of a file system’s record
type. Within the hierarchy, a higher
layer is perceived as the parent of
the segment directly beneath it,
which is called the child. The
hierarchical model depicts a set of
one-to-many (1:M) relationships
between a parent and its children
segments. (Each parent can have
many children, but each child has
only one parent.)
Hierarchical Model
• In a hierarchical DBMS one data item is subordinate to another one. This is called
a parent-child relationship. The hierarchical data model organizes data in a tree-like
structure.
• One of the rules of a hierarchical database is that a parent can have multiple children,
but a child can only have one parent. For example, think of an online store that sells
many different products. The entire product catalog would be the parent, and the
various types of products, such as books, electronics, etc., would be the children. Each
type of product can have its own children categories. For example, books could be
broken up into fiction and non-fiction. Each of these categories can be broken up into
subcategories. You can continue like this by listing individual authors and then the
individual book titles.
• This is a rather simple way to represent data, but it is very efficient. This model works
best for data that is inherently hierarchical in nature. Many datasets cannot easily be
organized in this manner and require a more complex approach. For example, in the
case of the product catalog, what if a book falls into more than one category? Or, what
if one author has written several books but also published an audio CD of one of her
books? This is where the hierarchical model breaks down.
Network Model
• The network model was created
to represent complex data
relationships more effectively
than the hierarchical model, to
improve database performance,
and to impose a database
standard. Unlike the hierarchical
model, the network model
allows a record to have more
than one parent.
Network Model
• For example, consider an organization with an employee database.
For each employee, there are different pieces of data, such as their
name, address, telephone number, social security number and job
function. Different units in the organization need different levels of
access. For example, the human resources department needs to have
access to the social security information for each employee so they
can take care of tax deductions and set up benefits. This is somewhat
sensitive information, so other departments do not need access to
this part of the database. All the pieces of data are connected in a
network that implements these rules.
• While conceptually relatively simple, this database structure can
quickly become very complicated.
Network Database
• While the network database model is generally not used today, the
definitions of standard database concepts that emerged with the network
model are still used by modern data models. Some important concepts
that were defined at this time are:
• The schema, which is the conceptual organization of the entire database as viewed
by the database administrator.
• The subschema, which defines the portion of the database “seen” by the application
programs that actually produce the desired information from the data contained
within the database.
• A data management/manipulation language (DML), which defines the environment
in which data can be managed and to work with the data in the database.
• A schema data definition language (DDL), which enables the database administrator
to define the schema components.
Network Database

You might also like