You are on page 1of 6

8/30/2018

Data Models
 Data Model: A set of concepts to describe the
Database System structure of a database, and certain constraints
that the database should obey.
Concepts and  Data Model Operations: Operations for
Architecture specifying database retrievals and updates by
referring to the concepts of the data model.
Operations on the data model may include basic
operations and user-defined operations.

Copyright © 2004 Pearson Education, Inc. Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-2

Categories of data models History of Data Models


 Relational Model: proposed in 1970 by E.F. Codd (IBM),
first commercial system in 1981-82. Now in several
 Conceptual (high-level, semantic) data models: commercial products (DB2, ORACLE, SQL Server,
Provide concepts that are close to the way many SYBASE, INFORMIX).
users perceive data. (Also called entity-based or Network Model: the first one to be implemented by
object-based data models.) Honeywell in 1964-65 (IDS System). Adopted heavily
 Physical (low-level, internal) data models: due to the support by CODASYL (CODASYL - DBTG
report of 1971). Later implemented in a large variety of
Provide concepts that describe details of how data systems - IDMS (Cullinet - now CA), DMS 1100 (Unisys),
is stored in the computer. IMAGE (H.P.), VAX -DBMS (Digital Equipment Corp.).
 Implementation (representational) data models:  Hierarchical Data Model: implemented in a joint effort by
Provide concepts that fall between the above two, IBM and North American Rockwell around 1965. Resulted
balancing user views with some computer storage in the IMS family of systems. The most popular model.
Other system based on this model: System 2k (SAS inc.)
details.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-3 Copyright © 2004 Pearson Education, Inc.
Slide 2-4

History of Data Models Hierarchical Model


 Object-oriented Data Model(s): several models have been • ADVANTAGES:
proposed for implementing in a database system. One set • Hierarchical Model is simple to construct and operate on
comprises models of persistent O-O Programming • Corresponds to a number of natural hierarchically organized
Languages such as C++ (e.g., in OBJECTSTORE or domains - e.g., assemblies in manufacturing, personnel
VERSANT), and Smalltalk (e.g., in GEMSTONE). organization in companies
Additionally, systems like O2, ORION (at MCC - then • Language is simple; uses constructs like GET, GET
ITASCA), IRIS (at H.P.- used in Open OODB). UNIQUE, GET NEXT, GET NEXT WITHIN PARENT etc.
 Object-Relational Models: Most Recent Trend. Started • DISADVANTAGES:
with Informix Universal Server. Exemplified in the latest • Navigational and procedural nature of processing
versions of Oracle-10i, DB2, and SQL Server etc. systems. • Database is visualized as a linear arrangement of records
• Little scope for "query optimization"
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-5 Copyright © 2004 Pearson Education, Inc.
Slide 2-6

1
8/30/2018

Network Model Schemas versus Instances


• ADVANTAGES:
• Database Schema: The description of a database.
• Network Model is able to model complex relationships and
represents semantics of add/delete on the relationships. Includes descriptions of the database structure and
• Can handle most situations for modeling using record types
the constraints that should hold on the database.
and relationship types. • Schema Diagram: A diagrammatic display of
• Language is navigational; uses constructs like FIND, FIND (some aspects of) a database schema.
member, FIND owner, FIND NEXT within set, GET etc. • Schema Construct: A component of the schema
Programmers can do optimal navigation through the database. or an object within the schema, e.g., STUDENT,
• DISADVANTAGES: COURSE.
• Navigational and procedural nature of processing • Database Instance: The actual data stored in a
• Database contains a complex array of pointers that thread database at a particular moment in time. Also
through a set of records.
Little scope for automated "query optimization”
called database state (or occurrence).
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-7 Copyright © 2004 Pearson Education, Inc.
Slide 2-8

Database Schema Vs.


Three-Schema Architecture
Database State
• Database State: Refers to the content of a database • Proposed to support DBMS characteristics
at a moment in time.
of:
• Initial Database State: Refers to the database when
it is loaded • Program-data independence.
• Valid State: A state that satisfies the structure and • Support of multiple views of the data.
constraints of the database.
• Distinction
• The database schema changes very infrequently. The
database state changes every time the database is updated.
• Schema is also called intension, whereas state is called
extension.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-9 Copyright © 2004 Pearson Education, Inc.
Slide 2-10

Three-Schema Architecture Three-Schema Architecture


• Defines DBMS schemas at three levels: Mappings among schema levels are needed
• Internal schema at the internal level to describe
physical storage structures and access paths. Typically
to transform requests and data. Programs
uses a physical data model. refer to an external schema, and are mapped
• Conceptual schema at the conceptual level to describe by the DBMS to the internal schema for
the structure and constraints for the whole database for
a community of users. Uses a conceptual or an execution.
implementation data model.
• External schemas at the external level to describe the
various user views. Usually uses the same data model
as the conceptual level.

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-11 Copyright © 2004 Pearson Education, Inc.
Slide 2-12

2
8/30/2018

Data Independence Data Independence


• Logical Data Independence: The capacity When a schema at a lower level is changed,
to change the conceptual schema without only the mappings between this schema
having to change the external schemas and and higher-level schemas need to be
their application programs. changed in a DBMS that fully supports data
• Physical Data Independence: The capacity independence. The higher-level schemas
to change the internal schema without themselves are unchanged. Hence, the
having to change the conceptual schema. application programs need not be changed
since they refer to the external schemas.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-13 Copyright © 2004 Pearson Education, Inc.
Slide 2-14

DBMS Languages DBMS Languages


• Data Definition Language (DDL): Used by the • Data Manipulation Language (DML):
DBA and database designers to specify the Used to specify database retrievals and
conceptual schema of a database. In many updates.
DBMSs, the DDL is also used to define internal • DML commands (data sublanguage) can be
and external schemas (views). In some DBMSs, embedded in a general-purpose programming
separate storage definition language (SDL) and language (host language), such as COBOL, C
view definition language (VDL) are used to or an Assembly Language.
define internal and external schemas. • Alternatively, stand-alone DML commands can
be applied directly (query language).

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-15 Copyright © 2004 Pearson Education, Inc.
Slide 2-16

DBMS Languages DBMS Interfaces


• Stand-alone query language interfaces.
• High Level or Non-procedural • Programmer interfaces for embedding DML in
Languages: e.g., SQL, are set-oriented and programming languages:
specify what data to retrieve than how to • Pre-compiler Approach
retrieve. Also called declarative languages. • Procedure (Subroutine) Call Approach
• User-friendly interfaces:
• Low Level or Procedural Languages: • Menu-based, popular for browsing on the web
record-at-a-time; they specify how to • Forms-based, designed for naïve users
retrieve data and include constructs such as • Graphics-based (Point and Click, Drag and Drop etc.)
looping. • Natural language: requests in written English
• Combinations of the above
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-17 Copyright © 2004 Pearson Education, Inc.
Slide 2-18

3
8/30/2018

Other DBMS Interfaces Database System Utilities


• Speech as Input (?) and Output • To perform certain functions such as:
• Web Browser as an interface • Loading data stored in files into a database. Includes
data conversion tools.
• Parametric interfaces (e.g., bank tellers) using
• Backing up the database periodically on tape.
function keys.
• Reorganizing database file structures.
• Interfaces for the DBA: • Report generation utilities.
• Creating accounts, granting authorizations
• Performance monitoring utilities.
• Setting system parameters
• Other functions, such as sorting, user monitoring, data
• Changing schemas or access path compression, etc.

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-19 Copyright © 2004 Pearson Education, Inc.
Slide 2-20

Centralized and Client-Server


Other Tools
Architectures
• Data dictionary / repository: • Centralized DBMS: combines everything
• Used to store schema descriptions and other information such
as design decisions, application program descriptions, user
into single system including- DBMS
information, usage standards, etc. software, hardware, application programs
• Active data dictionary is accessed by DBMS software and
users/DBA.
and user interface processing software.
• Passive data dictionary is accessed by users/DBA only.
• Application Development Environments and CASE
(computer-aided software engineering) tools:
• Examples – Power builder (Sybase), Builder (Borland)

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-21 Copyright © 2004 Pearson Education, Inc.
Slide 2-22

Centralized and Client-Server Architectures


Basic Client-Server
Architectures
• Specialized Servers with Specialized
functions
• Clients
• DBMS Server

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-23 Copyright © 2004 Pearson Education, Inc.
Slide 2-24

4
8/30/2018

Specialized Servers with


Clients:
Specialized functions:
• File Servers • Provide appropriate interfaces and a client-version
of the system to access and utilize the server
• Printer Servers resources.
• Web Servers • Clients maybe diskless machines or PCs or
Workstations with disks with only the client
• E-mail Servers software installed.
• Connected to the servers via some form of a
network.
(LAN: local area network, wireless network,
etc.)
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-25 Copyright © 2004 Pearson Education, Inc.
Slide 2-26

Two Tier Client-Server


DBMS Server
Architecture
• Provides database query and transaction • User Interface Programs and Application
services to the clients Programs run on the client side
• Sometimes called query and transaction • Interface called ODBC (Open Database
servers Connectivity – Details in Ch 9) provides an
Application program interface (API) allow
client side programs to call the DBMS.
Most DBMS vendors provide ODBC
drivers.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-27 Copyright © 2004 Pearson Education, Inc.
Slide 2-28

Two Tier Client-Server Two Tier Client-Server


Architecture Architecture
• A client program may connect to several DBMSs. • Logical two-tier Client-Server Architecture
• Other variations of clients are possible: e.g., in
some DBMSs, more functionality is transferred to
clients including data dictionary functions,
optimization and recovery across multiple servers,
etc. In such situations the server may be called the
Data Server.

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-29 Copyright © 2004 Pearson Education, Inc.
Slide 2-30

5
8/30/2018

Two Tier Client-Server Three Tier Client-Server


Architecture Architecture
• Physical two-tier Client-Server Architecture

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-31 Copyright © 2004 Pearson Education, Inc.
Slide 2-32

Three Tier Client-Server


Classification of DBMSs
Architecture
• Common for Web applications • Based on the data model used:
• Intermediate Layer called Application Server or • Traditional: Relational, Network, Hierarchical.
Web Server: • Emerging: Object-oriented, Object-relational.
• stores the web connectivity software and the rules and
business logic (constraints) part of the application used to • Other classifications:
access the right amount of data from the database server • Single-user (typically used with micro-
• acts like a conduit for sending partially processed data computers) vs. multi-user (most DBMSs).
between the database server and the client.
• Centralized (uses a single computer with one
• Additional Features- Security: database) vs. distributed (uses multiple
• encrypt the data at the server before transmission computers, multiple databases)
• decrypt data at the client
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Pearson Education, Inc.
Slide 2-33 Copyright © 2004 Pearson Education, Inc.
Slide 2-34

Classification of DBMSs
Distributed Database Systems have now
come to be known as client server based
database systems because they do not
support a totally distributed environment,
but rather a set of database servers
supporting a set of clients.

Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright © 2004 Pearson Education, Inc.
Slide 2-35

You might also like