0% found this document useful (0 votes)
8 views139 pages

Chapter01 03

This document introduces the fundamental concepts of databases and database management systems (DBMS), including types of databases, basic definitions, typical functionalities, and characteristics of the database approach. It discusses various database applications, user categories, advantages of using databases, and scenarios where a DBMS may not be necessary. Additionally, it outlines the historical development of database technology and emerging trends in database capabilities.

Uploaded by

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

Chapter01 03

This document introduces the fundamental concepts of databases and database management systems (DBMS), including types of databases, basic definitions, typical functionalities, and characteristics of the database approach. It discusses various database applications, user categories, advantages of using databases, and scenarios where a DBMS may not be necessary. Additionally, it outlines the historical development of database technology and emerging trends in database capabilities.

Uploaded by

hend mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 139

Copyright © 2007 Ramez Elmasri and Shamkant B.

Navathe Slide 1- 1
Chapter 1
Introduction: Databases and
Database Users

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe


Outline
 Types of Databases and Database Applications
 Basic Definitions
 Typical DBMS Functionality
 Example of a Database (UNIVERSITY)
 Main Characteristics of the Database Approach
 Database Users
 Advantages of Using the Database Approach
 When Not to Use Databases

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 3


Types of Databases and Database
Applications
 Traditional Applications:
 Numeric and Textual Databases
 More Recent Applications:
 Multimedia Databases
 Geographic Information Systems (GIS)
 Data Warehouses
 Real-time and Active Databases
 Many other applications
 First part of book focuses on traditional applications
 A number of recent applications are described later in the
book (for example, Chapters 24,26,28,29,30)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 4


Basic Definitions
 Database:
 A collection of related data.

 Data:
 Known facts that can be recorded and have an implicit meaning.

 Mini-world:
 Some part of the real world about which data is stored in a
database. For example, student grades and transcripts at a
university.
 Database Management System (DBMS):
 A software package/ system to facilitate the creation and
maintenance of a computerized database.
 Database System:
 The DBMS software together with the data itself. Sometimes, the
applications are also included.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 5


Simplified database system environment

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 6


Typical DBMS Functionality
 Define a particular database in terms of its data types,
structures, and constraints
 Construct or Load the initial database contents on a
secondary storage medium
 Manipulating the database:
 Retrieval: Querying, generating reports
 Modification: Insertions, deletions and updates to its content
 Accessing the database through Web applications
 Processing and Sharing by a set of concurrent users and
application programs – yet, keeping all data valid and
consistent

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 7


Typical DBMS Functionality
 Other features:
 Protection or Security measures to prevent
unauthorized access
 “Active” processing to take internal actions on data
 Presentation and Visualization of data
 Maintaining the database and associated
programs over the lifetime of the database
application
 Called database, software, and system
maintenance

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 8


Example of a Database
(with a Conceptual Data Model)
 Mini-world for the example:
 Part of a UNIVERSITY environment.
 Some mini-world entities:
 STUDENTs
 COURSEs
 SECTIONs (of COURSEs)
 (academic) DEPARTMENTs
 INSTRUCTORs

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 9


Example of a Database
(with a Conceptual Data Model)
 Some mini-world relationships:
 SECTIONs are of specific COURSEs

 STUDENTs take SECTIONs

 COURSEs have prerequisite COURSEs

 INSTRUCTORs teach SECTIONs

 COURSEs are offered by DEPARTMENTs

 STUDENTs major in DEPARTMENTs

 Note: The above entities and relationships are typically


expressed in a conceptual data model, such as the
ENTITY-RELATIONSHIP data model (see Chapters 3, 4)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 10


Example of a simple database

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 11


Main Characteristics of the Database
Approach
 Self-describing nature of a database system:
 A DBMS catalog stores the description of a particular
database (e.g. data structures, types, and constraints)
 The description is called meta-data.
 This allows the DBMS software to work with different
database applications.
 Insulation between programs and data:
 Called program-data independence.
 Allows changing data structures and storage organization
without having to change the DBMS access programs.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 12


Example of a simplified database catalog

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 13


Main Characteristics of the Database
Approach (continued)
 Data Abstraction:
 A data model is used to hide storage details and
present the users with a conceptual view of the
database.
 Programs refer to the data model constructs rather
than data storage details
 Support of multiple views of the data:
 Each user may see a different view of the
database, which describes only the data of
interest to that user.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 14


Main Characteristics of the Database
Approach (continued)
 Sharing of data and multi-user transaction
processing:
 Allowing a set of concurrent users to retrieve from and to
update the database.
 Concurrency control within the DBMS guarantees that each
transaction is correctly executed or aborted
 Recovery subsystem ensures each completed transaction
has its effect permanently recorded in the database
 OLTP (Online Transaction Processing) is a major part of
database applications. This allows hundreds of concurrent
transactions to execute per second.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 15


Database Users
 Users may be divided into
 Those who actually use and control the database
content, and those who design, develop and
maintain database applications (called “Actors on
the Scene”), and
 Those who design and develop the DBMS
software and related tools, and the computer
systems operators (called “Workers Behind the
Scene”).

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 16


Database Users
 Actors on the scene
 Database administrators:
 Responsible for authorizing access to the database,
for coordinating and monitoring its use, acquiring
software and hardware resources, controlling its use
and monitoring efficiency of operations.
 Database Designers:
 Responsible to define the content, the structure, the
constraints, and functions or transactions against
the database. They must communicate with the
end-users and understand their needs.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 17


Categories of End-users
 Actors on the scene (continued)
 End-users: They use the data for queries, reports
and some of them update the database content.
End-users can be categorized into:
 Casual: access database occasionally when
needed
 Naïve or Parametric: they make up a large section
of the end-user population.
 They use previously well-defined functions in the form of
“canned transactions” against the database.
 Examples are bank-tellers or reservation clerks who do
this activity for an entire shift of operations.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 18


Categories of End-users (continued)
 Sophisticated:
 These include business analysts, scientists, engineers,
others thoroughly familiar with the system capabilities.
 Many use tools in the form of software packages that work
closely with the stored database.
 Stand-alone:
 Mostly maintain personal databases using ready-to-use
packaged applications.
 An example is a tax program user that creates its own
internal database.
 Another example is a user that maintains an address book

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 19


Advantages of Using the Database
Approach
 Controlling redundancy in data storage and in
development and maintenance efforts.
 Sharing of data among multiple users.
 Restricting unauthorized access to data.
 Providing persistent storage for program Objects
 In Object-oriented DBMSs – see Chapters 20-22
 Providing Storage Structures (e.g. indexes) for
efficient Query Processing

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 20


Advantages of Using the Database
Approach (continued)
 Providing backup and recovery services.
 Providing multiple interfaces to different classes
of users.
 Representing complex relationships among data.
 Enforcing integrity constraints on the database.
 Drawing inferences and actions from the stored
data using deductive and active rules

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 21


Additional Implications of Using the
Database Approach
 Potential for enforcing standards:
 This is very crucial for the success of database
applications in large organizations. Standards
refer to data item names, display formats, screens,
report structures, meta-data (description of data),
Web page layouts, etc.
 Reduced application development time:
 Incremental time to add each new application is
reduced.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 22


Additional Implications of Using the
Database Approach (continued)
 Flexibility to change data structures:
 Database structure may evolve as new
requirements are defined.
 Availability of current information:
 Extremely important for on-line transaction
systems such as airline, hotel, car reservations.
 Economies of scale:
 Wasteful overlap of resources and personnel can
be avoided by consolidating data and applications
across departments.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 23


Historical Development of Database
Technology
 Early Database Applications:
 The Hierarchical and Network Models were introduced in
mid 1960s and dominated during the seventies.
 A bulk of the worldwide database processing still occurs
using these models, particularly, the hierarchical model.
 Relational Model based Systems:
 Relational model was originally introduced in 1970, was
heavily researched and experimented within IBM Research
and several universities.
 Relational DBMS Products emerged in the early 1980s.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 24


Historical Development of Database
Technology (continued)
 Object-oriented and emerging applications:
 Object-Oriented Database Management Systems
(OODBMSs) were introduced in late 1980s and early 1990s
to cater to the need of complex data processing in CAD and
other applications.
 Their use has not taken off much.
 Many relational DBMSs have incorporated object database
concepts, leading to a new category called object-relational
DBMSs (ORDBMSs)
 Extended relational systems add further capabilities (e.g. for
multimedia data, XML, and other data types)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 25


Historical Development of Database
Technology (continued)
 Data on the Web and E-commerce Applications:
 Web contains data in HTML (Hypertext markup
language) with links among pages.
 This has given rise to a new set of applications
and E-commerce is using new standards like XML
(eXtended Markup Language). (see Ch. 27).
 Script programming languages such as PHP and
JavaScript allow generation of dynamic Web
pages that are partially generated from a database
(see Ch. 26).
 Also allow database updates through Web pages

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 26


Extending Database Capabilities
 New functionality is being added to DBMSs in the following areas:
 Scientific Applications

 XML (eXtensible Markup Language)

 Image Storage and Management

 Audio and Video Data Management

 Data Warehousing and Data Mining

 Spatial Data Management

 Time Series and Historical Data Management

 The above gives rise to new research and development in


incorporating new data types, complex data structures, new
operations and storage and indexing schemes in database systems.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 27


When not to use a DBMS
 Main inhibitors (costs) of using a DBMS:
 High initial investment and possible need for additional
hardware.
 Overhead for providing generality, security, concurrency
control, recovery, and integrity functions.
 When a DBMS may be unnecessary:
 If the database and applications are simple, well defined,
and not expected to change.
 If there are stringent real-time requirements that may not be
met because of DBMS overhead.
 If access to data by multiple users is not required.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 28


When not to use a DBMS
 When no DBMS may suffice:
 If the database system is not able to handle the
complexity of data because of modeling limitations
 If the database users need special operations not
supported by the DBMS.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 29


Summary
 Types of Databases and Database Applications
 Basic Definitions
 Typical DBMS Functionality
 Example of a Database (UNIVERSITY)
 Main Characteristics of the Database Approach
 Database Users
 Advantages of Using the Database Approach
 When Not to Use Databases

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 30


Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 31
Chapter 2
Database System Concepts and
Architecture

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe


Outline
 Data Models and Their Categories
 History of Data Models
 Schemas, Instances, and States
 Three-Schema Architecture
 Data Independence
 DBMS Languages and Interfaces
 Database System Utilities and Tools
 Centralized and Client-Server Architectures
 Classification of DBMSs

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 33


Data Models
 Data Model:
 A set of concepts to describe the structure of a database,
the operations for manipulating these structures, and
certain constraints that the database should obey.
 Data Model Structure and Constraints:
 Constructs are used to define the database structure
 Constructs typically include elements (and their data
types) as well as groups of elements (e.g. entity, record,
table), and relationships among such groups
 Constraints specify some restrictions on valid data; these
constraints must be enforced at all times

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 34


Data Models (continued)
 Data Model Operations:
 These operations are used for specifying database
retrievals and updates by referring to the
constructs of the data model.
 Operations on the data model may include basic
model operations (e.g. generic insert, delete,
update) and user-defined operations (e.g.
compute_student_gpa, update_inventory)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 35


Categories of Data Models
 Conceptual (high-level, semantic) data models:
 Provide concepts that are close to the way many users
perceive data.
 (Also called entity-based or object-based data models.)

 Physical (low-level, internal) data models:


 Provide concepts that describe details of how data is stored
in the computer. These are usually specified in an ad-hoc
manner through DBMS design and administration manuals
 Implementation (representational) data models:
 Provide concepts that fall between the above two, used by
many commercial DBMS implementations (e.g. relational
data models used in many commercial systems).

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 36


Schemas versus Instances
 Database Schema:
 The description of a database.

 Includes descriptions of the database structure,


data types, and the constraints on the database.
 Schema Diagram:
 An illustrative display of (most aspects of) a
database schema.
 Schema Construct:
 A component of the schema or an object within
the schema, e.g., STUDENT, COURSE.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 37


Schemas versus Instances
 Database State:
 The actual data stored in a database at a
particular moment in time. This includes the
collection of all the data in the database.
 Also called database instance (or occurrence or
snapshot).
 The term instance is also applied to individual

database components, e.g. record instance, table


instance, entity instance

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 38


Database Schema
vs. Database State
 Database State:
 Refers to the content of a database at a moment

in time.
 Initial Database State:
 Refers to the database state when it is initially
loaded into the system.
 Valid State:
 A state that satisfies the structure and constraints
of the database.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 39


Database Schema
vs. Database State (continued)
 Distinction
 The database schema changes very infrequently.

 The database state changes every time the

database is updated.

 Schema is also called intension.


 State is also called extension.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 40


Example of a Database Schema

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 41


Example of a database state

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 42


Three-Schema Architecture
 Proposed to support DBMS characteristics of:
 Program-data independence.
 Support of multiple views of the data.
 Not explicitly used in commercial DBMS products,
but has been useful in explaining database
system organization

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 43


Three-Schema Architecture
 Defines DBMS schemas at three levels:
 Internal schema at the internal level to describe physical
storage structures and access paths (e.g indexes).
 Typically uses a physical data model.
 Conceptual schema at the conceptual level to describe the
structure and constraints for the whole database for a
community of users.
 Uses a conceptual or an implementation data model.
 External schemas at the external level to describe the
various user views.
 Usually uses the same data model as the conceptual schema.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 44


The three-schema architecture

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 45


Three-Schema Architecture
 Mappings among schema levels are needed to
transform requests and data.
 Programs refer to an external schema, and are
mapped by the DBMS to the internal schema for
execution.
 Data extracted from the internal DBMS level is
reformatted to match the user’s external view (e.g.
formatting the results of an SQL query for display
in a Web page)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 46


Data Independence
 Logical Data Independence:
 The capacity to change the conceptual schema
without having to change the external schemas
and their associated application programs.
 Physical Data Independence:
 The capacity to change the internal schema
without having to change the conceptual schema.
 For example, the internal schema may be changed
when certain file structures are reorganized or new
indexes are created to improve database
performance

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 47


Data Independence (continued)
 When a schema at a lower level is changed, only
the mappings between this schema and higher-
level schemas need to be changed in a DBMS
that fully supports data independence.
 The higher-level schemas themselves are
unchanged.
 Hence, the application programs need not be
changed since they refer to the external schemas.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 48


DBMS Languages
 Data Definition Language (DDL)
 Data Manipulation Language (DML)
 High-Level or Non-procedural Languages: These
include the relational language SQL
 May be used in a standalone way or may be
embedded in a programming language
 Low Level or Procedural Languages:
 These must be embedded in a programming
language

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 49


DBMS Languages
 Data Definition Language (DDL):
 Used by the DBA and database designers to
specify the conceptual schema of a database.
 In many DBMSs, the DDL is also used to define
internal and external schemas (views).
 In some DBMSs, separate storage definition
language (SDL) and view definition language
(VDL) are used to define internal and external
schemas.
 SDL is typically realized via DBMS commands
provided to the DBA and database designers

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 50


DBMS Languages
 Data Manipulation Language (DML):
 Used to specify database retrievals and updates
 DML commands (data sublanguage) can be
embedded in a general-purpose programming
language (host language), such as COBOL, C,
C++, or Java.
 A library of functions can also be provided to access
the DBMS from a programming language
 Alternatively, stand-alone DML commands can be
applied directly (called a query language).

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 51


Types of DML
 High Level or Non-procedural Language:
 For example, the SQL relational language
 Are “set”-oriented and specify what data to retrieve
rather than how to retrieve it.
 Also called declarative languages.
 Low Level or Procedural Language:
 Retrieve data one record-at-a-time;
 Constructs such as looping are needed to retrieve
multiple records, along with positioning pointers.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 52


DBMS Interfaces
 Stand-alone query language interfaces
 Example: Entering SQL queries at the DBMS
interactive SQL interface (e.g. SQL*Plus in
ORACLE)
 Programmer interfaces for embedding DML in
programming languages
 User-friendly interfaces
 Menu-based, forms-based, graphics-based, etc.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 53


DBMS Programming Language Interfaces

 Programmer interfaces for embedding DML in a


programming languages:
 Embedded Approach: e.g embedded SQL (for C,
C++, etc.), SQLJ (for Java)
 Procedure Call Approach: e.g. JDBC for Java,
ODBC for other programming languages
 Database Programming Language Approach:
e.g. ORACLE has PL/SQL, a programming
language based on SQL; language incorporates
SQL and its data types as integral components

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 54


User-Friendly DBMS Interfaces

 Menu-based, popular for browsing on the web


 Forms-based, designed for naïve users
 Graphics-based
 (Point and Click, Drag and Drop, etc.)
 Natural language: requests in written English
 Combinations of the above:
 For example, both menus and forms used
extensively in Web database interfaces

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 55


Other DBMS Interfaces
 Speech as Input and Output
 Web Browser as an interface
 Parametric interfaces, e.g., bank tellers using
function keys.
 Interfaces for the DBA:
 Creating user accounts, granting authorizations
 Setting system parameters
 Changing schemas or access paths

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 56


Database System Utilities
 To perform certain functions such as:
 Loading data stored in files into a database.
Includes data conversion tools.
 Backing up the database periodically on tape.
 Reorganizing database file structures.
 Report generation utilities.
 Performance monitoring utilities.
 Other functions, such as sorting, user monitoring,
data compression, etc.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 57


Other Tools
 Data dictionary / repository:
 Used to store schema descriptions and other
information such as design decisions, application
program descriptions, user information, usage
standards, etc.
 Active data dictionary is accessed by DBMS
software and users/DBA.
 Passive data dictionary is accessed by
users/DBA only.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 58


Other Tools
 Application Development Environments and
CASE (computer-aided software engineering)
tools:
 Examples:
 PowerBuilder (Sybase)
 JBuilder (Borland)
 JDeveloper 10G (Oracle)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 59


Typical DBMS Component Modules

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 60


Centralized and
Client-Server DBMS Architectures
 Centralized DBMS:
 Combines everything into single system including-
DBMS software, hardware, application programs,
and user interface processing software.
 User can still connect through a remote terminal –
however, all processing is done at centralized site.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 61


A Physical Centralized Architecture

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 62


Basic 2-tier Client-Server Architectures

 Specialized Servers with Specialized functions


 Print server
 File server
 DBMS server
 Web server
 Email server
 Clients can access the specialized servers as
needed

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 63


Logical two-tier client server architecture

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 64


Clients
 Provide appropriate interfaces through a client
software module to access and utilize the various
server resources.
 Clients may be diskless machines or PCs or
Workstations with disks with only the client
software installed.
 Connected to the servers via some form of a
network.
 (LAN: local area network, wireless network, etc.)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 65


DBMS Server
 Provides database query and transaction services to the
clients
 Relational DBMS servers are often called SQL servers,
query servers, or transaction servers
 Applications running on clients utilize an Application
Program Interface (API) to access server databases via
standard interface such as:
 ODBC: Open Database Connectivity standard
 JDBC: for Java programming access
 Client and server must install appropriate client module
and server module software for ODBC or JDBC
 See Chapter 9

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 66


Two Tier Client-Server Architecture
 A client program may connect to several DBMSs,
sometimes called the data sources.
 In general, data sources can be files or other
non-DBMS software that manages data.
 Other variations of clients are possible: e.g., in
some object DBMSs, more functionality is
transferred to clients including data dictionary
functions, optimization and recovery across
multiple servers, etc.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 67


Three Tier Client-Server Architecture
 Common for Web applications
 Intermediate Layer called Application Server or Web
Server:
 Stores the web connectivity software and the business logic
part of the application used to access the corresponding
data from the database server
 Acts like a conduit for sending partially processed data
between the database server and the client.
 Three-tier Architecture Can Enhance Security:
 Database server only accessible via middle tier
 Clients cannot directly access database server

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 68


Three-tier client-server architecture

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 69


Classification of DBMSs
 Based on the data model used
 Traditional: Relational, Network, Hierarchical.
 Emerging: Object-oriented, Object-relational.
 Other classifications
 Single-user (typically used with personal
computers)
vs. multi-user (most DBMSs).
 Centralized (uses a single computer with one
database)
vs. distributed (uses multiple computers, multiple
databases)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 70


Variations of Distributed DBMSs
(DDBMSs)
 Homogeneous DDBMS
 Heterogeneous DDBMS
 Federated or Multidatabase Systems
 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.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 71


Cost considerations for DBMSs
 Cost Range: from free open-source systems to
configurations costing millions of dollars
 Examples of free relational DBMSs: MySQL, PostgreSQL,
others
 Commercial DBMS offer additional specialized modules,
e.g. time-series module, spatial data module, document
module, XML module
 These offer additional specialized functionality when
purchased separately
 Sometimes called cartridges (e.g., in Oracle) or blades
 Different licensing options: site license, maximum number
of concurrent users (seat license), single user, etc.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 72


History of Data Models
 Network Model
 Hierarchical Model
 Relational Model
 Object-oriented Data Models
 Object-Relational Models

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 73


History of Data Models
 Network Model:
 The first network DBMS was implemented by
Honeywell in 1964-65 (IDS System).
 Adopted heavily due to the support by CODASYL
(Conference on Data Systems Languages)
(CODASYL - DBTG report of 1971).
 Later implemented in a large variety of systems -
IDMS (Cullinet - now Computer Associates), DMS
1100 (Unisys), IMAGE (H.P. (Hewlett-Packard)),
VAX -DBMS (Digital Equipment Corp., next
COMPAQ, now H.P.).

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 74


Example of Network Model Schema

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 75


Network Model
 Advantages:
 Network Model is able to model complex
relationships and represents semantics of
add/delete on the relationships.
 Can handle most situations for modeling using
record types and relationship types.
 Language is navigational; uses constructs like
FIND, FIND member, FIND owner, FIND NEXT
within set, GET, etc.
 Programmers can do optimal navigation through the
database.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 76


Network Model
 Disadvantages:
 Navigational and procedural nature of processing
 Database contains a complex array of pointers
that thread through a set of records.
 Little scope for automated “query optimization”

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 77


History of Data Models
 Hierarchical Data Model:
 Initially implemented in a joint effort by IBM and
North American Rockwell around 1965. Resulted
in the IMS family of systems.
 IBM’s IMS product had (and still has) a very large
customer base worldwide
 Hierarchical model was formalized based on the
IMS system
 Other systems based on this model: System 2k
(SAS inc.)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 78


Hierarchical Model
 Advantages:
 Simple to construct and operate
 Corresponds to a number of natural hierarchically organized
domains, e.g., organization (“org”) chart
 Language is simple:
 Uses constructs like GET, GET UNIQUE, GET NEXT, GET
NEXT WITHIN PARENT, etc.
 Disadvantages:
 Navigational and procedural nature of processing
 Database is visualized as a linear arrangement of records
 Little scope for "query optimization"

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 79


History of Data Models
 Relational Model:
 Proposed in 1970 by E.F. Codd (IBM), first commercial
system in 1981-82.
 Now in several commercial products (e.g. DB2, ORACLE,
MS SQL Server, SYBASE, INFORMIX).
 Several free open source implementations, e.g. MySQL,
PostgreSQL
 Currently most dominant for developing database
applications.
 SQL relational standards: SQL-89 (SQL1), SQL-92 (SQL2),
SQL-99, SQL3, …
 Chapters 5 through 11 describe this model in detail

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 80


History of Data Models
 Object-oriented Data Models:
 Several models have been proposed for implementing in a
database system.
 One set comprises models of persistent O-O Programming
Languages such as C++ (e.g., in OBJECTSTORE or
VERSANT), and Smalltalk (e.g., in GEMSTONE).
 Additionally, systems like O2, ORION (at MCC - then
ITASCA), IRIS (at H.P.- used in Open OODB).
 Object Database Standard: ODMG-93, ODMG-version 2.0,
ODMG-version 3.0.
 Chapters 20 and 21 describe this model.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 81


History of Data Models
 Object-Relational Models:
 Most Recent Trend. Started with Informix
Universal Server.
 Relational systems incorporate concepts from
object databases leading to object-relational.
 Exemplified in the latest versions of Oracle-10i,
DB2, and SQL Server and other DBMSs.
 Standards included in SQL-99 and expected to be
enhanced in future SQL standards.
 Chapter 22 describes this model.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 82


Summary
 Data Models and Their Categories
 History of Data Models
 Schemas, Instances, and States
 Three-Schema Architecture
 Data Independence
 DBMS Languages and Interfaces
 Database System Utilities and Tools
 Centralized and Client-Server Architectures
 Classification of DBMSs

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 83


Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 84
Chapter 3
Data Modeling Using the Entity-
Relationship (ER) Model

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe


Chapter Outline
 Overview of Database Design Process
 Example Database Application (COMPANY)
 ER Model Concepts
 Entities and Attributes
 Entity Types, Value Sets, and Key Attributes
 Relationships and Relationship Types
 Weak Entity Types
 Roles and Attributes in Relationship Types
 ER Diagrams - Notation
 ER Diagram for COMPANY Schema
 Alternative Notations – UML class diagrams, others

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 86


Overview of Database Design Process

 Two main activities:


 Database design
 Applications design
 Focus in this chapter on database design
 To design the conceptual schema for a database
application
 Applications design focuses on the programs and
interfaces that access the database
 Generally considered part of software engineering

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 87


Overview of Database Design Process

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 88


Example COMPANY Database
 We need to create a database schema design
based on the following (simplified) requirements
of the COMPANY Database:
 The company is organized into DEPARTMENTs.
Each department has a name, number and an
employee who manages the department. We keep
track of the start date of the department manager.
A department may have several locations.
 Each department controls a number of
PROJECTs. Each project has a unique name,
unique number and is located at a single location.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 89


Example COMPANY Database
(Contd.)
 We store each EMPLOYEE’s social security
number, address, salary, sex, and birthdate.
 Each employee works for one department but may

work on several projects.


 We keep track of the number of hours per week that
an employee currently works on each project.
 We also keep track of the direct supervisor of each
employee.
 Each employee may have a number of
DEPENDENTs.
 For each dependent, we keep track of their name,
sex, birthdate, and relationship to the employee.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 90


ER Model Concepts
 Entities and Attributes
 Entities are specific objects or things in the mini-world that
are represented in the database.
 For example the EMPLOYEE John Smith, the Research
DEPARTMENT, the ProductX PROJECT
 Attributes are properties used to describe an entity.
 For example an EMPLOYEE entity may have the attributes
Name, SSN, Address, Sex, BirthDate
 A specific entity will have a value for each of its attributes.
 For example a specific employee entity may have Name='John
Smith', SSN='123456789', Address ='731, Fondren, Houston,
TX', Sex='M', BirthDate='09-JAN-55‘
 Each attribute has a value set (or data type) associated with
it – e.g. integer, string, subrange, enumerated type, …

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 91


Types of Attributes (1)
 Simple
 Each entity has a single atomic value for the attribute. For
example, SSN or Sex.
 Composite
 The attribute may be composed of several components. For
example:
 Address(Apt#, House#, Street, City, State, ZipCode, Country), or
 Name(FirstName, MiddleName, LastName).
 Composition may form a hierarchy where some components
are themselves composite.
 Multi-valued
 An entity may have multiple values for that attribute. For
example, Color of a CAR or PreviousDegrees of a STUDENT.
 Denoted as {Color} or {PreviousDegrees}.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 92


Types of Attributes (2)
 In general, composite and multi-valued attributes
may be nested arbitrarily to any number of levels,
although this is rare.
 For example, PreviousDegrees of a STUDENT is a
composite multi-valued attribute denoted by
{PreviousDegrees (College, Year, Degree, Field)}
 Multiple PreviousDegrees values can exist
 Each has four subcomponent attributes:
 College, Year, Degree, Field

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 93


Example of a composite attribute

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 94


Entity Types and Key Attributes (1)
 Entities with the same basic attributes are
grouped or typed into an entity type.
 For example, the entity type EMPLOYEE
and PROJECT.
 An attribute of an entity type for which each
entity must have a unique value is called a
key attribute of the entity type.
 For example, SSN of EMPLOYEE.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 95


Entity Types and Key Attributes (2)
 A key attribute may be composite.
 VehicleTagNumber is a key of the CAR entity

type with components (Number, State).


 An entity type may have more than one key.
 The CAR entity type may have two keys:

 VehicleIdentificationNumber (popularly called VIN)


 VehicleTagNumber (Number, State), aka license
plate number.
 Each key is underlined

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 96


Displaying an Entity type
 In ER diagrams, an entity type is displayed in a
rectangular box
 Attributes are displayed in ovals
 Each attribute is connected to its entity type
 Components of a composite attribute are
connected to the oval representing the composite
attribute
 Each key attribute is underlined
 Multivalued attributes displayed in double ovals
 See CAR example on next slide

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 97


Entity Type CAR with two keys and a
corresponding Entity Set

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 98


Entity Set
 Each entity type will have a collection of entities
stored in the database
 Called the entity set
 Previous slide shows three CAR entity instances
in the entity set for CAR
 Same name (CAR) used to refer to both the entity
type and the entity set
 Entity set is the current state of the entities of that
type that are stored in the database

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 99


Initial Design of Entity Types for the
COMPANY Database Schema

 Based on the requirements, we can identify four


initial entity types in the COMPANY database:
 DEPARTMENT
 PROJECT
 EMPLOYEE
 DEPENDENT
 Their initial design is shown on the following slide
 The initial attributes shown are derived from the
requirements description

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 100


Initial Design of Entity Types:
EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 101


Refining the initial design by introducing
relationships

 The initial design is typically not complete


 Some aspects in the requirements will be
represented as relationships
 ER model has three main concepts:
 Entities (and their entity types and entity sets)
 Attributes (simple, composite, multivalued)
 Relationships (and their relationship types and
relationship sets)
 We introduce relationship concepts next

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 102


Relationships and Relationship Types (1)
 A relationship relates two or more distinct entities with a
specific meaning.
 For example, EMPLOYEE John Smith works on the ProductX
PROJECT, or EMPLOYEE Franklin Wong manages the
Research DEPARTMENT.
 Relationships of the same type are grouped or typed into
a relationship type.
 For example, the WORKS_ON relationship type in which
EMPLOYEEs and PROJECTs participate, or the MANAGES
relationship type in which EMPLOYEEs and DEPARTMENTs
participate.
 The degree of a relationship type is the number of
participating entity types.
 Both MANAGES and WORKS_ON are binary relationships.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 103


Relationship instances of the WORKS_FOR N:1
relationship between EMPLOYEE and DEPARTMENT

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 104


Relationship instances of the M:N WORKS_ON
relationship between EMPLOYEE and PROJECT

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 105


Relationship type vs. relationship set (1)

 Relationship Type:
 Is the schema description of a relationship
 Identifies the relationship name and the
participating entity types
 Also identifies certain relationship constraints
 Relationship Set:
 The current set of relationship instances
represented in the database
 The current state of a relationship type

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 106


Relationship type vs. relationship set (2)

 Previous figures displayed the relationship sets


 Each instance in the set relates individual
participating entities – one from each participating
entity type
 In ER diagrams, we represent the relationship
type as follows:
 Diamond-shaped box is used to display a
relationship type
 Connected to the participating entity types via
straight lines

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 107


Refining the COMPANY database
schema by introducing relationships
 By examining the requirements, six relationship types are
identified
 All are binary relationships( degree 2)
 Listed below with their participating entity types:
 WORKS_FOR (between EMPLOYEE, DEPARTMENT)
 MANAGES (also between EMPLOYEE, DEPARTMENT)
 CONTROLS (between DEPARTMENT, PROJECT)
 WORKS_ON (between EMPLOYEE, PROJECT)
 SUPERVISION (between EMPLOYEE (as subordinate),
EMPLOYEE (as supervisor))
 DEPENDENTS_OF (between EMPLOYEE, DEPENDENT)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 108


ER DIAGRAM – Relationship Types are:
WORKS_FOR, MANAGES, WORKS_ON, CONTROLS, SUPERVISION, DEPENDENTS_OF

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 109


Discussion on Relationship Types
 In the refined design, some attributes from the initial entity
types are refined into relationships:
 Manager of DEPARTMENT -> MANAGES
 Works_on of EMPLOYEE -> WORKS_ON
 Department of EMPLOYEE -> WORKS_FOR
 etc
 In general, more than one relationship type can exist
between the same participating entity types
 MANAGES and WORKS_FOR are distinct relationship
types between EMPLOYEE and DEPARTMENT
 Different meanings and different relationship instances.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 110


Recursive Relationship Type
 An relationship type whose with the same participating
entity type in distinct roles
 Example: the SUPERVISION relationship
 EMPLOYEE participates twice in two distinct roles:
 supervisor (or boss) role
 supervisee (or subordinate) role
 Each relationship instance relates two distinct
EMPLOYEE entities:
 One employee in supervisor role

 One employee in supervisee role

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 111


Weak Entity Types
 An entity that does not have a key attribute
 A weak entity must participate in an identifying relationship type with
an owner or identifying entity type
 Entities are identified by the combination of:
 A partial key of the weak entity type

 The particular entity they are related to in the identifying entity


type
 Example:
 A DEPENDENT entity is identified by the dependent’s first name,
and the specific EMPLOYEE with whom the dependent is related
 Name of DEPENDENT is the partial key

 DEPENDENT is a weak entity type

 EMPLOYEE is its identifying entity type via the identifying


relationship type DEPENDENT_OF

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 112


Constraints on Relationships
 Constraints on Relationship Types
 (Also known as ratio constraints)
 Cardinality Ratio (specifies maximum participation)
 One-to-one (1:1)
 One-to-many (1:N) or Many-to-one (N:1)
 Many-to-many (M:N)
 Existence Dependency Constraint (specifies minimum
participation) (also called participation constraint)
 zero (optional participation, not existence-dependent)
 one or more (mandatory participation, existence-dependent)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 113


Many-to-one (N:1) Relationship

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 114


Many-to-many (M:N) Relationship

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 115


Displaying a recursive
relationship
 In a recursive relationship type.
 Both participations are same entity type in
different roles.
 For example, SUPERVISION relationships
between EMPLOYEE (in role of supervisor or
boss) and (another) EMPLOYEE (in role of
subordinate or worker).
 In following figure, first role participation labeled
with 1 and second role participation labeled with
2.
 In ER diagram, need to display role names to
distinguish participations.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 116


A Recursive Relationship Supervision`

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 117


Recursive Relationship Type is: SUPERVISION
(participation role names are shown)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 118


Attributes of Relationship types
 A relationship type can have attributes:
 For example, HoursPerWeek of WORKS_ON
 Its value for each relationship instance describes
the number of hours per week that an EMPLOYEE
works on a PROJECT.
 A value of HoursPerWeek depends on a particular
(employee, project) combination
 Most relationship attributes are used with M:N
relationships
 In 1:N relationships, they can be transferred to the
entity type on the N-side of the relationship

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 119


Example Attribute of a Relationship Type:
Hours of WORKS_ON

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 120


Notation for Constraints on
Relationships
 Cardinality ratio (of a binary relationship): 1:1,
1:N, N:1, or M:N
 Shown by placing appropriate numbers on the
relationship edges.
 Participation constraint (on each participating
entity type): total (called existence dependency)
or partial.
 Total shown by double line, partial by single line.
 NOTE: These are easy to specify for Binary
Relationship Types.

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 121


Alternative (min, max) notation for
relationship structural constraints:
 Specified on each participation of an entity type E in a relationship
type R
 Specifies that each entity e in E participates in at least min and at
most max relationship instances in R
 Default(no constraint): min=0, max=n (signifying no limit)
 Must have minmax, min0, max 1
 Derived from the knowledge of mini-world constraints
 Examples:
 A department has exactly one manager and an employee can
manage at most one department.
 Specify (0,1) for participation of EMPLOYEE in MANAGES
 Specify (1,1) for participation of DEPARTMENT in MANAGES
 An employee can work for exactly one department but a
department can have any number of employees.
 Specify (1,1) for participation of EMPLOYEE in WORKS_FOR
 Specify (0,n) for participation of DEPARTMENT in WORKS_FOR

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 122


The (min,max) notation for
relationship constraints

Read the min,max numbers next to the entity


type and looking away from the entity type

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 123


COMPANY ER Schema Diagram using (min,
max) notation

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 124


Alternative diagrammatic notation
 ER diagrams is one popular example for
displaying database schemas
 Many other notations exist in the literature and in
various database design and modeling tools
 Appendix A illustrates some of the alternative
notations that have been used
 UML class diagrams is representative of another
way of displaying ER concepts that is used in
several commercial design tools

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 125


Summary of notation for ER diagrams

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 126


UML class diagrams
 Represent classes (similar to entity types) as large
rounded boxes with three sections:
 Top section includes entity type (class) name
 Second section includes attributes
 Third section includes class operations (operations are not
in basic ER model)
 Relationships (called associations) represented as lines
connecting the classes
 Other UML terminology also differs from ER terminology
 Used in database design and object-oriented software
design
 UML has many other types of diagrams for software
design (see Chapter 12)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 127


UML class diagram for COMPANY
database schema

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 128


Other alternative diagrammatic notations

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 129


Relationships of Higher Degree
 Relationship types of degree 2 are called binary
 Relationship types of degree 3 are called ternary
and of degree n are called n-ary
 In general, an n-ary relationship is not equivalent
to n binary relationships
 Constraints are harder to specify for higher-
degree relationships (n > 2) than for binary
relationships

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 130


Discussion of n-ary relationships (n > 2)
 In general, 3 binary relationships can represent different
information than a single ternary relationship (see Figure
3.17a and b on next slide)
 If needed, the binary and n-ary relationships can all be
included in the schema design (see Figure 3.17a and b,
where all relationships convey different meanings)
 In some cases, a ternary relationship can be represented
as a weak entity if the data model allows a weak entity
type to have multiple identifying relationships (and hence
multiple owner entity types) (see Figure 3.17c)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 131


Example of a ternary relationship

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 132


Discussion of n-ary relationships (n > 2)

 If a particular binary relationship can be derived


from a higher-degree relationship at all times,
then it is redundant
 For example, the TAUGHT_DURING binary
relationship in Figure 3.18 (see next slide) can be
derived from the ternary relationship OFFERS
(based on the meaning of the relationships)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 133


Another example of a ternary relationship

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 134


Displaying constraints on higher-degree
relationships
 The (min, max) constraints can be displayed on the edges
– however, they do not fully describe the constraints
 Displaying a 1, M, or N indicates additional constraints
 An M or N indicates no constraint
 A 1 indicates that an entity can participate in at most one
relationship instance that has a particular combination of the
other participating entities
 In general, both (min, max) and 1, M, or N are needed to
describe fully the constraints

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 135


Data Modeling Tools
 A number of popular tools that cover conceptual modeling
and mapping into relational schema design.
 Examples: ERWin, S- Designer (Enterprise Application
Suite), ER- Studio, etc.
 POSITIVES:
 Serves as documentation of application requirements, easy
user interface - mostly graphics editor support
 NEGATIVES:
 Most tools lack a proper distinct notation for relationships
with relationship attributes
 Mostly represent a relational design in a diagrammatic form
rather than a conceptual ER-based design
(See Chapter 12 for details)

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 136


Some of the Currently Available
Automated Database Design Tools
COMPANY TOOL FUNCTIONALITY
Embarcadero ER Studio Database Modeling in ER and IDEF1X
Technologies
DB Artisan Database administration, space and security
management
Oracle Developer 2000/Designer 2000 Database modeling, application development
Popkin System Architect 2001 Data modeling, object modeling, process modeling,
Software structured analysis/design
Platinum Enterprise Modeling Suite: Data, process, and business component modeling
(Computer Erwin, BPWin, Paradigm Plus
Associates)
Persistence Pwertier Mapping from O-O to relational model
Inc.
Rational (IBM) Rational Rose UML Modeling & application generation in C++/JAVA
Resolution Ltd. Xcase Conceptual modeling up to code maintenance
Sybase Enterprise Application Suite Data modeling, business logic modeling
Visio Visio Enterprise Data modeling, design/reengineering Visual Basic/C++

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 137


Extended Entity-Relationship (EER)
Model (in next chapter)

 The entity relationship model in its original form


did not support the specialization and
generalization abstractions
 Next chapter illustrates how the ER model can be
extended with
 Type-subtype and set-subset relationships
 Specialization/Generalization Hierarchies
 Notation to display them in EER diagrams

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 138


Chapter Summary
 ER Model Concepts: Entities, attributes,
relationships
 Constraints in the ER model
 Using ER in step-by-step conceptual schema
design for the COMPANY database
 ER Diagrams - Notation
 Alternative Notations – UML class diagrams,
others

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 3- 139

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy