Object Definition Language

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

Why Object-Oriented DBMS? Abstract data types Interface with host programming language (the impedance mismatch). Object identity: (peter, 40, {(john, 15,
Text-Book Chapters (7 and 8) Entity-Relationship Model
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Lecture #2 October 5 th, 2000 Conceptual Modeling Administration: –HW1 available –Details on projects –Exam date –XML comment.
Winter 2002Arthur Keller – CS 18015–1 Schedule Today: Feb. 28 (TH) u Datalog and SQL Recursion, ODL. u Read Sections , Project Part 6.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Fall 2001Arthur Keller – CS 18015–1 Schedule Nov. 15 (TH) Object Queries (OQL). u Read Sections 9.1. Project Part 6 due on Sunday night. Nov. 20 (T) More.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
Winter 2002Arthur Keller – CS 18016–1 Schedule Today: Mar. 5 (T) u More ODL, OQL. u Read Sections 9.1. Assignment 7 due. Mar. 7 (TH) u More OQL. u Read.
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.
1 Other High-Level Design Languages Unified Modeling Language Object Description Language.
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,
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
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.
EXTENDED-ER (EER) MODEL CONCEPTS. Enhanced-ER (EER) Model Concepts  Basic ER diagram + more concepts =EER model  Additional concepts:  Subclasses/superclasses.
Enhanced Entity-Relationship and UML Modeling. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,
Enhanced Entity-Relationship Model (EER) 1. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,
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.
Entities and Attributes
Why Object-Oriented DBMS? Abstract data types (relational data model is too simple). Interface with host programming language Managing large number of.
Chapter 21 A Object Data Model - Intro Copyright © 2004 Pearson Education, Inc.
Database Management COP4540, SCS, FIU Relational Model Chapter 7.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Database Management COP4540, SCS, FIU Database Modeling A Introduction to object definition language (ODL)
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
By: Richard Fleischman & Sharon Young Advanced Data Models.
Entity – Relationship Model (E-R Model)
Object Definition Language
© D. Wong Ch. 2 Entity-Relationship Data Model (continue)  Data models  Entity-Relationship diagrams  Design Principles  Modeling of constraints.
Databases Illuminated
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
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.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Object Oriented Analysis and Design Class and Object Diagrams.
© D. Wong Security and User Authorization in SQL 8.7 pp. 410  Authorization ID = user name  Special authorization ID: PUBLIC  Privileges for:
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Copyright © 2004 Ramez Elmasri and Shamkant Navathe Enhanced-ER (EER) Model Concepts.
Data Modeling Using the Entity-Relationship (ER) Data Model.
© Shamkant B. Navathe CC Enhanced Entity-Relationship Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Topic 4 - Part I Enhanced Entity-Relationship and UML Modeling
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
1 Unified Modeling Language. 2 UML  UML is designed to model software, but has been adapted as a database modeling language. – No multiway relationships.
Lecture 3 A short revision of ER and EER modelling See R. Elmasri, S.B. Navathe. Fundamentals of Database Systems (third edition) Addison-wesley. Chapter.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
1 Database Modeling (Semantic data modeling) ER Data Model –A high-level conceptual data model –Proposed by P. Chen (1976) –Widely used in DB design process.
1. 2 Standards group: ODMG = Object Data Management Group. ODL = Object Description Language, like CREATE TABLE part of SQL. OQL = Object Query Language,
Why Object-Oriented DBMS?
Entity-Relationship Model
Enhanced Entity-Relationship (EER) Model
Entity-Relationship Model
Entity Relationship Model
(Ref: ODMG2.0, R Cattell et al, Morgan Kaufmann, 1997)
Database Design Oct. 3, 2001.
Database Design Why do we need it? Consider issues such as:
Entity-Relationship Model
Chapter 12 Outline Overview of Object Database Concepts
Lec 3: Object-Oriented Data Modeling
Object Definition Language
Sampath Jayarathna Cal Poly Pomona
Chapter 15: Object-Oriented Database Development
Sampath Jayarathna Cal Poly Pomona
CSC Database Management Systems
Enhanced Entity-Relationship (EER) Modeling
Object-Oriented DBMS’s
Presentation transcript:

Object Definition Language Design language derived from the OO community: Can be used like E/R as a preliminary design for a relational DB. CORBA ODMG ODL (design OQL (queries Relational design ODL OODMBS input

ODL Class Declarations Element Declarations Method Example interface < name > {elements = attributes, relationships, methods } Element Declarations attribute < type > < name > ; relationship < rangetype > < name > ; Method Example float gpa(in: Student) raises(noGrades) float = return type. in: indicates Student argument is read-only. Other options: out, inout. noGrades is an exception that can be raised by method gpa.

Banking Example 1 Keys: ss#, loanid, branchid name amount loandid address type borrower customer loans Belongs-to Customer-of branch branchid location Keys: ss#, loanid, branchid Cardinality constraint: each loan belongs to a single branch

Banking Example (II) interface Customer { attribute string name; attribute integer ss#; attribute Struct Addr {string street, string city, int zip} address; relationship Set<Loans> borrowed inverse Loans::borrower; relationship Set<Branch> has-account-at inverse Branch:patrons; key(ss#) } Structured types have names and bracketed lists of field-type pairs. Relationships have inverses. An element from another class is indicated by < class > :: Form a set type with Set<type>.

Loans Example (III) interface loans { attribute real amount; attribute int loanid; attribute Enum loanType {house, car, general} type; relationship Branch belongs-to inverse Branch::loans-granted; relationship Set<Customer> borrower inverse Customer::borrowed; key(loanid) } Enumerated types have names and bracketed lists of values.

Bank Example (IV) interface Branch { attribute integer branchid; attribute Struct Customer::Addr location; relationship Set<Loans> loans-granted inverse Loans::belongs-to; relationship Set<Customer> patrons inverse Customer::has-account-at; key(branchid); } Note reuse of Addr type.

ODL Type System Basic types: int, real/ float, string, enumerated types, and classes. Type constructors: Struct for structures and four collection types: Set, Bag, List, and Array.

Limitations on Nesting Relationship class collection Attribute Basic, no class struct collection

ER versus ODL E/R: arrow pointing to “one. ODL: don't use a collection type for relationship in the “many" class. Collection type remains in “one.” E/R: arrows in both directions. ODL: omit collection types in both directions ODL only supports binary relationship. Convert multi-way relationships to binary and then represent in ODL create a new connecting entity set to represent the rows in the relationship set. Problems handling cardinality constraints properly!!

Roles in ODL No problem; names of relationships handle roles.” manager interface employee { attribute string name; relationship Set<Employee> manager inverse Employee::worker; relationship Set<Employee> worker inverse Employee::manager } manager works for employee worker

Subclasses in ODL Subclass = special case = fewer entities/objects = more properties. Example: Faculty and Staff are subclasses of Employee. Faculty have academic year (9 month salaries) but staff has a full-year (12 month salary).

ODL Subclasses Follow name of subclass by colon and its superclass. interface Faculty:Employee { attribute real academic-year-salary; } Objects of the Faculty class acquire all the attributes and relationships of the Employee class. Inheritance in ODL and ER model differ in a subtle way in ODL an object must be member of exactly one class in ER an object can be member of more than one class

Keys in ODL Indicate with key(s) following the class name, and a list of attributes forming the key. Several lists may be used to indicate several alternative keys. Parentheses group members of a key, and also group key to the declared keys. Thus, (key(a1; a2; : : : ; an )) = “one key consisting of all n attributes." (key a1; a2; : : : ; an ) =“each ai is a key by itself. Keys are not necessary for ODL. Object identity and not keys differentiates objects