Вы находитесь на странице: 1из 31

Presenter: Girendra Persaud

University of Guyana
 The Three-Schema Architecture
 Data Models – What is?
 Flat File Data Model
 Hierarchical Data Model
 Network Data Model
 Relational Data Model
 Object-oriented Data Model
 Object-relational Data Model
 Question
 References
 The overall database description can be
defined at three levels

 This architecture is proposed by ANSI/SPARC


(American National Standards
Institute/Standards Planning and
Requirements Committee) and hence, is also
known as ANSI/SPARC architecture
 External Schemas describe views at various
user levels
◦ For example a view to generate the following schema
– based on selection:
 courses(id:int, code:varchar, name: varchar, credit:int,
total_hours:int, description: text, objectives:text…)
 CourseInfo(courses(code: int, name: varchar)) >
 User > CSI 2102, Database Systems Design Information
Management Systems
◦ Generally how the user sees the data
 In the database you may have title, fname, other, and
lname
 User> Name: Mr. John Public
 Conceptual schema (or logical schema)
specifies the stored data in terms of the data
model of the DBMS
 In a relational DBMS, the conceptual schema
describes all relations that are stored in the
database
◦ For example:
 Students(id: integer, name: string, login: string, dob:
date, gpa: real,…)
 Faculty(id: integer, name: string, location: string, …)
 Courses(id: integer, number :string, name: string,
credits: integer, ...)
 Rooms(rno: integer, address: string, capacity: integer, …)
 A conceptual/logical schema is a design-
centric database structure built to meet the
business requirements.
 It is a model that exists on a white board or in
a ‘diagraming’ tool. It is like the architect's
drawings of your database…

 Source: http://dba.stackexchange.com/questions/59780/what-is-the-difference-between-logical-schema-and-physical-

schema
 Physical Schema (aka. Internal Schema)
describes storage details specific to the DBMS
(MySQL, Oracle, etc.)
◦ files, indices, etc. on the random access storage
system
◦ describes the record layout of files and type of files
(hash, b-tree, flat)

Source: http://jcsites.juniata.edu/faculty/rhodes/dbms/dbarch.htm
 External schema is how the data is presented

 Conceptual schema is how the database


architect(s) will describe the data,

 physical schema describes the internal format


of the data specific to the DBMS
 The goal of the three-schema architecture is
to separate the user application from the
physical database

 >>>>Data Independence
 Data Independence
◦ Allows independent implementation
 Each level can be implemented in a modular fashion
◦ Allows the client/server architecture
 Scalability
 Security (at all levels – software, physical etc.)
 Data independence is one of the main
advantages of a DBMS
 Physical data independence
◦ The ability to modify the physical scheme without
causing application programs to be rewritten.
◦ Modifications at this level are usually to improve
performance.
 Logical data independence
◦ The ability to modify the conceptual scheme
without causing application programs to be
rewritten.
◦ Usually done when logical structure of database is
altered.
 Data Models – What is?
◦ A database model is data description
constructs that determines the manner that
data is stored, organized, and manipulated
in the database system
 Data Models are fundamental entities to
introduce abstraction in a DBMS.
 Data models define how data is connected to
each other and how they are processed and
stored inside the system.

Source: TutorialsPoint, Sept. 2016, http://www.tutorialspoint.com/dbms/dbms_data_models.htm


 Data is stored in one two-dimensional file
◦ A number of rows
 representing the number of records
◦ and a number of columns
 representing the different parts in the record
◦ Ex. A spreadsheet file of data
eid First name Last Name Department Part.no Part name
23 Linda Johnson Sales 112 Printer
22 Fred Singh HR 112 Printer
23 Linda Johnson Sales 116 Monitor
21 Frank Henry Purchases 100 Computer
23 Linda Johnson Sales 119 Mouse

Database of Employees Use of Equipment


 Organized in a tree like structure
◦ Parent – child relationship
◦ A parent can have many children
◦ A child can only have one parent

Departments

Employees

Equipment Tasks
Departments Dept. Num Name
005 Sales
002 HR
003 Purchases

Employees Eid First Name Last Name Dept. Num


23 Linda Johnson 005
22 Fred Singh 002
21 Frank Henry 003

Part No Type Eid


Equipment Use 100 Computer 21
112 Printer 22
116 Monitor 23
112 Printer 23
119 Mouse 23
 Example of Common Use
 Has a one to many mapping comprising of
records and data items
 It is like the hierarchical model BUT
◦ It allows each record to have multiple parent and
child records
◦ It allows for a more natural way of modeling
relationships
 The relational model (RM) for database
management is an approach to managing
data using a structure and language
consistent with first-order predicate logic,
first described in 1969 by Edgar F. Codd.
 In the relational model of a database, all data
is represented in terms of tuples (records),
grouped into relations (tables).
 A database organized in terms of the
relational model is a relational database.
 Based on mathematical relations
 Uses relations, represented as tables
 Columns of tables represent attributes
 Tables represent relationships as well as
entities
 Successor to earlier record-based models—
network and hierarchical
Image Source: https://upload.wikimedia.org/wikipedia/commons/d/da/Relational_Model.svg
 Popular DBMS
◦ IBM's DB2, Informix, Oracle, Sybase, Microsoft's
Access, FoxBASE, Paradox, Tandem, and Teradata
 allows the definition of data structures,
storage and retrieval operations and integrity
constraints
 the data and relationship(s) between them are
organised in tables
 A table is a collection of records and each
record in a table contains the same fields
 (OODM) - Objectstore and Versant

 object and object identifier: Any real world entity


is uniformly identified

 attributes and methods: every object has a state


(the set of values for the attributes of the object)
and a behavior (the set of methods - program
code - which operate on the state of the object).
The state and behavior encapsulated in an object
are accessed or invoked from outside the object
only through explicit message passing.
 class: a means of grouping all the objects which
share the same set of attributes and methods. An
object must belong to only one class as an
instance of that class

 Class hierarchy and inheritance: derive a new


class (subclass) from an existing class
(superclass). The subclass inherits all the
attributes and methods of the existing class and
may have additional attributes and methods

 Ex. Car (super class) >> Sports Car (subclass)


 (ORDBMS)- IBM, Informix, ObjectStore,
Oracle, Versant

 Combines the best features of the relational


model and the OODM
 The Three-Schema Architecture
◦ External Schema
◦ Conceptual/Logical Schema
◦ Physical/Internal Schema

 Data Models – What is?


◦ Flat File Data Model
◦ Hierarchical Data Model
◦ Network Data Model
◦ Relational Data Model
◦ Object-oriented Data Model
◦ Object-relational Data Model
 Fundamentals of database systems / Ramez Elmasri,
Shamkant B. Navathe.—6th ed. p30, 59, 60
 Web source:
http://www.cs.sfu.ca/CourseCentral/354/zaiane/mat
erial/notes/Chapter8/node3.html - viewed
September 14th 2012
 http://jcsites.juniata.edu/faculty/rhodes/dbms/dbarc
h.htm viewed September 9th 2015
 http://dba.stackexchange.com/questions/59780/wh
at-is-the-difference-between-logical-schema-and-
physical-schema Viewed September 9th 2015
 TutorialsPoint, “DBMS Models”,
http://www.tutorialspoint.com/dbms/dbms_data_mo
dels.htm, viewed Sept. 2016,

Вам также может понравиться