Chapter 3 Object Specification Languages Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National Univ.

Slides:



Advertisements
Similar presentations
Jane Reid, BSc/IT DB, QMUL, 25/2/02 1 Object-oriented DBMS Background to ODBMS ODBMS requirements Object components ODB conceptual design –Graphical ODB.
Advertisements

Object Databases Baochuan Lu. outline Concepts for Object Databases Object Database Standards, Languages, and Design Object-Relational and Extended-Relational.
Databases CIS 422. Lifetime of Data Transient results to the evaluations of expression Variables involved in procedure activation Global variables Dynamically.
Text-Book Chapters (7 and 8) Entity-Relationship Model
ODMG Standard: Object Model1 OBJECT-ORIENTED DATABASE SYSTEMS ODMG Standard: Object Model Susan D. Urban and Suzanne W. Dietrich Department of Computer.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 15 (Web): Object-Oriented Database Development
Object-Oriented Standards OMG OMDG. Overview Object Management Group (OMG) International non profit-making consortium founded in 1989 to address object.
Programs with SQL Host language + Embedded SQL Preprocessor Host Language + function calls Host language compiler Host language program Preprocessor Host.
Other Data Models. Text New edition (DBS the complete book): Chapter 4 Old edition (First course in DBS): –Section 2.1 –Section –Section 2.4.1,
Object Oriented Databases - Overview
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
1 Announcements Research Paper due Monday November 22.
Databases Illuminated Chapter 7 The Object-Oriented Model.
1 ODB Design Handling Associations in ODL M. Akhtar Ali School of Informatics.
1 ODB Design: Handling Associations and Inheritance in ODL M. Akhtar Ali School of Informatics.
Database Design April 3, Projects, More Details Goal: build a DB application. (almost) anything goes. Groups of 3-4. End of week 2: groups formed.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Data Modeling Using the Entity-Relationship Model
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Agenda  TMA03  M877 Block 3 Databases with Objects.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
Chapter 21 A Object Data Model - Intro Copyright © 2004 Pearson Education, Inc.
Seminar #: 9 (Object Oriented Database Schema in ODL) Advanced Databases (CM036) 1 Seminar 9 : OODB Schema in ODL Purpose To understand how an OODB is.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Chapter 2: Object Model Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National Univ.
CS 3630 Database Design and Implementation. 2 Mathematical Relation A mathematical relation is a subset of a Cartesian Product. A1  A2  A3  …  An.
Database Management COP4540, SCS, FIU Database Modeling A Introduction to object definition language (ODL)
1 Chapter 1 Introduction. 2 Introduction n Definition A database management system (DBMS) is a general-purpose software system that facilitates the process.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Chapter 21 Object Database Standards, Languages, and Design Copyright © 2004 Pearson Education, Inc.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
Object Definition Language
OOPSLA LAB. 1 Chapter 4 Object Query Languages Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National University.
Databases Illuminated
CSE 6331 © Leonidas Fegaras OODB1 Object-Oriented Databases and the ODMG Standard.
Database Design Why do we need it? – Agree on structure of the database before deciding on a particular implementation. Consider issues such as: –What.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Object Relational Features
© D. Wong Security and User Authorization in SQL 8.7 pp. 410  Authorization ID = user name  Special authorization ID: PUBLIC  Privileges for:
Seminar #: 10 (Object Oriented Database Design) Advanced DB Technologies (CG096) 1 Seminar 10 : OODB Design Purpose To understand how an OODB is structured.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
INTRODUCTION TO DATA MODELING CS 260 Database Systems.
The ODMG Standard for Object Databases
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Seminar #: 10a (Object Oriented Database Design) Advanced Databases (CM036) 1 Seminar 10a : OODB Design Purpose This seminar is the continuation of seminar.
OOPSLA Lab.1 Chapter 6 Smalltalk Binding Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National University.
Mapping associations with and without attributes using: references (reference collections) association arrays.
1 Advanced Databases – Lecture # 12: The ODMG Standard for Object Databases Advanced Databases The ODMG Standard for Object Databases.
1 ODB Design Handling Inheritance in ODL M. Akhtar Ali School of Informatics.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
1 ODMG. 2 Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital.
1 ODMG: ODL and OQL This lecture is a short version of: Lecture 11 (on ODL) & Lecture 12 (on OQL) M. Akhtar Ali School of Informatics.
OOPSLA Lab1 Chapter 7 Java Binding Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National University.
Object-Oriented Databases (chapter 2/3) Object Persistence - Introduction Persistent Programming Languages Specifying Object Persistence via Naming and.
Data Modeling Using the Entity- Relationship (ER) Model
ODMG Object Model, Object Definition Language (ODL)
Object-Oriented Databases and the ODMG Standard
Database Design Oct. 3, 2001.
Database Design Why do we need it? Consider issues such as:
OBJECTS & DATABASES Arnaud Sahuguet – CIS-550.
Seminar 10 : OODB Design (Self-Study)
Seminar 6 : OODB Schema in ODL
TODL - Temporal Object Definition Language
Appendix D: Network Model
Chapter 12 Outline Overview of Object Database Concepts
ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.
ODB Design: Handling Associations and Inheritance in ODL
Chapter 15: Object-Oriented Database Development
Presentation transcript:

Chapter 3 Object Specification Languages Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National Univ.

SNU OOPSLA Lab.2 Contents 3.1 Introduction 3.2 Object Definition Language 3.3 Object Interchange Format

SNU OOPSLA Lab Introduction Specification Language –used to represent ODMG-compliant object database management systems –used to define the schema, operations, and state of object database –facilitate the portability of database across ODMG-compliant implementation –provide a step toward the interoperability of ODBMs –ODL : Object Definition Language –OIF : Object Interchange Format

SNU OOPSLA Lab Object Definition Language(ODL)(1) Definition –a specification language of interfaces to object type ODL development principles –all semantic constructs of ODMG model –specification language(not full programming language) –programming language independence –OMG IDL(Interface Definition Language) compatibility –practical & short time implementable

SNU OOPSLA Lab Object Definition Language(ODL)(2) ODL mapping to other languages STEP/ExpressSQL3Other Language-Independent ODL Java C++SQL3SmalltalkOther

SNU OOPSLA Lab Specification(1) Type definition –achieve by specifying its interface or by its class in ODL ::= | ::= { [ ] } ::= interface ::= interface [ ] ::= { } ::= class [ extends ] [ ]

SNU OOPSLA Lab Specification(2) Type characteristics –supertype information, –extent naming, –specification of keys –simple example for the class definition class Professor ( extent professors ) { properties operations };

SNU OOPSLA Lab Specification(3) Instance properties –be specified in attributes and relationships specifications ::= | ::= ; | ;

SNU OOPSLA Lab Specification(4) Attributes specification –example class Professor ( extent professors ) { attribute string name; attribute unsigned short faculty_id[6]; attribute long soc_sec_no[10]; attribute set degrees; relationships operations };

SNU OOPSLA Lab Specification(5) Relationships –define a traversal path for relationship –include designation of the target type and information about the inverse traversal path class Professor ( extent professors ) { relationship set advises inverse Student::advisor; relationship set teaching_assistants inverse TA::works_for; relationship Department department inverse Department::faculty; operation }

SNU OOPSLA Lab An Example in ODL(1) Salary EmployeeCourse TAProfessor Student-IF Student Section Has_ prerequisites Is_prerequisites has_sections is_section_of takes is_taken_by has_TA assists is_taught_by teaches extends is-a many-to-many one-to-many one-to-one Legend :

SNU OOPSLA Lab An Example in ODL(2) Course type class Course ( extent courses ) { attribute string name; attribute string number; relationship list has_sections inverse Section::is_section_of; relationship Set has_prerequisites inverse Course::is_prerequisite_for; relationship Set is_prerequisite_for inverse Course::has_prerequisites; boolean offer(in unsigned short semester) raises(already_offered) boolean drop(in unsigned short semester) raises(not_offered) }

SNU OOPSLA Lab An Example in ODL(3) Section type class Section ( extent sections ) { attribute string number; relationship Professor is_taught_by inverse Professor::teaches; relationship TA has_TA inverse TA::assists; relationship Course is_section_of inverse Course::has_sections; relationship set is_taken_by inverse Student::takes; };

SNU OOPSLA Lab Object Interchange Format(OIF) Definition –a specification language used to dump and load the current state of an object DB to or from a file or set of files OIF development principles –support all object database state compliant to the ODMG object model –specification language for persistent object and their states –design according to related standards as STEP or ANSI –no keywords

SNU OOPSLA Lab Object Database States Items used to characterize the state of all objects –object identifiers –type bindings –attribute values –links to other objects

SNU OOPSLA Lab Basic Structure An OIF file contains object definitions Object tag names –specified with object identifier –unique in the OIF files(s) –visible within the entire set of OIF files –no forward declarations –cyclic usage of tag names

SNU OOPSLA Lab.17 Simple example Jack Person{} Physical clustering –definition Paul (jack) Engineering{} –meaning create a new persistent instance of the class Engineer “physically near” the object referenced by the identifier Jack “physically near” are implementation dependent tag name Object Definitions

SNU OOPSLA Lab Attribute Value Initialization(1) Simple example interface Person { attribute string Name; attribute unsigned short Age; }; Sally Person{Name “Sally”, Age 11} or Sally Person{Age 11, Name “Sally”} Short initialization format Sally Person{“Sally” 11} Copy initialization McBain(McPerth) Company{McPerth} Boolean literal initialization with boolean literal TRUE or FALSE

SNU OOPSLA Lab.19 struct PhoneNumber { unsigned short CountryCode; unsigned short AreaCode; unsigned short PersonCode; }; struct Address { string Street; string City; PhoneNumber Phone; }; interface Person { attribute string Name; attribute Address PersonAddres; }; Attribute Value Initialization(2) Character literals Integer literals Float literals String literals Initialization of structured type

SNU OOPSLA Lab.20 Sarah Person{Name “Sarah”, PersonAddress {Street “Willow Road”, City ‘Palo Alto”, Phone {CountryCode 1, AreaCode 415, PersonCode 1234}}} T1 Sample{Values{450, 23, 270, 22}} T1 Sample{Values{[0] 450, [1] 23, [2] 270, [3] 22}} = Attribute Value Initialization(3) Initialization of multidimensional attributes interface Sample { attribute unsigned short Values[1000]; }

SNU OOPSLA Lab.21 Interface Professor: Person { attribute set Degrees; }; Feynman Professor{Degrees{“Masters”,“PhD”}} Interface PolygonSet{ attribute array polygonRefPoints[10]; }; P2 PolygonSet{PolygonRefPoints{[0]{[0] 9.7, [1] 8.988,..}, …….. [10]{[0] 22.0, [1] 60.1, …}}}; Attribute Value Initialization(4) Initialization of collections

SNU OOPSLA Lab Link Definitions(1) Cardinality “One” relationships interface Person { relationship Company Employer inverse Company::Employees; }; Jack Person{Employer McPerth} Cardinality “Many” relationships interface Company { relationship set Employees inverse Person::Employer; }; McPerth Company{Employees{Jack, Joe, Jim}}

SNU OOPSLA Lab.23 Interface Person { relationship Employer inverse Company::Employees; relationship Property inverse Company::Owner; }; Interface Company { relationship set Employees inverse Person::Employer; relationship Person Owner inverse Person::Property; }; Jack Person{Employer McPerth} McPerth Company{Owner Jack} Link Definitions(2) Cycles

SNU OOPSLA Lab.24 interface Node { relationship set Pred inverse Node::Succ; relationship set Succ inverse Node::Pred; }; A Node{Pred {B}} E Node B Node{Pred{E}, Succ{C}} C Node{Pred{A}, Succ{F}} F Node Data Migration Forward declarations –visible within the entire set of OIF files –appear at arbitrary locations within the files

SNU OOPSLA Lab Command Line Utilities Dump database –dump a database –command odbdump Load database –load a database –command odbload ….