uml-odl - Languages 1 ObjectOrientedDBMSs x...

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

View Full Document Right Arrow Icon
1 Other High-Level Design  Languages Unified Modeling Language Object Description Language
Image of page 1

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

View Full Document Right Arrow Icon
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.
Image of page 2
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.
Image of page 3

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

View Full Document Right Arrow Icon
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.
Image of page 4
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.
Image of page 5

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

View Full Document Right Arrow Icon
6 Class Definitions class <name> { <list of element declarations, separated by semicolons> }
Image of page 6
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>;
Image of page 7

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

View Full Document Right Arrow Icon
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 .
Image of page 8
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.
Image of page 9

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

View Full Document Right Arrow Icon
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.
Image of page 10
11 Multiplicity of Relationships All ODL relationships are binary.
Image of page 11

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

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern