slides16 - Schedule Today Mar 5(T x x More ODL OQL Read...

Info icon This 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.
Image of page 1

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

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

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

View Full Document Right Arrow Icon
Winter 2002 Arthur Keller – CS 180 16–4 Example: A Multiattribute Key class Courses (key (dept, number), (room, hours)) { ...}
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.”
Image of page 5

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

View Full Document Right 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.
Image of page 6
Image of page 7
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