SlideShare a Scribd company logo
1 of 91
Download to read offline
OBJECT DATABASE SYSTEM


       DR. SUSHIL KULKARNI
Object Database System :
       Objectives
Problems with RDBMS
What is ODBMS and ORDBMS ?
Advantages and Disadvantages
OO/ER model comparison and object
schema
Object type : Attributes and Methods
Collection types


                                       2
PROBLEMS
       3
Problems
 Poor representation of ‘real world’ Entities.

- Relations are too dry, contains only state of a
  relation.
- Relationships are not known.

 Example:



                                                    4
Problems !

                                  treats
                                   killed
         doctor                                           patient



  d_no                     d_no
                           d_no             p_no
                                            p_no   p_no             pname
                  dname



telno             city            since
                                    dok
                                                      paddress




                                                                        5
PROBLEMS !
Homogeneous data structure

 • All rows have the same number of attributes.
 • All values in a column are of the same type.
 • All attribute values are atomic.

Fixed length of data type, Limited data types
 • Can not store images, audio and video clips.
 • Spatial, temporal data can not be added.

                                                  6
PROBLEMS !

Reusability (inheritance) of a table is not possible.

              Options are:
        Object-oriented databases ?
        Object-relational databases ?



                                                        7
Begin with Example!

Storing Objects in a Relational Database
For the purposes of discussion, consider the inheritance
hierarchy which has a super class:
Staff
and three subclasses:
Manager,
SalesPersonnel,
Secretary.
                                                           8
Begin with Example!




                      9
Begin with Example!

Map each class to a relation:


Staff(staffNo, fName, IName,
     position, sex, DOB, salary)




                                   10
Begin with Example!

Map each subclass to a class and convert to relation
  Manager (staffNo, fName, IName, position, sex, DOB, salary,
            bonus, mgrStartDate)
 SalesPersonnel (staffNo, fName, IName, position, sex, DOB, salary,
                 salesArea, carAllowance)
 Secretary (staffNo, fName, IName, position, sex, DOB, salary,
            typingSpeed)


                                                                 11
Begin with Example!

Map the hierarchy to a single relation


Staff (staffNo, fName, IName, position, sex, DOB, salary, bonus,
      mgrStartDate, sales-Area, carAllowance, typingSpeed, typeFlag)




                                                                   12
ORDBMS Approach
The best solution of all above problems is in

Object Relational Database Management System.

For example: In Oracle ,we can create an object Staff
in database and then we can create three different
tables namely Manager, Salepersonnel and Secretary,
each refer to object created Staff as one of its
attribute.

The whole process of designing the above database   13

with syntax of Oracle 9i is explained here below:
Example
Creation of an object staff:
CREATE TYPE staff AS OBJECT(
           staffno        number(4) primary key,
           fname          varchar(20),
           lname          varchar(20),
           position       varchar(10),
           sex            varchar(1),
           DOB            date,
           salary number(8,2));                    14
Example
The object staff can be referenced in table Manager as one
of its attribute as shown below:
CREATE TABLE       manager(
             staff_detail         staff,
             bonus                number(5),
             mgrstartdate         date);


                                                       15
Example
Let us insert the values:
INSERT INTO manager VALUES
(staff(100,’ajay’,’arora’,’production
          manager’,’m’,’25-feb 1976’,15000 ),
 2000,’12-dec-2002’);




                                          16
Example
Similarly we create other tables as shown below:

   CREATE TABLE     salepersonnel(
             staff_detail staff,
             salearea varchar(25),
             carallowance number(7));

  CREATE TABLE     secretary(
           staff_detail staff,
           typingspeed number(3));
                                                   17
New data Models

In response to the increasing complexity of
database applications, two 'new' data models have
emerged:
Object-Oriented Data Model (OODM)
Object-Relational Data Model (ORDM)


                                               18
OO AND ER MODEL
          COMPARISION
OO DATA MODEL          E- R MODEL
Type                Entity definition
Object              Entity
Class               Entity set
Instance Variable   Attributes
N/A                 Primary Key
OID                 N/A
Method              N/A

                                        19
ODBMS
  Object Oriented        OO Concepts
  Features               OO Data model
                         OOPL

ODBMS          +     Data accessibility
                     Persistence
                     Back up & recovery
                     Transaction
Conventional DBMS
Features             Concurrency
                     Security
                                          20
ODBMS
        ODBMS = O ** DB ** MS
        ODBMS = O DB MS


ODBMS is the MS process methods applied for
DB data structure, which is complied with O
objects.



                                              21
ODBMS
Integrating database capabilities with object
programming language capabilities, the result is an
object-oriented database management system or
ODBMS.
An ODBMS makes database objects appear as
programming language objects in one or more existing
programming languages.
Object database management systems extend the object
programming language with transparently persistent
data, concurrency control, data recovery, associative
queries, and other database capabilities.
                                                      22
ODBMS
Following is the one of the approach for designing an
object-oriented database:
   The user will create classes, objects, inheritance and
  so on.
   Database system will store and manage these objects
  and classes.
   Translation layer is required to map the objects
  created by user into objects of the database system.
Object Database (ODBMS) for Java, written entirely in Java, and
compliant with the Java Data Objects (JDO) standard developed
                                                           23


By Sun.
Advantages
The object-oriented data model allows the 'real world' to be
modeled more closely.

ODBMSs allow new data types to be built from existing types.

More expressive query language then SQL.

Applicability to advanced database applications
There are many areas where traditional DBMSs have not been
particularly successful, such as, Computer-Aided Design (CAD),
CASE, Office Information Systems (OIS), and Multimedia
Systems. The enriched modeling capabilities of OODBMSs have    24

made them suitable for these applications.
Disadvantages
    No universally agreed data model for an ODBMS, and
    most models lack a theoretical foundation.
    In comparison to RDBMSs, the use of ODBMS is still
    relatively limited.
    There is no standard object-oriented query language.
`

    Lack of support for views.
    No adequate security mechanisms for accessing objects.

                                                           25
ORDBMS
   ORDBMS = ODBMS + RDBMS
   ORDBMS = ODBMS + RDBMS
          = (O + R) ** DB ** MS.
          = (O + R) DB MS.


ORDBMS is the MS process methods applied for DB
data structure, which is complied with O object and R
Relational concepts.


                                                    26
ORDBMS
This system simply puts an object oriented front end on a
relational database (RDBMS). When applications interface
to this type of database, it will normally interface as
though the data is stored as objects.
The system will convert the object information into data
tables with rows and columns and handle the data the
same as a relational database.


                                                     27
Advantages
The object type can be reuse and share in different application.

ORDBMS provides increased productivity both for the
developer and for the end user.

It is just an extension of existing relational approach.




                                                              28
Disadvantages
Complexity increases and associated costs.

Simplicity and purity of the relational model are lost.

Because the ORDBMS converts data between an object oriented
format and RDBMS format, speed performance of the database
is degraded substantially. This is due to the additional conversion
work the database must do.




                                                               29
OBJECT
         30
Object
Uniquely identifiable entity that contains both the
attributes that describe the state of a real-world
entity and the actions associated with it.

Definition is similar to definition of an entity,
however, object encapsulates both state and
behavior; an entity only models state.



                                                 31
Object Attribute
             ( Instance Variables)


Attributes - contains current state of an object.
    - Known as instance variables in OO environment.




                                                    32
                                                    21
Object State
Set of values that object’s attributes have at a
given time.
Can vary, although its OID remains the same.
To change the object’s state, change the values
of the object’s attributes.




                                                   33
Object : PERSON
Attribute Name          State: Attribute Value
PAN                     E12345
Last name               Tatkare
Middle name             Shekhar
First name              Aditi
DOB                     17/3/1986
Home Tel no.            22345643
Cell no.                9967770659
Email                   aditi@gmail.com




           These are the simple or primitive attributes   34
                                                          26
OBJECT SCHEMA: GRAPHICAL
        REPRESENTATION

   SHARED REPRESENTATION FOR ALL OBJECTS OF THE
   SHARED REPRESENTATION FOR ALL OBJECTS OF THE
   CLASS EMPLOYEE
   CLASS EMPLOYEE


      EMPLOYEE
    NAME       s
    ADDRESS    s
                       Aditi S. Tatkare
    DOB        s
                       112, Malabar Hill ..
                       17-March-1986
    SEX        s
                       F
    AGE         i
                       25

INSTANCE VARIABLES
 INSTANCE VARIABLES       OBJECT INSTANCES
                          OBJECT INSTANCES        35
Methods
Code that performs a specific operation on object’s
data.

Used to change the object’s attribute values or to
return the value of selected object attributes.

Represent real-world actions.




                                                      36
Method Components


Method=sum




 sum=0



               Sum = sum +1/x


Return (sum)   Return the sum



                                37
Depiction of an Object




                         38
DATA TYPES
   FOR
ATTRIBUTES
             39
Data types for attributes
Two types of attributes: Simple & Abstract

 Simple attribute are conventional attributes like
 number, string ,which takes on literal values.
 They are also called primitive attributes.




                                                40
                                                21
Object : PERSON ( cont’d)
Let us consider few attributes for Person object:
  Attribute Name   Attribute Value
  Address *        Street Address, House Number, City, State
                   Pin
  Dept *           HR, Accounts



*Represents an attribute represent one or more attributes.




                                                               41
                                                               26
Abstract Data Type
To add address information for a person , we have to
consider separate attributes: Street Address, House
Number, City , State and Pin using primitive data
types.

With abstract data typing, we can create a new data
type and manipulate the data as if it were primitive
data type.


                                                       42
                                                       21
Operations on ADT
DBMS allows to store and retrieve images using
CLOB and BLOB like an object of any other type
such as number.

One can define operations on an image data type
such as compress, rotate, shrink and crop.

 ADT is the combination of an atomic data type and
its associated methods.
                                                     43
                                                     21
STRUCTURED TYPE
  USING ORACLE


                  44
Structured Type: Object Type

  Structured type are type constructor . For example the
  structured type for object person is given below using oracle:

  Creating Object

 CREATE TYPE person AS OBJECT
 ( PIN           number,
   First_name    varchar2(15),
   Middle_name   varchar2(15),
   Last_name     varchar2(15),
   dob           date,
   Tel_no        varchar2(10),
   salary        number,
   MEMBER FUNCTION raise_sal RETURN NUMBER
  );
/
 Type created.
                                                                   45
Create EMP Table

Creating Table with ADT Object Datatype

Now we will create EMP table for employees.

 CREATE TABLE EMP
 ( EMPID        Number primary key,
   EMPLOYEE     PERSON);

 Table created.




                                              46
EMP Structure


 Use     DESC command to see the table structure.


SQL> DESC EMP
 Name                      Null?    Type
 ----------------------- -------- ------------
 EMPID                     NOT NULL NUMBER
 EMPLOYEE                           PERSON




                                                    47
Insert into EMP
  We will now populate our table.

SQL> INSERT INTO EMP(empid, employee)
     VALUES(1001,
     person(122,'Sushil','Trymbak','Kulkarni',
            '29-jun- 1984','24144386',10000));
1 row created.

SQL> INSERT INTO EMP1 (empid, employee)
     VALUES(1002,
     person(124,‘Aditi',‘Shekhar',‘Tatkare',
            '17-may-1986','22345643',120000));
1 row created.




                                                 48
Select statement on EMP

We can select the records with simple SQL statement. E.g.

SELECT *
FROM EMP
/
EMPID
----------
EMPLOYEE(PIN, FIRST_NAME, MIDDLE_NAME, LAST_NAME, DOB,
   TEL_NO, SALARY)
-------------------------------------------------------
      1001
person(122,'Sushil','Trymbak','Kulkarni',
            '29-jun- 1984','24144386',10000)
      1002
person(124,‘Aditi',‘Shekhar',‘Tatkare',
            '17-march-1986','22345643',120000)
                                                            49
METHODS
          50
Modeling Object Behavior :
              Methods


Method - Defines behavior of an object, as a set of
encapsulated operations.

We can store methods in TYPE objects. We use
MEMBER FUNCTION or MEMBER PROCEDURE in
CREATE TYPE statement. Then we put the
definition of the method in CREATE TYPE BODY
statement.
                                                 51
                                                 26
Create Method Data type
CREATE TYPE BODY person AS
       MEMBER FUNCTION raise_sal RETURN NUMBER IS
       BEGIN
          RETURN salary * 1.1;
       END;
END;
/
Type body created.



THIS DEFINITION OF FUNCTION IS TO BE WRITTEN
       AFTHER PERSON TYPE IS CREATED.
                                                    52
OID
      53
Object Identity
Object identifier (OID) assigned to object when it is
created that is:
 –   System-generated.
 –   Unique to that object.
 –   Invariant.
 –   Independent of the values of its attributes (that is,
     its state).
 –   Invisible to the user.

                                                        54
OBJECT SCHEMA: GRAPHICAL
      REPRESENTATION
         STATE OF EMPLOYEE OBJECT INSTANCE
        STATE OF EMPLOYEE OBJECT INSTANCE



       EMPLOYEE OID X 20              SYSTEM
                                      SYSTEM
                                      GENERATED
                                      GENERATED
NAME    Aditi S. Tatkare
                                       INSTANCE
                                        INSTANCE
ADDRESS 112, Malabar Hill.             VARIABLE
                                        VARIABLE
DOB    17-March-1986
                                       VALUES
                                       VALUES
SEX     F
AGE     25


                                                   55
OBJECT SCHEMA: GRAPHICAL
        REPRESENTATION

      DEFINING THREE ABSTRACT DATA TYPE
      DEFINING THREE ABSTRACT DATA TYPE


   NAME           ADDRESS             DOB
F_NAME s       BLDG.NO    i       DAY   i
M_NAME s       STREET     s       MONTH i
L_NAME s       CITY       s       YEAR i
               STATE      s
               PIN        i


                                            56
OBJECT SCHEMA: GRAPHICAL
      REPRESENTATION

OBJECT REPRESENTATION FOR INSTANCES OF THE
OBJECT REPRESENTATION FOR INSTANCES OF THE
CLASS EMPLOYEE WITH ADT’S
CLASS EMPLOYEE WITH ADT’S

EMPLOYEE              Data Types
NAME                  NAME
ADDRESS               ADDRESS
DOB                   DOB
SEX                   SEX
AGE                   AGE


                                             57
OBJECT SCHEMA: GRAPHICAL REPRESENTATION


                       NAME OID X 201
 EMPLOYEE OID X 20
                       F_NAME Aditi
 NAME       X 201
                       M_NAME S.
 ADDRESS   X 202
                       L_NAME Tatkare
 DOB       X 203
 SEX       F
 AGE       25

                     ADDRESS OID X 202
   DOB OID X 203
                     BLDG.NO    112
   DAY  17           STREET    Malabar Hill
   MONTH 3           CITY       Mumbai
   YEAR 1987         STATE      MAHA.
                                              58
                     PIN       400018
Object Identity ≠ Object Equality

2 objects are identical if they have the same OID
                 (o1 == 02)

2 objects are equal if they have the same value
                 (o1 = 02)

              (o1 == 02) ⇒ (o1 = 02)
          (o1 = 02) ⇒ (o1 == 02) NON !

                                                    59
Object Identity - Implementation

In RDBMS, object identity is value-based: primary
key is used to provide uniqueness.

Primary keys do not provide type of object identity
required in OO systems:
 – key only unique within a relation, not across
   entire system.
 – key generally chosen from attributes of relation,
   making it dependent on object state.           60
Advantages of OIDs
They are efficient.

They are fast.

They cannot be modified by the user.

They are independent of content.

      Value + OID = object
                                       61
                                       25
INHERITANCE

          62
Inheritance




              63
Inheritance
The definition of an object type determines whether
subtypes can be derived from that type.

To permit subtypes, the object type must be defined
as not final. This is done by including the NOT
FINAL keyword in its type declaration.

For example:


                                                 64
Inheritance
CREATE TYPE person_typ AS OBJECT (
   pid            NUMBER,
   name           VARCHAR2(30),
   phone          VARCHAR2(20))
NOT FINAL;
/
Type Created.

CREATE TYPE student_typ UNDER person_typ (
    dept_id NUMBER,
    major VARCHAR2(30))
NOT FINAL;
/
                                             65
Type Created.
Inheritance
CREATE TYPE employee_typ UNDER person_typ (
    emp_id NUMBER,
    mgr VARCHAR2(30));
/
Type Created.

CREATE TYPE part_time_student_typ UNDER student_typ (
  number_hours NUMBER);
/

Type Created.



                                                        66
Inheritance
CREATE TABLE contacts (
  contact         person_typ,
  contact_date    DATE );

INSERT INTO contacts
VALUES (person_typ (12, 'Hemant Agashe', '99765432414'),
                    '24 Jun 2003' );
1 row created.

INSERT INTO contacts
VALUES (student_typ(51, 'Sameer Bhende', '9967452317', 12,
                    'HISTORY'),'24 Jun 2003' );
1 row created.

INSERT INTO contacts
VALUES (part_time_student_typ(52, 'Uday Chitale',
        '9978561234', 14,'PHYSICS', 20), '24 Jun 2003' );
1 row created.

                                                             67
Inheritance
Attributes in general can be accessed using the
dot notation. Attributes of a subtype of a row or
column's declared type can be accessed with the
TREAT function.

For example:




                                                    68
Inheritance
SELECT TREAT(contact AS student_typ).major FROM
   contacts;

TREAT(CONTACTASSTUDENT_TYP).MA
------------------------------

HISTORY
PHYSICS




                                                  69
Inheritance


SQL> SELECT TREAT(contact AS student_typ).major ,
   TREAT(contact AS person_typ).name FROM contacts;

TREAT(CONTACTASSTUDENT_TYP).MA TREAT(CONTACTASPERSON_TYP).NAME
------------------------------ ------------------------------
                               Hemant Agashe
HISTORY                        Sameer Bhende
PHYSICS                        Uday Chitale




                                                           70
COLLECTION
   TYPE
             71
Database Design For ORDBMS
Database designer can get an opportunity to use rich
variety of data types for ORDBMS.

Creating Collection Data types:

• A varray is an ordered collection of elements.
• A nested table can have any number of elements.




                                                       72
Database Design For ORDBMS


If you need

    • to store only a fixed number of items, or
    • to loop through the elements in order, or
    • to retrieve and manipulate the entire collection as a value,

then use a varray.



                                                                73
Database Design For ORDBMS


If you need

    • to run efficient queries on a collection,
    • handle arbitrary numbers of elements, or
    • do mass insert/update/delete operations,

then use nested relations.



                                                  74
Nested Relations
Motivation:
 o Permit non-atomic domains (atomic ≡ indivisible)
 o Example of non-atomic domain: set of integers,or set of
   tuples
 o Allows more intuitive modeling for applications with
   complex data
Intuitive definition:
 o allow relations whenever we allow atomic (scalar) values
   — relations within relations
 o Retains mathematical foundation of relational model
 o Violates first normal form.
                                                              75
Example of Nested Relations
Example: library information system
Each book has
 o title,
 o a set of authors,
 o Publisher, and
 o a set of keywords
Non-1NF relation books




                                      76
1NF Version of Nested Relation
        1NF version of books




             flat-books
                                 77
4NF Decomposition of Nested Relation

  Remove awkwardness of flat-books by assuming that the
  following multivalued dependencies hold:
   o title  author
   o title  keyword
   o title  pub-name, pub-branch

  Decompose flat-doc into 4NF using the schemas:
   o (title, author)
   o (title, keyword)
   o (title, pub-name, pub-branch)

                                                          78
4NF Decomposition of Nested Relation




                                   79
Example: Nested Table Type
CREATE TYPE BeerType AS OBJECT (
   name   CHAR(20),
   kind   CHAR(10),
   color  CHAR(10)
);
/
CREATE TYPE BeerTableType AS
   TABLE OF BeerType;
/
                                   80
Example: Nested Table Type
Use BeerTableType in a Manfs relation that
stores the set of beers by each manufacturer in
one tuple for that manufacturer.

  CREATE TABLE Manfs (
       name        CHAR(30),
       addr        CHAR(50),
       beers beerTableType
   );


                                                  81
Storing Nested Relations

Oracle doesn’t really store each nested table as a separate
relation --- it just makes it look that way.

Rather, there is one relation R in which all the tuples of all
the nested tables for one attribute A are stored.

Declare in CREATE TABLE by:
          NESTED TABLE A STORE AS R




                                                                 82
Example: Storing Nested Tables

CREATE TABLE Manfs (
     name CHAR(30),
     addr        CHAR(50),
     beers beerTableType
)
NESTED TABLE beers STORE AS BeerTable;




                                         83
Another Example of Nested Relation


Example:
dept = (dno, manager, employees, projects, locations)
employees = (ename, dependents)
projects = (pname, ploc)
locations = (dloc)
dependents = (dname, age)



                                                   84
Another Example of Nested Relation




                                     85
ORDBMS Vs RDBMS

Comparison Between Object-Relational and Relational tables:

  Using ORDBMS:
 CREATE TABLE emp
   (empid number,
    employee person);
  Using RDBMS:
       CREATE TABLE EMP
       ( empid number,...)

       CREATE TABLE address
       (addr_type varchar2(10),...)

      CREATE TABLE phone
      (ph_type     varchar2(12),...)                          86
RELATIONSHIPS

Represented using referenced attributes
implemented using OIDs
Binary relations are represented using their
cardinalities:
   (a) 1:1 relationships
   (b) 1:M relationships
   (c) M:N relationships



                                               87
1:1 RELATIONSHIPS

     BRANCH: OID1               MANAGER: OID6
Bno: B3                     sno:SG5
Address: V.N. Road          Name: Aditi Govitrikar
Tel_no: 22040256            Address: 77, Kambala Hill
Staff: {OID4, OID 5,…}      Position: Manager
Property:{OID2, OID 3,…}    Tel_no: 2380 3336
Manager: OID 6              Sex: F
                            DOB: 3-Jan-85
                            Bno: OID 1               88
1:M RELATIONSHIPS
          BRANCH :OID1        PROPERY_FOR RENT: OID2

Bno: B3                       pno:PG6

Address : V.N. Road           Address: 12,Cuff Parade

Tel_no: 22040256              Type: Flat

Staff: {OID4, OID 5,…}        Sno: OID4

Property:{OID2, OID 3,…}      Bno: OID 1

Manager: OID 6                PROPERY_FOR RENT: OID3

      SALES_STAFF: OID4       pno:PG16
                              Address: 15,Cuff Parade
Sno: SG14
                              Type: Flat
Name: Amir Khan
                              Sno: OID4
Address 14, Hughes Road
                              Bno: OID 1
Tel_no: 22214185
Bno: OID 1
                                                        89

Property:{OID2, OID 3,…}
REFERENTIAL INTEGRITY

    Branch instance OID1 references a Manager
    instance OID6
    If user deletes manager instance without
    updating the branch instance accordingly,
    referential integrity is lost
Techniques to handle referential integrity:
    Do not allow the user to explicit delete objects
    Allow user to delete/ modified objects when
    they are no longer required
                                                       90
Email: sushiltry@yahoo.co.in
                                                           91
Community: http://tech.groups.yahoo.com/group/dbmsnotes/

More Related Content

What's hot

Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Databasepuja_dhar
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapVikas Jagtap
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQLRam Kedem
 
Introduction To Msbi By Yasir
Introduction To Msbi By YasirIntroduction To Msbi By Yasir
Introduction To Msbi By Yasiryasir873
 
Data Warehouse Architecture.pptx
Data Warehouse Architecture.pptxData Warehouse Architecture.pptx
Data Warehouse Architecture.pptx22PCS007ANBUF
 
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...sparktc
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processingnurmeen1
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Vidyasagar Mundroy
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentalsMadhuri Kavade
 
A la découverte du Web sémantique
A la découverte du Web sémantiqueA la découverte du Web sémantique
A la découverte du Web sémantiqueGautier Poupeau
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NETrchakra
 
Wallchart - Data Warehouse Documentation Roadmap
Wallchart - Data Warehouse Documentation RoadmapWallchart - Data Warehouse Documentation Roadmap
Wallchart - Data Warehouse Documentation RoadmapDavid Walker
 
Sql server 2019 new features
Sql server 2019 new featuresSql server 2019 new features
Sql server 2019 new featuresGeorge Walters
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureKunal Anand
 

What's hot (20)

Database
DatabaseDatabase
Database
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtapOverview of Object-Oriented Concepts Characteristics by vikas jagtap
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Why Data Vault?
Why Data Vault? Why Data Vault?
Why Data Vault?
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Introduction To Msbi By Yasir
Introduction To Msbi By YasirIntroduction To Msbi By Yasir
Introduction To Msbi By Yasir
 
Data Warehouse Architecture.pptx
Data Warehouse Architecture.pptxData Warehouse Architecture.pptx
Data Warehouse Architecture.pptx
 
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processing
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)
 
Oodbms ch 20
Oodbms ch 20Oodbms ch 20
Oodbms ch 20
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentals
 
A la découverte du Web sémantique
A la découverte du Web sémantiqueA la découverte du Web sémantique
A la découverte du Web sémantique
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
What is a DATA DICTIONARY?
What is a DATA DICTIONARY?What is a DATA DICTIONARY?
What is a DATA DICTIONARY?
 
Sql commands
Sql commandsSql commands
Sql commands
 
Wallchart - Data Warehouse Documentation Roadmap
Wallchart - Data Warehouse Documentation RoadmapWallchart - Data Warehouse Documentation Roadmap
Wallchart - Data Warehouse Documentation Roadmap
 
Sql server 2019 new features
Sql server 2019 new featuresSql server 2019 new features
Sql server 2019 new features
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
 

Viewers also liked

Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbmsmaryeem
 
08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMS08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMSkoolkampus
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databasesSuhad Jihad
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
 
Nested table example
Nested table exampleNested table example
Nested table exampleKamal Raj
 
BAG Draft 102
BAG Draft 102 BAG Draft 102
BAG Draft 102 Owen Tan
 
Anil gupta presentation slides [compatibility mode]
Anil gupta presentation slides [compatibility mode]Anil gupta presentation slides [compatibility mode]
Anil gupta presentation slides [compatibility mode]Owen Tan
 
Mis chapter 4 database management - copy
Mis chapter 4   database management - copyMis chapter 4   database management - copy
Mis chapter 4 database management - copyAjay Khot
 
Anil ambani final
Anil ambani finalAnil ambani final
Anil ambani finalAjay Khot
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management SystemAjay Jha
 
Anil nembang: ZARA CASE STUDY
Anil nembang: ZARA CASE STUDYAnil nembang: ZARA CASE STUDY
Anil nembang: ZARA CASE STUDYAnil Nembang
 
Forms authentication
Forms authenticationForms authentication
Forms authenticationSNJ Chaudhary
 
Nosql availability & integrity
Nosql availability & integrityNosql availability & integrity
Nosql availability & integrityFahri Firdausillah
 
Java swing
Java swingJava swing
Java swingprofbnk
 

Viewers also liked (20)

Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbms
 
08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMS08. Object Oriented Database in DBMS
08. Object Oriented Database in DBMS
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databases
 
Object oriented dbms
Object oriented dbmsObject oriented dbms
Object oriented dbms
 
"Diffrence between RDBMS, OODBMS and ORDBMS"
"Diffrence between RDBMS, OODBMS and  ORDBMS""Diffrence between RDBMS, OODBMS and  ORDBMS"
"Diffrence between RDBMS, OODBMS and ORDBMS"
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
Parallel Database
Parallel DatabaseParallel Database
Parallel Database
 
Nested table example
Nested table exampleNested table example
Nested table example
 
BAG Draft 102
BAG Draft 102 BAG Draft 102
BAG Draft 102
 
Anil gupta presentation slides [compatibility mode]
Anil gupta presentation slides [compatibility mode]Anil gupta presentation slides [compatibility mode]
Anil gupta presentation slides [compatibility mode]
 
Mis chapter 4 database management - copy
Mis chapter 4   database management - copyMis chapter 4   database management - copy
Mis chapter 4 database management - copy
 
Anil ambani final
Anil ambani finalAnil ambani final
Anil ambani final
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management System
 
Anil nembang: ZARA CASE STUDY
Anil nembang: ZARA CASE STUDYAnil nembang: ZARA CASE STUDY
Anil nembang: ZARA CASE STUDY
 
Forms authentication
Forms authenticationForms authentication
Forms authentication
 
PyCologne
PyColognePyCologne
PyCologne
 
2310 b 11
2310 b 112310 b 11
2310 b 11
 
Nosql availability & integrity
Nosql availability & integrityNosql availability & integrity
Nosql availability & integrity
 
01 Ajax Intro
01 Ajax Intro01 Ajax Intro
01 Ajax Intro
 
Java swing
Java swingJava swing
Java swing
 

Similar to Chapt 1 odbms

A Comparative Study of RDBMs and OODBMs in Relation to Security of Data
A Comparative Study of RDBMs and OODBMs in Relation to Security of DataA Comparative Study of RDBMs and OODBMs in Relation to Security of Data
A Comparative Study of RDBMs and OODBMs in Relation to Security of Datainscit2006
 
Database management system overview
Database management system overviewDatabase management system overview
Database management system overviewNj Saini
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...Dipen Parmar
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseSonali Parab
 
Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management systemSaibee Alam
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf3BRBoruMedia
 
Comparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented DatabaseComparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented DatabaseEditor IJMTER
 
OODBMSvsORDBMSppt.pptx
OODBMSvsORDBMSppt.pptxOODBMSvsORDBMSppt.pptx
OODBMSvsORDBMSppt.pptxMEHMOODNadeem
 
ADBMS Object and Object Relational Databases
ADBMS  Object  and Object Relational Databases ADBMS  Object  and Object Relational Databases
ADBMS Object and Object Relational Databases Jayanthi Kannan MK
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbmsAnjaan Gajendra
 
Rx o technology. general prezentation.
Rx o technology. general prezentation.Rx o technology. general prezentation.
Rx o technology. general prezentation.Mumr
 
data base system to new data science lerne
data base system to new data science lernedata base system to new data science lerne
data base system to new data science lernetarunprajapati0t
 
Bca3020 database management system
Bca3020   database management systemBca3020   database management system
Bca3020 database management systemsmumbahelp
 

Similar to Chapt 1 odbms (20)

A Comparative Study of RDBMs and OODBMs in Relation to Security of Data
A Comparative Study of RDBMs and OODBMs in Relation to Security of DataA Comparative Study of RDBMs and OODBMs in Relation to Security of Data
A Comparative Study of RDBMs and OODBMs in Relation to Security of Data
 
Database management system overview
Database management system overviewDatabase management system overview
Database management system overview
 
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
 
Comparision
ComparisionComparision
Comparision
 
Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management system
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf
 
Dbms presentaion
Dbms presentaionDbms presentaion
Dbms presentaion
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Comparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented DatabaseComparison of Relational Database and Object Oriented Database
Comparison of Relational Database and Object Oriented Database
 
OODBMSvsORDBMSppt.pptx
OODBMSvsORDBMSppt.pptxOODBMSvsORDBMSppt.pptx
OODBMSvsORDBMSppt.pptx
 
Database System
Database SystemDatabase System
Database System
 
Dbms
DbmsDbms
Dbms
 
ADBMS Object and Object Relational Databases
ADBMS  Object  and Object Relational Databases ADBMS  Object  and Object Relational Databases
ADBMS Object and Object Relational Databases
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
 
Rx o technology. general prezentation.
Rx o technology. general prezentation.Rx o technology. general prezentation.
Rx o technology. general prezentation.
 
data base system to new data science lerne
data base system to new data science lernedata base system to new data science lerne
data base system to new data science lerne
 
ch02models.pptx
ch02models.pptxch02models.pptx
ch02models.pptx
 
ch02models.pptx
ch02models.pptxch02models.pptx
ch02models.pptx
 
Bca3020 database management system
Bca3020   database management systemBca3020   database management system
Bca3020 database management system
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

Chapt 1 odbms

  • 1. OBJECT DATABASE SYSTEM DR. SUSHIL KULKARNI
  • 2. Object Database System : Objectives Problems with RDBMS What is ODBMS and ORDBMS ? Advantages and Disadvantages OO/ER model comparison and object schema Object type : Attributes and Methods Collection types 2
  • 4. Problems Poor representation of ‘real world’ Entities. - Relations are too dry, contains only state of a relation. - Relationships are not known. Example: 4
  • 5. Problems ! treats killed doctor patient d_no d_no d_no p_no p_no p_no pname dname telno city since dok paddress 5
  • 6. PROBLEMS ! Homogeneous data structure • All rows have the same number of attributes. • All values in a column are of the same type. • All attribute values are atomic. Fixed length of data type, Limited data types • Can not store images, audio and video clips. • Spatial, temporal data can not be added. 6
  • 7. PROBLEMS ! Reusability (inheritance) of a table is not possible. Options are: Object-oriented databases ? Object-relational databases ? 7
  • 8. Begin with Example! Storing Objects in a Relational Database For the purposes of discussion, consider the inheritance hierarchy which has a super class: Staff and three subclasses: Manager, SalesPersonnel, Secretary. 8
  • 10. Begin with Example! Map each class to a relation: Staff(staffNo, fName, IName, position, sex, DOB, salary) 10
  • 11. Begin with Example! Map each subclass to a class and convert to relation Manager (staffNo, fName, IName, position, sex, DOB, salary, bonus, mgrStartDate) SalesPersonnel (staffNo, fName, IName, position, sex, DOB, salary, salesArea, carAllowance) Secretary (staffNo, fName, IName, position, sex, DOB, salary, typingSpeed) 11
  • 12. Begin with Example! Map the hierarchy to a single relation Staff (staffNo, fName, IName, position, sex, DOB, salary, bonus, mgrStartDate, sales-Area, carAllowance, typingSpeed, typeFlag) 12
  • 13. ORDBMS Approach The best solution of all above problems is in Object Relational Database Management System. For example: In Oracle ,we can create an object Staff in database and then we can create three different tables namely Manager, Salepersonnel and Secretary, each refer to object created Staff as one of its attribute. The whole process of designing the above database 13 with syntax of Oracle 9i is explained here below:
  • 14. Example Creation of an object staff: CREATE TYPE staff AS OBJECT( staffno number(4) primary key, fname varchar(20), lname varchar(20), position varchar(10), sex varchar(1), DOB date, salary number(8,2)); 14
  • 15. Example The object staff can be referenced in table Manager as one of its attribute as shown below: CREATE TABLE manager( staff_detail staff, bonus number(5), mgrstartdate date); 15
  • 16. Example Let us insert the values: INSERT INTO manager VALUES (staff(100,’ajay’,’arora’,’production manager’,’m’,’25-feb 1976’,15000 ), 2000,’12-dec-2002’); 16
  • 17. Example Similarly we create other tables as shown below: CREATE TABLE salepersonnel( staff_detail staff, salearea varchar(25), carallowance number(7)); CREATE TABLE secretary( staff_detail staff, typingspeed number(3)); 17
  • 18. New data Models In response to the increasing complexity of database applications, two 'new' data models have emerged: Object-Oriented Data Model (OODM) Object-Relational Data Model (ORDM) 18
  • 19. OO AND ER MODEL COMPARISION OO DATA MODEL E- R MODEL Type Entity definition Object Entity Class Entity set Instance Variable Attributes N/A Primary Key OID N/A Method N/A 19
  • 20. ODBMS Object Oriented OO Concepts Features OO Data model OOPL ODBMS + Data accessibility Persistence Back up & recovery Transaction Conventional DBMS Features Concurrency Security 20
  • 21. ODBMS ODBMS = O ** DB ** MS ODBMS = O DB MS ODBMS is the MS process methods applied for DB data structure, which is complied with O objects. 21
  • 22. ODBMS Integrating database capabilities with object programming language capabilities, the result is an object-oriented database management system or ODBMS. An ODBMS makes database objects appear as programming language objects in one or more existing programming languages. Object database management systems extend the object programming language with transparently persistent data, concurrency control, data recovery, associative queries, and other database capabilities. 22
  • 23. ODBMS Following is the one of the approach for designing an object-oriented database: The user will create classes, objects, inheritance and so on. Database system will store and manage these objects and classes. Translation layer is required to map the objects created by user into objects of the database system. Object Database (ODBMS) for Java, written entirely in Java, and compliant with the Java Data Objects (JDO) standard developed 23 By Sun.
  • 24. Advantages The object-oriented data model allows the 'real world' to be modeled more closely. ODBMSs allow new data types to be built from existing types. More expressive query language then SQL. Applicability to advanced database applications There are many areas where traditional DBMSs have not been particularly successful, such as, Computer-Aided Design (CAD), CASE, Office Information Systems (OIS), and Multimedia Systems. The enriched modeling capabilities of OODBMSs have 24 made them suitable for these applications.
  • 25. Disadvantages No universally agreed data model for an ODBMS, and most models lack a theoretical foundation. In comparison to RDBMSs, the use of ODBMS is still relatively limited. There is no standard object-oriented query language. ` Lack of support for views. No adequate security mechanisms for accessing objects. 25
  • 26. ORDBMS ORDBMS = ODBMS + RDBMS ORDBMS = ODBMS + RDBMS = (O + R) ** DB ** MS. = (O + R) DB MS. ORDBMS is the MS process methods applied for DB data structure, which is complied with O object and R Relational concepts. 26
  • 27. ORDBMS This system simply puts an object oriented front end on a relational database (RDBMS). When applications interface to this type of database, it will normally interface as though the data is stored as objects. The system will convert the object information into data tables with rows and columns and handle the data the same as a relational database. 27
  • 28. Advantages The object type can be reuse and share in different application. ORDBMS provides increased productivity both for the developer and for the end user. It is just an extension of existing relational approach. 28
  • 29. Disadvantages Complexity increases and associated costs. Simplicity and purity of the relational model are lost. Because the ORDBMS converts data between an object oriented format and RDBMS format, speed performance of the database is degraded substantially. This is due to the additional conversion work the database must do. 29
  • 30. OBJECT 30
  • 31. Object Uniquely identifiable entity that contains both the attributes that describe the state of a real-world entity and the actions associated with it. Definition is similar to definition of an entity, however, object encapsulates both state and behavior; an entity only models state. 31
  • 32. Object Attribute ( Instance Variables) Attributes - contains current state of an object. - Known as instance variables in OO environment. 32 21
  • 33. Object State Set of values that object’s attributes have at a given time. Can vary, although its OID remains the same. To change the object’s state, change the values of the object’s attributes. 33
  • 34. Object : PERSON Attribute Name State: Attribute Value PAN E12345 Last name Tatkare Middle name Shekhar First name Aditi DOB 17/3/1986 Home Tel no. 22345643 Cell no. 9967770659 Email aditi@gmail.com These are the simple or primitive attributes 34 26
  • 35. OBJECT SCHEMA: GRAPHICAL REPRESENTATION SHARED REPRESENTATION FOR ALL OBJECTS OF THE SHARED REPRESENTATION FOR ALL OBJECTS OF THE CLASS EMPLOYEE CLASS EMPLOYEE EMPLOYEE NAME s ADDRESS s Aditi S. Tatkare DOB s 112, Malabar Hill .. 17-March-1986 SEX s F AGE i 25 INSTANCE VARIABLES INSTANCE VARIABLES OBJECT INSTANCES OBJECT INSTANCES 35
  • 36. Methods Code that performs a specific operation on object’s data. Used to change the object’s attribute values or to return the value of selected object attributes. Represent real-world actions. 36
  • 37. Method Components Method=sum sum=0 Sum = sum +1/x Return (sum) Return the sum 37
  • 38. Depiction of an Object 38
  • 39. DATA TYPES FOR ATTRIBUTES 39
  • 40. Data types for attributes Two types of attributes: Simple & Abstract Simple attribute are conventional attributes like number, string ,which takes on literal values. They are also called primitive attributes. 40 21
  • 41. Object : PERSON ( cont’d) Let us consider few attributes for Person object: Attribute Name Attribute Value Address * Street Address, House Number, City, State Pin Dept * HR, Accounts *Represents an attribute represent one or more attributes. 41 26
  • 42. Abstract Data Type To add address information for a person , we have to consider separate attributes: Street Address, House Number, City , State and Pin using primitive data types. With abstract data typing, we can create a new data type and manipulate the data as if it were primitive data type. 42 21
  • 43. Operations on ADT DBMS allows to store and retrieve images using CLOB and BLOB like an object of any other type such as number. One can define operations on an image data type such as compress, rotate, shrink and crop. ADT is the combination of an atomic data type and its associated methods. 43 21
  • 44. STRUCTURED TYPE USING ORACLE 44
  • 45. Structured Type: Object Type Structured type are type constructor . For example the structured type for object person is given below using oracle: Creating Object CREATE TYPE person AS OBJECT ( PIN number, First_name varchar2(15), Middle_name varchar2(15), Last_name varchar2(15), dob date, Tel_no varchar2(10), salary number, MEMBER FUNCTION raise_sal RETURN NUMBER ); / Type created. 45
  • 46. Create EMP Table Creating Table with ADT Object Datatype Now we will create EMP table for employees. CREATE TABLE EMP ( EMPID Number primary key, EMPLOYEE PERSON); Table created. 46
  • 47. EMP Structure Use DESC command to see the table structure. SQL> DESC EMP Name Null? Type ----------------------- -------- ------------ EMPID NOT NULL NUMBER EMPLOYEE PERSON 47
  • 48. Insert into EMP We will now populate our table. SQL> INSERT INTO EMP(empid, employee) VALUES(1001, person(122,'Sushil','Trymbak','Kulkarni', '29-jun- 1984','24144386',10000)); 1 row created. SQL> INSERT INTO EMP1 (empid, employee) VALUES(1002, person(124,‘Aditi',‘Shekhar',‘Tatkare', '17-may-1986','22345643',120000)); 1 row created. 48
  • 49. Select statement on EMP We can select the records with simple SQL statement. E.g. SELECT * FROM EMP / EMPID ---------- EMPLOYEE(PIN, FIRST_NAME, MIDDLE_NAME, LAST_NAME, DOB, TEL_NO, SALARY) ------------------------------------------------------- 1001 person(122,'Sushil','Trymbak','Kulkarni', '29-jun- 1984','24144386',10000) 1002 person(124,‘Aditi',‘Shekhar',‘Tatkare', '17-march-1986','22345643',120000) 49
  • 50. METHODS 50
  • 51. Modeling Object Behavior : Methods Method - Defines behavior of an object, as a set of encapsulated operations. We can store methods in TYPE objects. We use MEMBER FUNCTION or MEMBER PROCEDURE in CREATE TYPE statement. Then we put the definition of the method in CREATE TYPE BODY statement. 51 26
  • 52. Create Method Data type CREATE TYPE BODY person AS MEMBER FUNCTION raise_sal RETURN NUMBER IS BEGIN RETURN salary * 1.1; END; END; / Type body created. THIS DEFINITION OF FUNCTION IS TO BE WRITTEN AFTHER PERSON TYPE IS CREATED. 52
  • 53. OID 53
  • 54. Object Identity Object identifier (OID) assigned to object when it is created that is: – System-generated. – Unique to that object. – Invariant. – Independent of the values of its attributes (that is, its state). – Invisible to the user. 54
  • 55. OBJECT SCHEMA: GRAPHICAL REPRESENTATION STATE OF EMPLOYEE OBJECT INSTANCE STATE OF EMPLOYEE OBJECT INSTANCE EMPLOYEE OID X 20 SYSTEM SYSTEM GENERATED GENERATED NAME Aditi S. Tatkare INSTANCE INSTANCE ADDRESS 112, Malabar Hill. VARIABLE VARIABLE DOB 17-March-1986 VALUES VALUES SEX F AGE 25 55
  • 56. OBJECT SCHEMA: GRAPHICAL REPRESENTATION DEFINING THREE ABSTRACT DATA TYPE DEFINING THREE ABSTRACT DATA TYPE NAME ADDRESS DOB F_NAME s BLDG.NO i DAY i M_NAME s STREET s MONTH i L_NAME s CITY s YEAR i STATE s PIN i 56
  • 57. OBJECT SCHEMA: GRAPHICAL REPRESENTATION OBJECT REPRESENTATION FOR INSTANCES OF THE OBJECT REPRESENTATION FOR INSTANCES OF THE CLASS EMPLOYEE WITH ADT’S CLASS EMPLOYEE WITH ADT’S EMPLOYEE Data Types NAME NAME ADDRESS ADDRESS DOB DOB SEX SEX AGE AGE 57
  • 58. OBJECT SCHEMA: GRAPHICAL REPRESENTATION NAME OID X 201 EMPLOYEE OID X 20 F_NAME Aditi NAME X 201 M_NAME S. ADDRESS X 202 L_NAME Tatkare DOB X 203 SEX F AGE 25 ADDRESS OID X 202 DOB OID X 203 BLDG.NO 112 DAY 17 STREET Malabar Hill MONTH 3 CITY Mumbai YEAR 1987 STATE MAHA. 58 PIN 400018
  • 59. Object Identity ≠ Object Equality 2 objects are identical if they have the same OID (o1 == 02) 2 objects are equal if they have the same value (o1 = 02) (o1 == 02) ⇒ (o1 = 02) (o1 = 02) ⇒ (o1 == 02) NON ! 59
  • 60. Object Identity - Implementation In RDBMS, object identity is value-based: primary key is used to provide uniqueness. Primary keys do not provide type of object identity required in OO systems: – key only unique within a relation, not across entire system. – key generally chosen from attributes of relation, making it dependent on object state. 60
  • 61. Advantages of OIDs They are efficient. They are fast. They cannot be modified by the user. They are independent of content. Value + OID = object 61 25
  • 64. Inheritance The definition of an object type determines whether subtypes can be derived from that type. To permit subtypes, the object type must be defined as not final. This is done by including the NOT FINAL keyword in its type declaration. For example: 64
  • 65. Inheritance CREATE TYPE person_typ AS OBJECT ( pid NUMBER, name VARCHAR2(30), phone VARCHAR2(20)) NOT FINAL; / Type Created. CREATE TYPE student_typ UNDER person_typ ( dept_id NUMBER, major VARCHAR2(30)) NOT FINAL; / 65 Type Created.
  • 66. Inheritance CREATE TYPE employee_typ UNDER person_typ ( emp_id NUMBER, mgr VARCHAR2(30)); / Type Created. CREATE TYPE part_time_student_typ UNDER student_typ ( number_hours NUMBER); / Type Created. 66
  • 67. Inheritance CREATE TABLE contacts ( contact person_typ, contact_date DATE ); INSERT INTO contacts VALUES (person_typ (12, 'Hemant Agashe', '99765432414'), '24 Jun 2003' ); 1 row created. INSERT INTO contacts VALUES (student_typ(51, 'Sameer Bhende', '9967452317', 12, 'HISTORY'),'24 Jun 2003' ); 1 row created. INSERT INTO contacts VALUES (part_time_student_typ(52, 'Uday Chitale', '9978561234', 14,'PHYSICS', 20), '24 Jun 2003' ); 1 row created. 67
  • 68. Inheritance Attributes in general can be accessed using the dot notation. Attributes of a subtype of a row or column's declared type can be accessed with the TREAT function. For example: 68
  • 69. Inheritance SELECT TREAT(contact AS student_typ).major FROM contacts; TREAT(CONTACTASSTUDENT_TYP).MA ------------------------------ HISTORY PHYSICS 69
  • 70. Inheritance SQL> SELECT TREAT(contact AS student_typ).major , TREAT(contact AS person_typ).name FROM contacts; TREAT(CONTACTASSTUDENT_TYP).MA TREAT(CONTACTASPERSON_TYP).NAME ------------------------------ ------------------------------ Hemant Agashe HISTORY Sameer Bhende PHYSICS Uday Chitale 70
  • 71. COLLECTION TYPE 71
  • 72. Database Design For ORDBMS Database designer can get an opportunity to use rich variety of data types for ORDBMS. Creating Collection Data types: • A varray is an ordered collection of elements. • A nested table can have any number of elements. 72
  • 73. Database Design For ORDBMS If you need • to store only a fixed number of items, or • to loop through the elements in order, or • to retrieve and manipulate the entire collection as a value, then use a varray. 73
  • 74. Database Design For ORDBMS If you need • to run efficient queries on a collection, • handle arbitrary numbers of elements, or • do mass insert/update/delete operations, then use nested relations. 74
  • 75. Nested Relations Motivation: o Permit non-atomic domains (atomic ≡ indivisible) o Example of non-atomic domain: set of integers,or set of tuples o Allows more intuitive modeling for applications with complex data Intuitive definition: o allow relations whenever we allow atomic (scalar) values — relations within relations o Retains mathematical foundation of relational model o Violates first normal form. 75
  • 76. Example of Nested Relations Example: library information system Each book has o title, o a set of authors, o Publisher, and o a set of keywords Non-1NF relation books 76
  • 77. 1NF Version of Nested Relation 1NF version of books flat-books 77
  • 78. 4NF Decomposition of Nested Relation Remove awkwardness of flat-books by assuming that the following multivalued dependencies hold: o title author o title keyword o title pub-name, pub-branch Decompose flat-doc into 4NF using the schemas: o (title, author) o (title, keyword) o (title, pub-name, pub-branch) 78
  • 79. 4NF Decomposition of Nested Relation 79
  • 80. Example: Nested Table Type CREATE TYPE BeerType AS OBJECT ( name CHAR(20), kind CHAR(10), color CHAR(10) ); / CREATE TYPE BeerTableType AS TABLE OF BeerType; / 80
  • 81. Example: Nested Table Type Use BeerTableType in a Manfs relation that stores the set of beers by each manufacturer in one tuple for that manufacturer. CREATE TABLE Manfs ( name CHAR(30), addr CHAR(50), beers beerTableType ); 81
  • 82. Storing Nested Relations Oracle doesn’t really store each nested table as a separate relation --- it just makes it look that way. Rather, there is one relation R in which all the tuples of all the nested tables for one attribute A are stored. Declare in CREATE TABLE by: NESTED TABLE A STORE AS R 82
  • 83. Example: Storing Nested Tables CREATE TABLE Manfs ( name CHAR(30), addr CHAR(50), beers beerTableType ) NESTED TABLE beers STORE AS BeerTable; 83
  • 84. Another Example of Nested Relation Example: dept = (dno, manager, employees, projects, locations) employees = (ename, dependents) projects = (pname, ploc) locations = (dloc) dependents = (dname, age) 84
  • 85. Another Example of Nested Relation 85
  • 86. ORDBMS Vs RDBMS Comparison Between Object-Relational and Relational tables: Using ORDBMS: CREATE TABLE emp (empid number, employee person); Using RDBMS: CREATE TABLE EMP ( empid number,...) CREATE TABLE address (addr_type varchar2(10),...) CREATE TABLE phone (ph_type varchar2(12),...) 86
  • 87. RELATIONSHIPS Represented using referenced attributes implemented using OIDs Binary relations are represented using their cardinalities: (a) 1:1 relationships (b) 1:M relationships (c) M:N relationships 87
  • 88. 1:1 RELATIONSHIPS BRANCH: OID1 MANAGER: OID6 Bno: B3 sno:SG5 Address: V.N. Road Name: Aditi Govitrikar Tel_no: 22040256 Address: 77, Kambala Hill Staff: {OID4, OID 5,…} Position: Manager Property:{OID2, OID 3,…} Tel_no: 2380 3336 Manager: OID 6 Sex: F DOB: 3-Jan-85 Bno: OID 1 88
  • 89. 1:M RELATIONSHIPS BRANCH :OID1 PROPERY_FOR RENT: OID2 Bno: B3 pno:PG6 Address : V.N. Road Address: 12,Cuff Parade Tel_no: 22040256 Type: Flat Staff: {OID4, OID 5,…} Sno: OID4 Property:{OID2, OID 3,…} Bno: OID 1 Manager: OID 6 PROPERY_FOR RENT: OID3 SALES_STAFF: OID4 pno:PG16 Address: 15,Cuff Parade Sno: SG14 Type: Flat Name: Amir Khan Sno: OID4 Address 14, Hughes Road Bno: OID 1 Tel_no: 22214185 Bno: OID 1 89 Property:{OID2, OID 3,…}
  • 90. REFERENTIAL INTEGRITY Branch instance OID1 references a Manager instance OID6 If user deletes manager instance without updating the branch instance accordingly, referential integrity is lost Techniques to handle referential integrity: Do not allow the user to explicit delete objects Allow user to delete/ modified objects when they are no longer required 90
  • 91. Email: sushiltry@yahoo.co.in 91 Community: http://tech.groups.yahoo.com/group/dbmsnotes/