uml-odl - 1 Other High-Level Design Languages Unified...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Other High-Level Design Languages Unified Modeling Language Object Description Language 2 Object-Oriented DBMS’s ◆ Standards group: ODMG = Object Data Management Group. ◆ ODL = Object Description Language, like CREATE TABLE part of SQL. ◆ OQL = Object Query Language, tries to imitate SQL in an OO framework. 3 Framework – (1) ◆ ODMG imagines OO-DBMS vendors implementing an OO language like C++ with extensions (OQL) that allow the programmer to transfer data between the database and “host language” seamlessly. 4 Framework – (2) ◆ ODL is used to define persistent classes, whose objects are stored permanently in the database. ◗ ODL classes look like Entity sets with binary relationships, plus methods. ◗ ODL class definitions are part of the extended, OO host language. 5 ODL Overview ◆ A class declaration includes: 1. A name for the class. 2. Optional key declaration(s). 3. Element declarations. An element is either an attribute, a relationship, or a method. 6 Class Definitions class <name> { <list of element declarations, separated by semicolons> } 7 Attribute and Relationship Declarations ◆ Attributes are (usually) elements with a type that does not involve classes. attribute <type> <name>; ◆ Relationships connect an object to one or more other objects of one class. relationship <type> <name> inverse <relationship>; 8 Inverse Relationships ◆ Suppose class C has a relationship R to class D . ◆ Then class D must have some relationship S to class C . ◆ R and S must be true inverses. ◗ If object d is related to object c by R , then c must be related to d by S . 9 Example : Attributes and Relationships class Bar { attribute string name; attribute string addr; relationship Set<Beer> serves inverse Beer::servedAt; } class Beer { attribute string name; attribute string manf; relationship Set<Bar> servedAt inverse Bar::serves; } The type of relationship serves is a set of Beer objects. The :: operator connects a name on the right to the context containing that name, on the left. 10 Types of Relationships ◆ The type of a relationship is either 1. A class, like Bar. If so, an object with this relationship can be connected to only one Bar object. 2. Set<Bar>: the object is connected to a set of Bar objects. 3. Bag<Bar>, List<Bar>, Array<Bar>: the object is connected to a bag, list, or array of Bar objects. 11 Multiplicity of Relationships ◆ All ODL relationships are binary....
View Full Document

This note was uploaded on 02/21/2011 for the course CS 147 taught by Professor Dr.jeff during the Fall '07 term at SUNY Buffalo.

Page1 / 45

uml-odl - 1 Other High-Level Design Languages Unified...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online