slides16 - Schedule Today: Mar. 5 (T) x x More ODL, OQL....

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

View Full Document Right Arrow Icon
Winter 2002 Arthur Keller – CS 180 16–1 Schedule Today: Mar. 5 (T) More ODL, OQL. Read Sections 9.1. Assignment 7 due. Mar. 7 (TH) More OQL. Read Sections 9.2-9.3. Mar. 12 (T) Semistructured Data, XML, XQuery. Read Sections 4.6-4.7. Assignment 8 due. Mar. 14 (TH) Data Warehouses, Data Mining. Project Part 7 due. Mar. 16 (Sa) Final Exam. 12–3PM. In class.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Winter 2002 Arthur Keller – CS 180 16–2 ODL Subclasses Follow name of subclass by colon and its superclass. Example: Ales are Beers with a Color class Ales:Beers { attribute string color; } Objects of the Ales class acquire all the attributes and relationships of the Beers class. While E/R entities can have manifestations in a class and subclass, in ODL we assume each object is a member of exactly one class.
Background image of page 2
Winter 2002 Arthur Keller – CS 180 16–3 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( a 1 , a 2 , … , a n )) = “one key consisting of all n attributes.” (key a 1 , a 2 , … , a n ) = “each a i is a key by itself.” Example class Beers (key name) {attribute string name . . .} Remember : Keys are optional in ODL. The “object ID” suffices to distinguish objects that have the same values in their elements.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Winter 2002 Arthur Keller – CS 180 16–4 Example: A Multiattribute Key class Courses (key (dept, number), (room, hours)) { ...}
Background image of page 4
Winter 2002 Arthur Keller – CS 180 16–5 Translating ODL to Relations 1. Classes without relationships: like entity set, but several new problems arise. 2. Classes with relationships: a) Treat the relationship separately, as in E/R. b) Attach a many-one relationship to the relation for the “many.”
Background image of page 5

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

View Full DocumentRight Arrow Icon
Winter 2002 Arthur Keller – CS 180 16–6 ODL Class Without Relationships Problem: ODL allows attribute types built from structures and collection types. Structure: Make one attribute for each field.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS CS 180 taught by Professor Dr.arthur during the Fall '01 term at The University of Akron.

Page1 / 21

slides16 - Schedule Today: Mar. 5 (T) x x More ODL, OQL....

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

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