object and object relational databases n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Object and object-relational databases PowerPoint Presentation
Download Presentation
Object and object-relational databases

Loading in 2 Seconds...

play fullscreen
1 / 13

Object and object-relational databases - PowerPoint PPT Presentation


  • 69 Views
  • Uploaded on

Object and object-relational databases. Object databases vs. Object-relational databases. Object databases. Object-relational databases. Relational DBMS with some object features

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Object and object-relational databases' - shea


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
object and object relational databases

Object and object-relational databases

Object and object-relational databases

object databases vs object relational databases
Object databases vs. Object-relational databases

Object databases

Object-relational databases

Relational DBMS with some object features

Latest open SQL standard (2008) includes some OO features. Later versions not free. en.wikipedia.org/wiki/SQL

Some database management systems

Oracle

  • Stores complex objects
    • Data + functions
  • Uses classes and objects
    • As in object-oriented programming: Java, C#, etc.
  • Some database management systems
    • Gemstone
    • Objectivity
    • Versant
    • ObjectStore

Object and object-relational databases

object identity
Object identity
  • Every object in a object database must have a unique identity.
    • Called object identity (OID)
    • ID’s in relational databases must be unique within the table only.
  • OID generated by DBMS
  • OID must be immutable
  • Literals (simple values) have no OID

Object and object-relational databases

complex type structures
Complex type structures
  • Atoms
    • Single value types, like string, int, etc.
  • Struct aka. Tuple
    • Type generator: Heterogeneous members (different types)
    • Examples
      • Struct Name<firstname: string, lastname: string>
      • Struct Student<name: Name, address: string>
  • Collection aka. Multi-valued
    • Type generator: Homogeneous members (same type)
    • Set(T), List(T), bag(T), array(T), dictionary(T)
  • Sub-types
    • You can define a sub-type of a struct by extending the struct.

Object and object-relational databases

collections
Collections
  • Set(T)
    • Distinct members, duplicates not allowed
    • Java: Set<T>
  • Bag(T)
    • Duplicates members allowed
    • Java: Collection<T>
  • List(T)
    • Duplicates members allowed. Unlimited capacity
    • Ordered list
      • It makes sense to ask for 1st element, 2nd element, etc.
      • Order, is not necessarily sorting order
    • Java: List<T>
  • Array(T)
    • Like List(T), but Array(T) has a maximum size

Object and object-relational databases

example defining complex types
Example: Defining complex types

Object and object-relational databases

example defining complex types with operations
Example: Defining complex types with operations

Object and object-relational databases

object relational databases
Object-Relational databases
  • Object-relational database
    • Add some object oriented features to an otherwise relational database
      • Type constructors
      • Object identity
      • Operations
      • Inheritance / sub-types
    • Tables creates using simple types + ”homemade” types
  • Example Object-relational DBMS
    • Oracle has many OO features
    • Microsoft SQL Server has no OO features

Object and object-relational databases

odmg object model and odl
ODMG Object model and ODL
  • ODMG =Object Data Management Group
    • Standard committee for Object oriented databases
      • ODMG 1.0, 2.0, 3.0
      • Object model
      • ODL = Object Definition Language
  • ODL terms
    • Extent: Contains the persistent objects of a class
    • Key: One or more properties (attributes or relationships)
    • Factory object: similar to constructor in object-oriented programming

Object and object-relational databases

odmg database schema
ODMG database schema

Object and object-relational databases

odmg odl example
ODMG ODL example

Object and object-relational databases

object query language oql
Object Query Language (OQL)
  • Defined by ODMG
  • Writing queries for the ODMG object model
  • Basic structure
    • Select … from … where
      • As in ordinary SQL
  • Example

Select D.name

from D in Departments

where D.college = ’Engineering’

      • Departments is an ’extent’
      • D is a so-called iterator variable

Object and object-relational databases

object relational mapping orm
Object-relational mapping (ORM)
  • Alternative to object databases and object-relational databases
  • ORM programming technique to convert data between object-oriented programming languages and relational databases.
    • A virtual object database
  • Some frameworks
    • Hibernate for Java
      • NHibernate for Microsoft .NET
    • ADO.NET Entity Framework for Microsoft.NET

Object and object-relational databases