Title: Database Models
1Database Models
2Learning Objectives
- What database models exist
- Hierarchical database model
- Network database model
- Relational database model
- Entity-Relationship database model
- Object-oriented database model
- What is the evolution of database models
3DBMS Functions
- Data dictionary management
- Data storage management
- Data transformation and presentation
- Security management
- Multiuser access control
- Backup and recovery management
- Data integrity management
- Database access language and application
programming interfaces Data Definition
Language (DDL) and Data Manipulation Language
(DML) - Database communication interfaces
4Database Modeling
- A model is an abstraction of the real world, or
of part of the real world. - To develop database systems, we will
- First build a model of the application domain
- Then build a design for the application
- Then implement the design
- Spending time on the modeling and design aspects
of the process saves time later on.
5Database Models
- Collection of logical constructs used to
represent data structure and relationships within
the database - Conceptual models logical nature of data
representation - Implementation models emphasis on how the data
are represented in the database
6Database Models
- Types of database models
- Conceptual database models represent the
entities objects and relationships in the
application domain - E-R
- Object Oriented (UML)
- Semantic
- Implementation database models represent the
software application entities objects and
relationships - Hierarchical
- Network
- Relational
7Database Models (cont.)
- Relationships in Conceptual Models
- One-to-one (11) Ex Manager/Store
- One-to-many (1M) Ex Agent/Customer
- Many-to-many (MN) Ex Course/Student
- Implementation Database Models
- Hierarchical
- Network
- Relational
8The DBMS Marketplace
- Relational DBMS companies Oracle, Sybase are
among the largest software companies in the
world. - IBM offers its relational DB2 system. With IMS,
a nonrelational system, IBM is by some accounts
the largest DBMS vendor in the world. - Microsoft offers SQL-Server, plus Microsoft
Access for the cheap DBMS on the desktop,
answered by lite systems from other
competitors. - Relational companies also challenged by
object-oriented DB companies. - But countered with object-relational systems,
which retain the relational core while allowing
type extension as in OO systems.
9Hierarchical Database Model
- History
- North American Rockwell developed GUAM
(Generalized Update Access Method) - Mid 1960s Rockwell partner with IBM to create
Information Management System (IMS) - IMS DB/DC lead the mainframe database market in
70s and early 80s - Represents well hoe components are decomposed
into parts
10Hierarchical Database Model
- Logically represented by an upside down tree
- Each parent can have many children
- Each child has only one parent
Figure 1.8
11Hierarchical Database Model
- Advantages
- Conceptual simplicity
- Database security and integrity
- Data independence
- Efficiency
- Disadvantages
- Complex implementation
- Difficult to manage and lack of standards
- Lacks structural independence
- Applications programming and use complexity
- Implementation limitations (no MN relationship)
12Network Database Model
- History
- CODASYL (Conference on Data Systems Languages)
created a group to work on standardization of
databases Database Task Group (DBTG) - Identified 3 database component
- Network schema (database organization)
- Subschema (views of database per user)
- Data management language
13Network Database Model
- Each record can have multiple parents
- Composed of sets - relationships
- Each set has owner record and member record
- Member may have several owners
- A set represents a 1M relationship between the
owner and the member
Figure 1.10
14Network Database Model
- Advantages
- Conceptual simplicity
- Handles more relationship types
- Data access flexibility
- Promotes database integrity
- Data independence
- Conformance to standards
- Disadvantages
- System complexity
- Lack of structural independence
15Relational Database Model
- First developed by E.F. Codd (IBM) in 1970
- First deployed on mainframe computers (DB2), then
also personal computers - Oracle, Informix, SQL server, DB2
16Relational Database Model
- Perceived by user as a collection of tables for
data storage - Tables are a series of row/column intersections
(a row corresponds to a record, a column to a
field) - Tables related by sharing common entity
characteristic(s) - RDBMS
17Relational Database Model (cont.)
Figure 1.11
18Relational Database Model
- Advantages
- Structural independence
- Improved conceptual simplicity
- Easier database design, implementation,
management, and use - Ad hoc query capability with SQL
- Powerful database management system
19Relational Database Model
- Disadvantages
- Substantial hardware and system software overhead
- Poor design and implementation is made easy
- May promote islands of information problems
20Entity Relationship Database Model
- Complements the relational data model concepts
- Represented in an entity relationship diagram
(ERD) - Based on entities, attributes, and relationships
Figure 1.13
21Entity Relationship Database Model
- Chens model
- Crows Foot model
22Entity/Relationship Model
- Diagrams to represent conceptual models and
designs - Entity like object, thing.
- Entity set like class set of similar
entities/objects. - Attribute property of entities in an entity
set, similar to fields of a struct. - In diagrams, entity set ? rectangleattribute ?
oval.
name
phone
ID
Students
height
23Relationships
- Connect two or more entity sets.
- Represented by diamonds.
Taking
Students
Courses
24Summary of Symbols Used in E-R Notation
25Summary of Symbols (Cont.)
26Alternative E-R Notations
27Relationship Set
- Think of the value of a relationship set as a
table. - One column for each of the connected entity sets.
- One row for each list of entities, one from each
set, that are connected by the relationship. - Students Courses
- Sally CS180
- Sally CS111
- Joe CS180
-
28Multiway Relationships
- Usually binary relationships (connecting two
E.S.) suffice. - However, there are some cases where three or more
E.S. must be connected by one relationship. - Example relationship among students, courses,
TA's (and graders). - Possibly, this E/R diagram is OK
Taking
Students
Courses
Assisting
TA/Graders
29Entity Relationship Database Model
- Advantages
- Exceptional conceptual simplicity
- Visual representation
- Effective communication tool
- Integrated with the relational database model
- Disadvantages
- Limited constraint representation
- Limited relationship representation
- No data manipulation language
- Loss of information content
30Object-Oriented Database Model
- Objects or abstractions of real-world entities
are stored - Attributes describe properties
- Collection of similar objects is a class
- Methods represent real world actions of classes
- Classes are organized in a class hierarchy
- Inheritance is ability of object to inherit
attributes and methods of classes above it
31OO Data Model
- Advantages
- Adds semantic content
- Visual presentation includes semantic content
- Database integrity
- Both structural and data independence
- Disadvantages
- Lack of OODM
- Complex navigational data access
- Steep learning curve
- High system overhead slows transactions
32Database Models and the Internet
- Characteristics of Internet age databases
- Flexible, efficient, and secure Internet access
- Easily used, developed, and supported
- Supports complex data types and relationships
- Seamless interfaces with multiple data sources
and structures - Simplicity of conceptual database model
- Many database design, implementation, and
application development tools - Powerful DBMS GUI make DBA job easier
3360s 70's 80's 90s now
Hierarchical
Network
Relational
Choice for most new applications
Object Bases
Knowledge Bases