Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

DataBase Development and Implementation Lec17 - Object Oriented Databases, Study notes of Database Management Systems (DBMS)

Detail Summery about Object Oriented Databases, Advanced database applications, Unsuitability of RDBMSs for advanced database applications, Object-oriented concepts, Problems of storing objects in relational database, The next generation of database systems.

Typology: Study notes

2010/2011

Uploaded on 09/08/2011

rossi46
rossi46 šŸ‡¬šŸ‡§

4.5

(10)

313 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
DBDI 30/05/2007
Lecture-17 / OODBs 1
DBDI/ Lecture 17
Object Oriented Databases
Mr. Alun Butler &
Dr. Ala Al-Zobaidie
The slides are based on the textbook Database Systems by Thomas Connolly & Carolyn Begg
30/05/2007 DBDI / OODB 2
Lecture - Objectives
• Advanced database applications.
• Unsuitability of RDBMSs for advanced
database applications.
• Object-oriented concepts.
• Problems of storing objects in relational
database.
• The next generation of database systems.
30/05/2007 DBDI / OODB 3
Advanced Database Applications
• Computer-Aided Design (CAD)
• Computer-Aided Manufacturing (CAM)
• Computer-Aided Software Engineering (CASE)
• Network Management Systems
• Office Information Systems (OIS) and Multimedia
Systems
• Digital Publishing
• Geographic Information Systems (GIS)
• Interactive and Dynamic Web sites
• Other applications with complex and interrelated objects
and procedural data.
30/05/2007 DBDI / OODB 4
Interactive and Dynamic Web Sites
• Consider web site with online catalog for selling
clothes. Web site maintains a set of preferences for
previous visitors to the site and allows a visitor to:
– obtain 3D rendering of any item based on color, size,
fabric, etc;
– modify rendering to account for movement,
illumination, backdrop, occasion, etc;
– select accessories to go with the outfit, from items
presented in a sidebar;
• Need to handle multimedia content and to
interactively modify display based on user
preferences and user selections. Also have added
complexity of providing 3D rendering.
30/05/2007 DBDI / OODB 5
Weaknesses of RDBMSs
• Poor Representation of "Real World"
Entities
– Normalization leads to relations that do not
correspond to entities in "real world".
• Semantic Overloading
– Relational model has only one construct for
representing data and data relationships: the
relation.
– Relational model is semantically overloaded.
30/05/2007 DBDI / OODB 6
Weaknesses of RDBMSs
• Poor Support for Integrity and
Enterprise Constraints
• Homogeneous Data Structure
– Relational model assumes both
horizontal and vertical homogeneity.
– Many RDBMSs now allow Binary
Large Objects (BLOBs).
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download DataBase Development and Implementation Lec17 - Object Oriented Databases and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

DBDI/ Lecture 17 Object Oriented Databases

Mr. Alun Butler & Dr. Ala Al-Zobaidie

The slides are based on the textbook Database Systems by Thomas Connolly & Carolyn Begg 30/05/2007 DBDI / OODB 2

Lecture - Objectives

  • Advanced database applications.
  • Unsuitability of RDBMSs for advanced database applications.
  • Object-oriented concepts.
  • Problems of storing objects in relational database.
  • The next generation of database systems.

30/05/2007 DBDI / OODB 3

Advanced Database Applications

  • Computer-Aided Design (CAD)
  • Computer-Aided Manufacturing (CAM)
  • Computer-Aided Software Engineering (CASE)
  • Network Management Systems
  • Office Information Systems (OIS) and Multimedia Systems
  • Digital Publishing
  • Geographic Information Systems (GIS)
  • Interactive and Dynamic Web sites
  • Other applications with complex and interrelated objects and procedural data. 30/05/2007 DBDI / OODB 4

Interactive and Dynamic Web Sites

  • Consider web site with online catalog for selling clothes. Web site maintains a set of preferences for previous visitors to the site and allows a visitor to: - obtain 3D rendering of any item based on color, size, fabric, etc; - modify rendering to account for movement, illumination, backdrop, occasion, etc; - select accessories to go with the outfit, from items presented in a sidebar;
  • Need to handle multimedia content and to interactively modify display based on user preferences and user selections. Also have added complexity of providing 3D rendering.

Weaknesses of RDBMSs

  • Poor Representation of "Real World"

Entities

  • Normalization leads to relations that do not correspond to entities in "real world".
  • Semantic Overloading
  • Relational model has only one construct for representing data and data relationships: the relation.
  • Relational model is semantically overloaded.

Weaknesses of RDBMSs

  • Poor Support for Integrity and

Enterprise Constraints

  • Homogeneous Data Structure
    • Relational model assumes both horizontal and vertical homogeneity.
    • Many RDBMSs now allow Binary Large Objects ( BLOBs ).

30/05/2007 DBDI / OODB 7

Weaknesses of RDBMSs

  • Limited Operations
    • RDBMs only have a fixed set of operations which cannot be extended.
  • Difficulty Handling Recursive Queries
    • Extremely difficult to produce recursive queries.
    • Extension proposed to relational algebra to handle this type of query is unary transitive (recursive) closure, operation. i.e. tuples are transitively deduced

30/05/2007 DBDI / OODB 8

Example - Recursive Query

Find all managers who, directly or indirectly, manage staff member S005?

Problem: you do not know # recursion levels in hierarchy! e.g. change S005 above to any individual! Solution => embedded SQL

30/05/2007 DBDI / OODB 9

Weaknesses of RDBMSs

  • Impedance Mismatch
    • Most DMLs lack computational completeness.
    • To overcome this, SQL can be embedded in a high-level 3GL.
    • This produces an impedance mismatch - mixing different programming paradigms.
    • Estimated that as much as 30% of programming effort and code space is expended on this type of conversion.

30/05/2007 DBDI / OODB 10

Weaknesses of RDBMSs

  • Other Problems with RDBMSs
    • Transactions are generally short-lived and concurrency control protocols not suited for long-lived transactions.
    • Schema changes are difficult.
    • RDBMSs are poor at navigational access.

Object-oriented concepts

  • Abstraction, encapsulation, information hiding.
  • Objects and attributes.
  • Object identity.
  • Methods and messages.
  • Classes, subclasses, superclasses, and inheritance.
  • Overloading.
  • Polymorphism and dynamic binding.

Advantages of OIDs

  • They are efficient.
  • They are fast.
  • They cannot be modified by the user.
  • They are independent of content.

30/05/2007 DBDI / OODB 19

Single Inheritance

30/05/2007 DBDI / OODB 20

Multiple Inheritance

30/05/2007 DBDI / OODB 21

Overriding, Overloading, & Polymorphism

Overriding - Process of redefining a property within a subclass.

Overloading - Allows name of a method to be reused with a class or across classes.

Polymorphism - Means ' many forms '.

  • Three types: operation, inclusion, and parametric.

30/05/2007 DBDI / OODB 22

Example of Overriding

  • Might define method in Staff class to increment salary based on commission: method void giveCommission(float branchProfit) { salary = salary + 0.02 * branchProfit; }
  • May wish to perform different calculation for commission in Manager subclass: method void giveCommission(float branchProfit) { salary = salary + 0.05 * branchProfit; }

Storing Objects in Relational Databases

  • One approach to achieving persistence with an OOPL, is to use an RDBMS as the underlying storage engine.
  • Requires mapping class instances (ie. objects) to one or more tuples distributed over one or more relations.
  • To handle class hierarchy, have two basics tasks to perform: (1) design relations to represent class hierarchy; (2) design how objects will be accessed.

Next Generation Database Systems

First Generation DBMS - Network and Hierarchical

  • Required complex programs for even simple queries.
  • Minimal data independence.
  • No widely accepted theoretical foundation. Second Generation DBMS - Relational DBMS
  • Helped overcome these problems. Third Generation DBMS - OODBMS and ORDBMS.

30/05/2007 DBDI / OODB 25

History of Data Models

30/05/2007 DBDI / OODB 26

Objectives / 2

  • Issues underlying ODBMSs.
  • Advantages and disadvantages.
  • OODBMS Manifesto.
  • Object-oriented database design.

30/05/2007 DBDI / OODB 27

Object-Oriented Data Model

No one agreed object data model. One definition: Object-Oriented Data Model (OODM)

  • Data model that captures semantics of objects supported in object-oriented programming. Object-Oriented Database (OODB)
  • Persistent and sharable collection of objects defined by an ODM. Object-Oriented DBMS (OODBMS)
  • Manager of an ODB.

30/05/2007 DBDI / OODB 28

Origins of the Object-Oriented Data Model

Single-Level v. Two-Level Storage Model

  • Traditional programming languages lack built-in support for many database features.
  • Increasing number of applications now require functionality from both database systems and programming languages.
  • Such applications need to store and retrieve large amounts of shared, structured data.

Single-Level v. Two-Level Storage Model

  • With a traditional DBMS, programmer has to: - decide when to read and update objects. - write code to translate between application’s object model and the data model of the DBMS. - perform additional type-checking when object is read back from database, to guarantee object will conform to its original type.

30/05/2007 DBDI / OODB 37

OODBMS Manifesto

  • Complex objects must be supported.
  • Object identity must be supported.
  • Encapsulation must be supported.
  • Types or Classes must be supported.
  • Types or Classes must be able to inherit from their ancestors.
  • Dynamic binding must be supported.
  • The DML must be computationally complete.

30/05/2007 DBDI / OODB 38

OODBMS Manifesto

  • The set of data types must be extensible.
  • Data persistence must be provided.
  • The DBMS must be capable of managing very large databases.
  • The DBMS must support concurrent users.
  • DBMS must be able to recovery from hardware/software failures.
  • DBMS must provide a simple way of querying data.

30/05/2007 DBDI / OODB 39

OODBMS Manifesto

  • The manifesto proposes the

following optional features:

  • Multiple inheritance, type checking and type inferencing, distribution across a network, design transactions and versions.
  • No direct mention of support for

security, integrity, views or even a

declarative query language.

30/05/2007 DBDI / OODB 40

Advantages of OODBMSs

  • Enriched Modeling Capabilities.
  • Extensibility.
  • Removal of Impedance Mismatch.
  • More Expressive Query Language.
  • Support for Schema Evolution.
  • Support for Long Duration

Transactions.

  • Applicability to Advanced Database

Applications.

  • Improved Performance.

Disadvantages of OODBMSs

  • Lack of Universal Data Model.
  • Lack of Experience.
  • Lack of Standards.
  • Query Optimization compromises Encapsulation.
  • Object Level Locking may impact Performance.
  • Complexity.
  • Lack of Support for Views.
  • Lack of Support for Security.

Object-Relational DBMSs – Objectives /

  • How relational model has been extended to support advanced database applications.
  • Features proposed in third-generation database system manifestos from CADF and Darwen/Date.
  • Object-oriented features in SQL3.
  • How OODBMSs and ORDBMSs compare in terms of data modeling, data access, and data sharing.

30/05/2007 DBDI / OODB 43

Market Share

  • RDBMSs currently dominant database technology with estimated sales $15 - $20 billion per year ($50 billion with tools sales included), and growing at rate of possibly 25% per year.
  • OODBMS market still small, with sales of $150 million in 1996 and a 3% market share in 1997.
  • Some expect OODBMS market to grow at over 50% per year, but unlikely to overtake RDBMS. 30/05/2007 DBDI / OODB 44

Stonebraker’s View

30/05/2007 DBDI / OODB 45

Advantages of ORDBMSs

  • Resolves many of known weaknesses of RDBMS.
  • Reuse and sharing:
    • reuse comes from ability to extend server to perform standard functionality centrally;
    • gives rise to increased productivity both for developer and end-user.
  • Preserves significant body of knowledge and experience gone into developing relational applications.

30/05/2007 DBDI / OODB 46

Disadvantages of ORDBMSs

  • Complexity.
  • Increased costs.
  • Proponents of relational approach believe simplicity and purity of relational model are lost.
  • Some believe RDBMS is being extended for what will be a minority of applications.
  • OO purists not attracted by extensions either.
  • SQL now extremely complex.

SQL3 - New OO Data Management Features

  • Type constructors for row types and reference types.
  • User-defined types (distinct types and structured types) that can participate in supertype/subtype relationships.
  • User-defined procedures, functions, and operators.
  • Type constructors for collection types (arrays, sets, lists, and multisets).
  • Support for large objects – BLOBs and CLOBs.
  • Recursion.

User-Defined Types (UDTs)

  • SQL3 allows definition of UDTs.
  • May be used in same way as built-in types.
  • Subdivided into two categories: distinct types and structured types.
  • Distinct type allows differentiation between same underlying base types: CREATE TYPE OwnerNoType AS VARCHAR(5) FINAL; CREATE TYPE StaffNoType AS VARCHAR(5) FINAL;