Introduction to Data Models
-Hierarchical Model
-Network Model
-Relational Model
-Client/Server Architecture
Introduction to Distributed Database
Classification of DBMS
2. Data Base Management System
Unit - 2
Database Models
Date:
Presented By:
Rubal Sagwal
Department of Computer Engineering
2Rubal
3. Contents
• Introduction to Data Models
• Hierarchical Model
• Network Model
• Relational Model
• Client/Server Architecture
• Introduction to Distributed Database
• Classification of DBMS
3
5. Introduction
• A database can be modeled as:
• A collection of entities,
• Relationship among entities.
• An entity is an object that exists and is
distinguishable from other objects.
• Example: specific person, company, event, plant
5
6. Importance of Data Models
• It has relatively simple representations, usually
graphical, of complex real-world data structures.
• It facilitate interaction among the designer, the
applications programmer, and the end user.
• End-users have different views and needs for data
• Data model organizes data for various user.
6
7. Business Rules
• Brief, precise, and unambiguous descriptions of a
policies, procedures, or principles within a specific
organization.
• Apply to any organization that stores and uses data
to generate information.
• Description of operations that help to create and
enforce actions within that organization’s
environment.
7
8. Contd…
Business Rules
• Must be rendered in writing
• Must be kept up to date
• Sometimes are external to the organization
• Must be easy to understand and widely
disseminated
• Describe characteristics of the data as viewed by
the company
8
9. Contd…
Discovering Business Rules
• Generally, nouns translate into entities
• Verbs translate into relationships among entities
• Relationships are bi-directional
9
10. Data Models Helps In
• Standardize company’s view of data
• Constitute a communications tool between users
and designers
• Allow designer to understand the nature, role, and
scope of data
• Allow designer to understand business processes
• Allow designer to develop appropriate relationship
participation rules and constraints
• Promote creation of an accurate data model
10
11. Basic Building Blocks of Data Models
• Entity - anything about which data are to be
collected and stored
• Attribute - a characteristic of an entity
• Relationship - describes an association among
entities
• One-to-many (1:M) relationship
• Many-to-many (M:N or M:M) relationship
• One-to-one (1:1) relationship
• Constraint - a restriction placed on the data
11
12. Basic Building Blocks of Data Models
• Generally, nouns translate into entities
• Verbs translate into relationships among entities
• Relationships are bi-directional
12
13. Types of Data Models
1. Hierarchical Model
2. Network Model
3. Relational Model
13
16. Hierarchical Model
16
• This database model organizes data into a tree-
like-structure, with a single root, to which all the
other data is linked.
• The hierarchy starts from the Root data, and
expands like a tree, adding child nodes to the
parent nodes.
• In this model, a child node will only have a single
parent node.
• This model efficiently describes many real-world
relationships like index of a book.
17. Hierarchical Model
17
• In hierarchical model, data is organised into tree-like
structure with one one-to-many (1:M) relationship
between two different types of data,
• For example
• One department can have many courses, many professors
and many students.
• Each parent can have many children, each child has only one
parent.
• This model was primarily used by IBM’s Information
Management Systems in the 60s and 70s, but they are
rarely seen today due to certain operational
inefficiencies.
19. Hierarchical Model
19
• Advantages:
• Conceptual simplicity
• Data independence
• Efficiency dealing with a large database
• Disadvantages:
• Complex implementation
• Difficult to manage and lack of standards
• Lacks structural independence
• Applications programming and use complexity
• Implementation limitations (no M:N relationship)
21. Network Model
21
• The network model has greater flexibility than the
hierarchical model for handling complex spatial
relationships.
• Objective of network model is to separate data
structure from physical storage, eliminate unnecessary
duplication of data with associated errors and costs.
• The Network Database Model was created for three
main purposes :
• representing a complex data relationship more effectively
• improving database performance
• imposing a database standard
23. Network Model
• Resembles hierarchical model
• Collection of records in 1:M relationships
• Consist of:
• Relationship
• Composed of at least two record types
• Owner
• Equivalent to the hierarchical model’s parent
• Member
• Equivalent to the hierarchical model’s child
23
24. Network Model
• Major characteristic of this database model is that
it comprises of at least two record types ; the
owner & the member.
• An owner is a record type equivalent to the parent
type in the hierarchal database model, and the
member record type resembles the child type in
the hierarchal model.
• The network model contains logical information
such as connectivity relationships among nodes
and links, directions of links
24
25. Network Model – Key Terms
• A node represents an object.
• A link represents a relationship between two
nodes. Within a directed network, any link can be
bidirected (that is, able to be traversed either from
the start node to the end node or from the end
node to the start node) or undirected (that is, able
to be traversed only from the start node to the end
node).
• A path is an alternating sequence of nodes and
links, beginning and ending with nodes.
25
26. Network Model – Network Hierarchy
• A network hierarchy enables us to represent a network
with multiple levels of abstraction by assigning a
hierarchy level to each node.
• Nodes at adjacent levels of a network hierarchy have
parent-child relationships.
• Each node at the higher level can be the parent node
for one or more nodes at the lower level.
• Each node at the lower level can be a child node of one
node at the higher level.
• Sibling nodes are nodes that have the same parent
node.
26
27. Network Model
• Advantages:
• Simplicity : The network model is conceptually simple
and easy to design.
• Ability to handle more relationship types : The network
model can handle the one-to-many and many-to-many
relationships.
• Ease of data access
• Disadvantages:
• System Complexity : The structure of the network model
is very difficult to change. This type of system is very
comple.
27
29. Relational Model
• In this model, data is organized in two-
dimensional tables and the relationship is maintained
by storing a common field.
• This model was introduced by E.F Codd in 1970, and
since then it has been the most widely used database
model, infact, we can say the only database model used
around the world.
• The basic structure of data in the relational model is
tables. All the information related to a particular type is
stored in rows of that table.
• Hence, tables are also known as relations in relational
model.
29
31. Relational Model
31
• Relation (file, table) is a two-dimensional table.
• Attribute (i.e. field or data item) is a column in the
table.
• Each column in the table has a unique name within that
table.
• Each column is homogeneous. Thus the entries in any
column are all of the same type (e.g. age, name,
employee-number, etc).
• Each column has a domain, the set of possible values
that can appear in that column.
• A Tuple (i.e. record) is a row in the table.
33. Client-Server Architecture
• The client/server architecture was developed to
deal with computing environments in which a large
number of PCs, workstations, file servers, printers,
data base servers, Web servers, e-mail servers, and
other software and equipment are connected via a
network.
• The idea is to define specialized servers with
specific functionalities.
33
34. Client-Server Architecture
• For example, it is possible to connect a number of
PCs or small workstations as clients to a file server
that maintains the files of the client machines.
Another machine can be designated as a printer
server by being connected to various printers; all
print requests by the clients are forwarded to this
machine.
34
35. Client-Server Architecture
• A client – in this framework is typically a user machine
that provides user interface capabilities and local
processing.
• When a client requires access to additional functionality—
such as database access—that does not exist at that machine,
it connects to a server that provides the needed functionality.
• A server – is a system containing both hardware and
software that can provide services to the client
machines, such as file access, printing, archiving, or
database access.
• In general, some machines install only client software, others
only server software, and still others may include both client
and server software,
35
38. Distributed Database
• In a distributed database system, the database is
stored on several computers.
• The computers in a distributed system
communicate with one another through various
communication media, such as high-speed
networks or telephone lines.
• They do not share main memory or disks. The
computers in a distributed system may vary in size
and function.
38
40. Distributed Database
40
• A distributed database is basically a database that
is not limited to one system, it is spread over
different sites, i.e, on multiple computers or over a
network of computers.
• A distributed database system is located on various
sited that don’t share physical components. This
maybe required when a particular database needs
to be accessed by various users globally.
41. Distributed Database System
41
• Sharing data: The major advantage inbuilding a distributed
database system is the provision of an environment where
users at one site may be able to access the data residing at
other sites. For instance, in a distributed banking system,
where each branch stores data related to that branch, it is
possible for a user in one branch to access data in another
branch.
• Availability: If one site fails in a distributed system, the
remaining sites may be able to continue operating. In
particular, if data items are replicated in several sites, a
transaction needing a particular data item may find that
item in any of several sites. Thus, the failure of a site does
not necessarily imply the shutdown of the system.
• Data Recover is easy.
43. Object Oriented Data Model
43
• A data model is a logic organization of the real
world objects (entities), constraints on them, and
the relationships among objects.
• A core object-oriented data model consists of the
following basic object-oriented concepts:
1. object and object identifier: Any real world entity
is uniformly modeled as an object (associated with a
unique id: used to pinpoint an object to retrieve).
44. Object Oriented Data Model
44
2. Attributes and methods: every object has a state (the
set of values for the attributes of the object) and a
behavior (the set of methods - program code - which
operate on the state of the object). The state and
behavior encapsulated in an object are accessed or
invoked from outside the object only through explicit
message passing.
3. class: a means of grouping all the objects which share
the same set of attributes and methods. An object must
belong to only one class as an instance of that class
(instance-of relationship). A class is similar to an abstract
data type. A class may also be primitive (no attributes),
e.g., integer, string, Boolean.
45. Object Oriented Data Model
45
4. Class hierarchy and inheritance: derive a
new class (subclass) from an existing class
(superclass). The subclass inherits all the attributes
and methods of the existing class and may have
additional attributes and methods. single inheritance
(class hierarchy) vs. multiple inheritance (class
lattice).