Presentation is loading. Please wait.

Presentation is loading. Please wait.

(C) 2000, The University of Michigan 1 Database Application Design Handout #10 March 17, 2000.

Similar presentations


Presentation on theme: "(C) 2000, The University of Michigan 1 Database Application Design Handout #10 March 17, 2000."— Presentation transcript:

1 (C) 2000, The University of Michigan 1 Database Application Design Handout #10 March 17, 2000

2 (C) 2000, The University of Michigan 2 Course information Instructor: Dragomir R. Radev (radev@si.umich.edu) Office: 305A, West Hall Phone: (734) 615-5225 Office hours: Thursdays 3-4 and Fridays 1-2 Course page: http://www.si.umich.edu/~radev/654w00 Class meets on Fridays, 2:30 - 5:30 PM, 311 WH

3 (C) 2000, The University of Michigan 3 Object-oriented data processing

4 (C) 2000, The University of Michigan 4 Introduction OOP objects: encapsulated structures with attributes and methods Interface + implementation Inheritance Polymorphism Transient and persistent objects

5 (C) 2000, The University of Michigan 5 Objects Object classes, object class libraries Object instances (objects) Methods: create, save, destroy, find, print

6 (C) 2000, The University of Michigan 6 Example EMPLOYEE –methods: Create, Save, Destroy,... –attributes: Number (R), Name (R), … SALESPERSON –methods: …, Assign (ORDER, ZipCode) –attributes: TotalCommission (R), TotalOrders (RW) CUSTOMER –methods: …, Find –attributes: Name (R), Phone (R), ZipCode (R), CurrentBalance (RW)

7 (C) 2000, The University of Michigan 7 Example (Cont’d) ITEM –methods: …, Find (Number), Take (ORDER, Quantity), Put (ORDER, Quantity) –attributes: …, Description (R), Price ORDER –methods: …, Print –attributes: Number (R), Date (R), Total (R), CustomerName (R), SalespersonName (R)

8 (C) 2000, The University of Michigan 8 Object persistence Pointers and swizzling Storing data and methods is done differently Storage: traditional file storage, relational DBMS (using METHODS relation), ODBMS

9 (C) 2000, The University of Michigan 9 ODBMS Integrated with object-oriented programming User-defined types Provide persistent object IDs and perform swizzling Single-level memory

10 (C) 2000, The University of Michigan 10 SQL3 Abstract data types: can be used in SQL expressions and can be stored in tables OBJECT and VALUE ADTs OBJECT ADTs have OIDs which can be made visible to other functions of tables

11 (C) 2000, The University of Michigan 11 EXAMPLE CREATE OBJECT TYPE employee WITH OID VISIBLE (name VARCHAR NOT NULL, number CHAR(7), salary UPDATABLE VIRTUAL GET with_get_salary SET WITH change_salary, PRIVATE hiredate DATE currentsalary CURRENCY PUBLIC ACTOR FUNCTION get_salary (:E employee) RETURNS employee {code to perform security processing and compute and set new currentsalary, if appropriate} RETURN :E END FUNCTION

12 (C) 2000, The University of Michigan 12 EXAMPLE (Cont’d) ACTOR FUNCTION change_salary (:E employee) RETURNS employee {code to perform security processing and compute and set new currentsalary, if appropriate} RETURN :E END FUNCTION DESTRUCTOR FUNCTION remove_employee (:E employee) RETURNS NULL {code to get ready to delete employee data} DESTROY :E RETURN :E END FUNCTION,...

13 (C) 2000, The University of Michigan 13 Data structures for DB processing

14 (C) 2000, The University of Michigan 14 Maintaining order Flat files: no repeating groups, usually sorted Processing in multiple orders? Maintaining order using multiply- linked lists Maintaining order using indexes

15 (C) 2000, The University of Michigan 15 Representing binary relationships Simple networks (one-to-many): e.g., advisers + majors + students Linked-list representations of trees (one-to- many)

16 (C) 2000, The University of Michigan 16 Readings for next time Kroenke –Appendix A: Data Structures for Database Processing YRK (optional) –Chapter 16: MySQL and mSQL System Variables –Chapter 17: MySQL and mSQL Programs and Utilities Asilomar Report –http://www.acm.org/sigmod/record/issues/9812/asilomar.html


Download ppt "(C) 2000, The University of Michigan 1 Database Application Design Handout #10 March 17, 2000."

Similar presentations


Ads by Google