1 / 25

Object-Database

Compare. Extend. New data. OODBMS. Object-Database. Challenge. Identity. Inheritance. Design. Object. Class. OQL. OODBMS. Data model. ODL. OODBMS. ODMG Data Model. Được tạo bởi ODMG năm 1991. Là mô hình chuẩn cho các CSDL đối tượng . Định nghĩa đối tượng qua ODL.

orea
Download Presentation

Object-Database

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Compare Extend New data OODBMS Object-Database Challenge Identity Inheritance Design

  2. Object Class OQL OODBMS Data model ODL

  3. OODBMS

  4. ODMG Data Model • Đượctạobởi ODMG năm 1991. • Làmôhìnhchuẩnchocác CSDL đốitượng. • Địnhnghĩađốitượng qua ODL. • Truyvấnđốitượng qua OQL. • Hỗtrợnhiềukiểudữliệuvàhàmdựngkiểu. • Cơsởcho OODBMS.

  5. Kháiniệm 1. Đốitượng (Object): cóđịnhdanh (OID) duynhất. 2. Lớp (Class): Mỗiđốitượnglàmộtthểhiệncủalớp. Vídụ: Collection of object OBJECT CLASS Unique oid Same properties

  6. Kháiniệm 3. Thuộctính (Attribute): - Thuộctínhđơngiản. - Thuộctínhphứctạp. Vídụ:

  7. Kháiniệm 4. Mốikếthợp (relationship): - Một – một: - Một – nhiều: - Nhiều – nhiều: - Cómộtquanhệnghịchtươngứng - inverse relationship. - Cótênmốikếthợpvàkiểudữliệu.

  8. Kháiniệm 4. Mốikếthợp (relationship): Vídụ:

  9. Kháiniệm 5. Phươngthức (method): - Làcáchoạtđộngcủacácđốitượng. - Khônggiốngvới stored procedure trongmôhìnhquanhệ - Cótênphươngthức, tênvàkiểucủamỗiđốisố, kiểucủagiátrịtrảvề.

  10. Object Model vs Relation Model Object Model Relation Model ThemeGallery is a Design Content & Contents mall developed by Guild Design Inc. Similar Similar Similar Similar Similar Object TupleDigital Entity Class Attribute Attribute Relation Relation OID Primary key

  11. Object Data Language – ODL • Hỗtrợcáckháiniệmngữnghĩacủa OODBMS. • Khôngphụthuộcvàobấtkỳngônngữlậptrìnhnào. • Dùngđểtạocácđặcđiểmcủađốitượng. • Khôngđượcdùngđểxửlý CSDL.

  12. Vídụ showAt nowShowing

  13. Vídụ Class Collection of Class interface Movie (extent Movies key movieName) { attributedate start; attributedate end;attributestringmovieName;relationship Set<Theater> shownAtinverse Theater::nowShowing; }

  14. Vídụ interface Theater (extent Theaters key theaterName) { attributestringtheaterName; attributestring address; attribute integerticketPrice;relationshipSet<Movie> nowShowinginverse Movie:: shownAt; float numshowing() raises(errorCountingMovies); }

  15. Vídụ interface SpecialShow extends Movie(extent SpecialShows){ attribute integer maximumAttendees; attribute stringbenefilCharity; }

  16. Object Query Language - OQL • Làngônngữtruyvấncủa ODMG. • Làmviệcgiốngvớingônngữlậptrìnhnhư C++. • Cấutrúctươngtựnhư SQL vớicácđiểmđặctrưngcủađốitượng. • Cúpháp: SELECT – FROM - WHERE

  17. Vídụ SELECTmname: M.movieName, tname: T.theaterName FROM Movies M, M.shownAt T WHERET.numshowing() > 1

  18. Vídụ SELECTT.ticketPrice, avgNum: AVG(SELECTP.T.numshowing() FROM partition P) FROM Theaters T GROUP BYT.ticketPrice

  19. Vídụ SELECT low, high, avgNum: AVG(SELECTP.T.numshowing() FROM partition P) FROM Theaters T GROUP BYlow: T.ticketPrice < 5, high:T.ticketPrice >= 5

  20. Vídụ (SELECTT.theaterName FROM Theaters T ORDER BYT.ticketPrice DESC) [0:4]

  21. Compare Extend New data ODL, OQL Object-Database Challenge Identity Inheritance Design

  22. RDBMS versus ORDBMS • RDBMS khônghỗtrợphầnmởrộngcủa ORDBMS. • RDBMS dễsửdụnghơnvìnócóíttínhnănghơn. • RDBMS ítlinhhoạthơn ORDBMS.

  23. OODBMS vs ORDBMSSimilarities • Hỗtrợcáckiểucócấutrúc, kiểuđốitượng, ADTS vàkếthừa. • Hỗtrợngônngữtruyvấnđểthaotáctrênkiểu collection: • ORDBMS: phầnmởrộngcủa SQL. • OODBMS: ODL/OQL. • ORDBMS thêmcáctínhnăngcủa OODBMS vào RDBMS. OODBMSpháttriểnngônngữtruyvấndựatrênngônngữtruyvấnquanhệ.

  24. OODBMS vs ORDBMSDifferences • OODBMSthêmngônngữlậptrìnhvào DBMS, trongkhiORDBMSthêmcáckiểudữliệuphongphúvào RDBMS. • OODBMScómụctiêulàtíchhợpliềnmạchvớingônngữlậptrình, trongkhiđâykhôngphảilàmụctiêuquantrọngcủa ORDBMS.

  25. OODBMS vs ORDBMSDifferences • OQL khôngđượchỗtrợhiệuquảtronghầuhết OODBMS, ngượclạichúnglàtrungtâmcủa ORDBMS. • OODBMS đãđượctốiưuhóađểhỗtrợchocácứngdụng HĐT vàcácngônngữ OO. ORDBMSs đượchỗtrợbởihầuhếtcác HQTCSDL hiện nay.

More Related