0% found this document useful (0 votes)
16 views22 pages

Understanding Data Models in Databases

The document provides an overview of database models, including hierarchical, network, relational, and object-oriented models, highlighting their features and components. It discusses the importance of data modeling, the basic building blocks of data models, and the role of a Database Management System (DBMS) in managing data. Additionally, it compares file systems to DBMS, emphasizing the advantages of using a DBMS for data storage, integrity, and management.

Uploaded by

maturay345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views22 pages

Understanding Data Models in Databases

The document provides an overview of database models, including hierarchical, network, relational, and object-oriented models, highlighting their features and components. It discusses the importance of data modeling, the basic building blocks of data models, and the role of a Database Management System (DBMS) in managing data. Additionally, it compares file systems to DBMS, emphasizing the advantages of using a DBMS for data storage, integrity, and management.

Uploaded by

maturay345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

LECTURE WEEK II

Department of Course Title:


CS, BIT, DS, Database
BAM & ACF Management
Year Two (2) System
TOPICS 2:
Database Models and DBMS

 Overview of database models: Hierarchical, Network, Relational, and Object-Oriented


 Features of relational databases
 Components of DBMS: storage, query processor, etc.
 Comparison: File systems vs. DBMS
Overview of database models: Hierarchical,
Network, Relational, and Object-Oriented
Overview of database models

Data modeling, the first step in designing a database, refers to the process of creating a specific
data model for a determined problem domain.

•(A problem domain is a clearly defined area within the real-world environment, with a well-
defined scope and boundaries that will be systematically addressed.)

•A data model is a relatively simple representation, usually graphical, of more complex real-
world data structures.

•In general terms, a model is an abstraction of a more complex real-world object or event.

•A model’s main function is to help you understand the complexities of the real-world
environment.

Within the database environment, a data model represents data structures and their
characteristics, relations, constraints, transformations, and other constructs with the purpose of
supporting a specific problem domain.
Data Modelling: The process of creating a specific data model for a
determined problem domain.

Data model: A representation, usually graphic, of a complex “real-


world” data structure. Data models are used in the database
design phase of the Database Life Cycle.

Overview of
Note: The terms data model and database model are often used
interchangeably. In this context, the term database model is used
to refer to the implementation of a data model in a specific
database database system.

An implementation-ready data model should contain at least the


models following components:

Cont.……… • A description of the data structure that will store the end-user
data

• A set of enforceable rules to guarantee the integrity of the data

• A data manipulation methodology to support the real-world data


transformations
Overview of database models Cont.
………
The Importance of Data Models:

•Data models can facilitate interaction among the designer, the applications
programmer, and the end user.

•A well-developed data model can even foster improved understanding of the


organization for which the database design is developed. In short, data models are a
communication tool.

•The importance of data modeling cannot be overstated.

•Data constitutes the most basic information employed by a system.

•Applications are created to manage data and to help transform data into information,
but data is viewed in different ways by different people.

•For example, contrast the view of a company manager with that of a company clerk.

•Although both work for the same company, the manager is more likely to have an
enterprise-wide view of company data than the clerk.
Overview of database
models Cont.………
Data Model Basic Building Blocks

•The basic building blocks of all data models are entities,


attributes, relationships, and constraints.

•An Entity is a person, place, thing, or event about which


data will be collected and stored.

•An entity represents a particular type of object in the real


world, which means an entity is “distinguishable”—that is,
each entity occurrence is unique and distinct.

•For example, a CUSTOMER entity would have many


distinguishable customer occurrences, such as John Smith,
Pedro Dinamita, and Tom Strickland. Entities may be
physical objects, such as customers or products, but entities
may also be abstractions, such as flight routes or musical
concerts.
Overview of database models Cont.
………
An attribute is a characteristic of an entity.
For example, a CUSTOMER entity would be
Data Model Basic Attributes are the
described by attributes such as customer last
Building Blocks cont. equivalent of fields in
name, customer first name, customer phone
…… file systems.
number, customer address, and customer
credit limit.

For example, a relationship exists


A Relationship between customers and agents that
describes an can be described as follows: an
association among agent can serve many customers,
entities. and each customer may be served
by one agent.

Data models use three types of


(Although the M:N notation is a standard
relationships: one-to-many, many-
label for the many-to-many relationship, the
to-many, and one-to-one. Database
label M:M may also be used.) The following
designers usually use the shorthand
examples illustrate the distinctions among
notations 1:M or 1..*, M:N or *..*,
the three relationships.
and 1:1 or 1..1, respectively.
Overview of
database models
Cont.………
A Constraint is a restriction placed
Data Model
on the data. Constraints are
Basic Building
important because they help to
Blocks cont.……
ensure data integrity.

• An employee’s
Constraints are
salary must have • A student’s GPA
normally
values that are must be between
expressed in the
between 6,000 0.00 and 5.00.
form of rules:
and 350,000.

• Each class must


have one and only
one teacher.
Hierarchical, Network, Relational, and
Object-Oriented

These models represent


schools of thought as to
what a data base is, what it
should do, the types of
structures that it should
employ, and the technology
that would be used to
implement these structures.
Hierarchical, Network, Relational,
and Object-Oriented Cont.……….
The hierarchical model was
developed in the 1960s to The model’s basic logical
manage large amounts of structure is represented by
Hierarchical and Network data for complex an upside-down tree. The
Models: manufacturing projects, hierarchical structure
such as the Apollo rocket contains levels, or
that landed on the moon in segments.
1969.

The network model was


created to represent
complex data relationships In the network model, the
A segment is the equivalent
more effectively than the user perceives the network
of a file system’s record
hierarchical model, to database as a collection of
type.
improve database records in 1:M relationships.
performance, and to impose
a database standard.

However, unlike the


hierarchical model, the
network model allows a
record to have more than
one parent.
Hierarchical, Network, Relational,
and Object-Oriented Cont.……….

Relational Model

Developed by E. F. Codd of IBM in 1970, the relational model is based on


mathematical set theory and represents data as independent relations.

•Each relation (table) is conceptually represented as a two-dimensional


structure of intersecting rows and columns.

•The relations are related to each other through the sharing of common
entity characteristics (values in columns).

•Table (relation): A logical construct perceived to be a two-dimensional


structure composed of intersecting rows (entities) and columns (attributes)
that represents an entity set in the relational model.
Hierarchical, Network, Relational, and
Object-Oriented Cont.……….
Relational database management
system (RDBMs): A collection of
programs that manages a relational
database.

The RDBMS software translates a user’s


logical requests (queries) into
commands that physically locate and
retrieve the requested data.

A graphical representation of a
relational database’s entities, the
attributes within those entities, and the
relationships among the entities is
shown on the right.
Hierarchical, Network,
Relational, and Object-
Oriented Cont.……….
The Entity
The conceptual simplicity of relational database
Relationship
technology triggered the demand for RDBMSs.
Model:

In turn, the rapidly increasing requirements for transaction and information created
the need for more complex database implementation structures, thus creating the
need for more effective database design tools.

(Building a skyscraper requires more Thus, the entity relationship (er) model, or
detailed design activities than building erM, has become a widely accepted standard
a doghouse, for example.) for data modeling.

Peter Chen first introduced the ER data model in 1976; the graphical representation
of entities and their relationships in a database structure quickly became popular
because it complemented the relational data model concepts.
Hierarchical, Network, Relational,
and Object-Oriented Cont.……….

Entity Relationship (ER)


model (ERM): A data
Entity Relationship Diagram
model that describes
(ERD): A diagram that depicts an
relationships (1:1, 1:M, and
entity relationship model’s
M:N) among entities at the
entities, attributes, and relations.
conceptual level with the
help of ER diagrams.

Connectivity: The
Entity instance
Entity set: A type of relationship
(entity occurrence):
collection of like between entities.
A row in a relational
entities. Classifications include
table.
1:1, 1:M, and M:N.
Hierarchical,
Network, Relational,
and Object-Oriented
Cont.……….
Chen notation Crow’s foot notation
entity relationship (ER) model. A
representation of the entity
relationship diagram that uses a three-
pronged symbol to represent the
“many” sides of the relationship.

Class Diagram Notation: The set of


symbols used in the creation of class
diagrams
The Object-Oriented Model:

Hierarchical, An OODM reflects a very different way to define and use


entities.

Network,
Relational, Like the relational model’s entity, an object is described
by its factual content.
and Object-
Oriented But, quite unlike an entity, an object includes
information about relationships between the facts within

Cont.………. the object, as well as information about its relationships


with other objects.

Therefore, the facts within the object are given greater


meaning.
Hierarchical, Network, Relational, and
Object-Oriented Cont.……….
The OO data model is based on the
following components:

An object is an abstraction of a real-world


entity. In general terms, an object may be
considered equivalent to an ER model’s
entity.

Attributes describe the properties of an


object. For example, a PERSON object
includes the attributes Name, Social
Security Number, and Date of Birth.

Objects that share similar characteristics


are grouped in classes. A class is a
collection of similar objects with shared
structure (attributes) and behavior
(methods).
Features of Relational Databases
A relational Tables as
database Data Integrity:
Relations:
organizes data It relies on relational
Features of a
into one or more theory and uses
Relational
tables (relations), Structured Query
Databases
each containing Language (SQL) for data
includes: Primary
rows (records) and management.
columns Data is stored Key: Ensures
(attributes). in structured each record in
tables. a table is
unique.

Each table Foreign Key:


has a unique Links tables,
name and ensuring
represents an referential
entity. integrity.

Constraints:
Enforce rules,
e.g., NOT
NULL,
UNIQUE.
Features of Relational Databases
Cont.……

Data Redundancy ACID Properties: Data Flexibility with Scalability and


Reduction: Independence: Queries: Security:
Normalization Atomicity: Logical and physical SQL enables complex Supports large-scale
eliminates duplicate Transactions are all- data structures are data retrieval and data with
data, improving or-nothing. separate, simplifying manipulation. mechanisms for
efficiency. Consistency: management and access control and
Database remains in updates. user authentication.
a valid state.
Isolation:
Transactions do not
interfere.
Durability: Changes
persist after a
transaction.
Components of a
DBMS
A Database Components include: Storage Manager: Query Processor:
Management System
(DBMS) is a software
system for storing,
retrieving, and
managing data Handles data storage, Translates user queries
efficiently. retrieval, and updating into low-level instructions
on physical storage for database access.
devices. Components:
• DDL Compiler:
Manages data files, Processes schema
indexes, and log files. definitions.

• DML Compiler:
Includes subsystems like Converts queries into
file management and execution plans.
buffer management. • Query Optimizer:
Determines the most
efficient query
execution strategy.
Components of a DBMS Cont.…….

Transaction Database Engine: Metadata User Interface: Backup and


Manager: Manager: Recovery:
Ensures ACID Executes low-level Maintains schema Provides tools and Ensures data can
properties in commands for and other data interfaces (e.g., be restored after
concurrent CRUD (Create, definitions command-line, GUI) failures.
transactions. Read, Update, (metadata). for database
Handles locks, Delete) operations. interaction.
recovery, and
transaction logs.
Comparison: File Systems vs.
DBMS
Aspect File Systems DBMS
Data Storage Data stored in flat files, requiring manual Data organized in tables with relations and
structuring. constraints.
Redundancy High due to independent file storage. Reduced via normalization and schema
design.
Data Access Manual file operations (read/write). SQL queries enable efficient data access and
management.
Integrity No built-in integrity checks. Enforces integrity with primary/foreign keys
and constraints.
Concurrency Poor support for simultaneous access. Manages concurrent transactions with ACID
compliance.
Security Minimal security features. Advanced user authentication and access
control.
Scalability Limited by file system capacity. Supports large-scale, distributed databases.
Backup/ Manual processes for data recovery. Automated backup and recovery
Recovery mechanisms.
Query Capability Requires custom programs for data Provides a query language like SQL for data
access. manipulation.
QUESTIONS
AND END OF
ANSWERS PRESNTATION

THANK YOU

You might also like