ics 434 advanced database systems
DESCRIPTION
ICS 434 Advanced Database Systems. Dr. Abdallah Al-Sukairi [email protected] Second Semester 2003 - 2004 (032) King Fahd University of Petroleum & Minerals Information & Computer Science Department. Outline. The Relational Data Model: Version 2 Advanced Data Modeling - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/1.jpg)
ICS 434 Advanced Database Systems
Dr. Abdallah [email protected]
Second Semester 2003 - 2004 (032)
King Fahd University of Petroleum & Minerals
Information & Computer Science Department
Dr. Abdallah [email protected]
Second Semester 2003 - 2004 (032)
King Fahd University of Petroleum & Minerals
Information & Computer Science Department
![Page 2: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/2.jpg)
Outline1. The Relational Data Model: Version 2
2. Advanced Data Modeling
3. Databases on the Web
4. Client-Server Architecture
5. Client-Server Databases & Tools
6. The System Catalog
7. Query Processing and Optimization
8. Transaction Processing
9. Concurrency Control
10. Recovery
11. Administration & Security
12. Distributed Databases
13. Database Replication
14. Object-Oriented Databases
15. Data Warehousing and Data Mining
16. Other Emerging Database Technologies
![Page 3: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/3.jpg)
2. Advanced Data Modeling
![Page 4: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/4.jpg)
The Entity-Relationship (ER) Model
Introduce by Peter Chen in 1976
In 1988 ANSI chose ER model as the standard model for IRDS
Elements of the the ER model: Entities Relationships Attributes
![Page 5: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/5.jpg)
Entities
Classes of real-world objects, represented by rectangles
Em ployee Departm ent
![Page 6: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/6.jpg)
Em ployee supervis ion
supervisor
supervisee
Departm entEm ployee works for
ProjectSupplier ship
Item
Relationships
Relate two or more entitiesrepresented by diamonds Degree
recursive
binary
n-ary
![Page 7: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/7.jpg)
... Relationships
Minimal and Maximal cardinality (min, max) min-card ( participation )
optional - 0 mandatory - 1
max-card ( cardinality ratio ) 1 to 1 1 to N N to N
![Page 8: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/8.jpg)
Example
controls
Departm entEm ployee
(1, 1) (1, N)works for
Project
m anages (1, 1)(0, 1)
has (1, N)
(0, N)
(0, N)
(1, 1)
![Page 9: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/9.jpg)
Attributes
Properties of entities or relationships single-valued multi-valued simple composite domain
IDID
Name
B_Date
Name
B_Date
EmployeeEmployee
![Page 10: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/10.jpg)
... Attributes
minimal and maximal cardinality min-card 0 optional
1 mandatory max-card 1 single-valued
N multi-valued (0, 1) is the default
Keys (identifiers) simple or composite internal or external
(strong entity) (weak entity)
![Page 11: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/11.jpg)
Problem with ER Model
The Entity Relationship Model in its original form did not support the generalization abstraction
Extended Entity-Relationship (EER) Model
![Page 12: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/12.jpg)
Generic C lassE
E1 E2 . . . En Subset C lasses
Generalization Hierarchies
Generalization vs. Specialization
Coverage of generalization total ( t ) or partial ( p ) disjoint ( d ) or overlapping ( o )
Em ployee
Sec. Manuf. S taff
Tech. Adm in.
(t, d)
(p, o)
![Page 13: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/13.jpg)
Inheritance
Subset entities inherit all the properties of the generic entity
Part
Manufact. Purchased
(t, d)
![Page 14: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/14.jpg)
ER-to-Relational Mapping
Entity Relation
1:1 Relationship Foreign Key
1:N Relationship Foreign Key
M:N Relationship Relation
Multi-valued Attribute Relation
Ternary Relationship Relation
![Page 15: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/15.jpg)
Generalization Hierarchy Mapping
Superclass C with attributes {K, a1, .... ,an}m subclasses {S1, S2, .... ,Sm}
Option A relation L for C relation Li for each subclass Si with attributes
= {k} U {attributes of Si} works for any constraints
Option B relation Li for each subclass Si with attributes
= {K, a1, .... ,an} U {attributes of Si} Works only with disjoint and total constraints
![Page 16: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/16.jpg)
... Generalization Hierarchy Mapping
Option C a single relation with attributes
= {K, a1, .... ,an} U {attributes of S1} U .... U {attributes of Sm} U {t}
(t = type attribute to indicate the subclass, more than one is needed when overlapping)
Preferable if only few specific attributes exist
![Page 17: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/17.jpg)
What is UML?
UML (Unified Modeling Language) An emerging standard for modeling object-oriented
software Resulted from the convergence of notations from three
leading object-oriented methods: OMT (James Rumbaugh) OOSE (Ivar Jacobson) Booch (Grady Booch)
Supported by several CASE tools Rational ROSE Together ...
![Page 18: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/18.jpg)
Different Views in UML
Structural View
Class DiagramsObject Diagrams
Behavioral View
Sequence DiagramsCollaboration DiagramsStatechart DiagramsActivity Diagrams
Environment View
Deployment Diagrams
Implementation View
Component Diagrams
User View
Use CaseDiagrams
![Page 19: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/19.jpg)
Class Diagrams: Static Structure
“A class diagram is a graphic presentation of the static view that shows a collection of declarative (static) model elements, such asclasses, types, and their contents andrelationships.”
![Page 20: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/20.jpg)
Class Diagrams: Example
Review Specification Name
SimpleReview Item
SubpartAlternative
Iteration Constraint
Sequence
Review ItemReview Criteria
Grading Criteria
1
1
1
*
1
Name1
1
Review Item
is aset of
2..*
*
is subpart of
1
*
1
*
of
this is acomment
1 1
1
1
1
![Page 21: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/21.jpg)
Class Diagrams: Multiplicity Constraints
Denote a Set of Non-Negative Integers
Common Forms 0..1 1..1 abbreviated as 1 0..* abbreviated as * 1..*
General Form i..j, k..l, m..n, … , z..*
![Page 22: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/22.jpg)
Class Diagrams: Attributes
Review Specification
SimpleReview Item
Sequence of Review Item
Review Item
1
is aset of 2..*
*
is subpart of
1* 1
*
of
Iteration Constraint
NameReview CriteriaGrading Criteria
*
Name
Alternative
SubpartSequence
{A Simple Review Item is neither an Alternative, Subpart, or Sequence}
![Page 23: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/23.jpg)
Class Diagrams: Associations Academic
Department1
DepartmentChair
2..*
FacultyMember
1
of
{subset}
Personis married to 11
Semester
Class Section
*
0..40..4
1
{A Faculty Member can teach at most 4 sections of any Class during a given Semester}
Faculty Member teachesSection of Class duringgiven Semester
# Spouse:Dependant
1
{ordered}
![Page 24: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/24.jpg)
Class Diagrams: Associations
10..4Class
term : Semestersection: Integer
FacultyMember
taught by
Qualified Association
Specialization between Associations
FacultyMember
AcademicDepartment
2..* 1
CS FacultyMember
CSDepartment
2..* 1
![Page 25: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/25.jpg)
Class Diagrams: Generalization/Specialization
University Person
StaffFaculty Student
{root}
Undergraduate GraduateDog
…
<<implementation>>{disjoint, incomplete}
{overlapping, complete}
graduationstatus
![Page 26: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/26.jpg)
Database Application System Life Cycle
System Definition
Design
Implementation
Loading or Data Conversion
Application Development or Conversion
Testing and Validation
Operation
Monitoring and Maintenance
![Page 27: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/27.jpg)
Requirements Collection and
Analysis
Database Requirements
Conceptual Design
Conceptual Schema (ER Model)
Logical Design( Model Mapping &
Normalization )
Physical Design
Set of Normalized relation
DDL Statements
Process Requirements
Transaction Design
Transaction Implementation
Data driven Process driven
frequenciesperformance constraints
The Database Design Process
![Page 28: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/28.jpg)
Requirements Collection and Analysis
Identification of user groups and application areas
Review of existing documentation
Analysis of the operating environment and the processing requirements
Questionnaires and interviews
![Page 29: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/29.jpg)
Conceptual Design
A high-level data model (semantic data model) with the following characteristics: Expressiveness Simplicity Minimallity Diagrammatic Representation Formality
![Page 30: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/30.jpg)
Approaches to Conceptual Database Design
Centralized
View integration
View (schema) integration Identifying correspondence and conflicts among the views:
Naming conflict Type conflict Constraint conflict
Modifying views to confirm to one another Merging views Restructuring
Strategies
![Page 31: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/31.jpg)
Example: UML
![Page 32: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/32.jpg)
Example:EER
Student
Offering
Short
Course Offering
Committee
Instance
has
has
has
participate
Employee
Short Course
teach
participate
Text
Committee
Project
Publication
Lab & Office
Software
Report
Seminar
Senior Project
Hardware
Research Group
Task
advise
participatepresent advisor
assign
assign
publishThesis Comm.
participate
use
conduct
Grad Student
U
produce
produce
produce
has
Faculty RAs GAs
d
Book
Resource
Borrower
borrow
U
Courseprereq
Staff
1
N
1
N
coord
1
N
N
N
1
1
1
1 N
N
N
N
1
1
1
produce
N
N
grader
lab coord
NN
N
1
1
1
1
N
1
1
N
N
N
1
1
1
1
1
N
N
N
N
N
N
N
N
1
N
1 N
U
1
N
Assignment
assign
produce
1
N
1
1
Visitor
present
produce
N
11 1
Special Ass.
participate
1
1
produce
1N
![Page 33: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/33.jpg)
Example: Relational Database Schema
Student
ID Name BDate Address SupID GPA Dep
Faculty Department
Faculty
ID Name BDate Office Phone Dep
DEPARTMENT
Department
Code Name Location Phone Chairman
Faculty
![Page 34: ICS 434 Advanced Database Systems](https://reader036.vdocuments.mx/reader036/viewer/2022081603/568142b5550346895daef61a/html5/thumbnails/34.jpg)
COMPANYTOOLFUNCTIONALITY
Embarcadero Technologies
ER StudioDatabase Modeling in ER and IDEF1X
DB ArtisanDatabase administration and space and security management
OracleDeveloper 2000 and Designer 2000
Database modeling, application development
Popkin SoftwareSystem Architect 2001Data modeling, object modeling, process modeling, structured analysis/design
Platinum TechnologyPlatinum Enterprice Modeling Suite: Erwin, BPWin, Paradigm Plus
Data, process, and business component modeling
Persistence Inc.PwertierMapping from O-O to relational model
RationalRational RoseModeling in UML and application generation in C++ and JAVA
Rogue WareRW MetroMapping from O-O to relational model
Resolution Ltd.XcaseConceptual modeling up to code maintenance
SybaseEnterprise Application SuiteData modeling, business logic modeling
VisioVisio EnterpriseData modeling, design and reengineering Visual Basic and Visual C++
Some of the Currently Available Automated Database Design Tools