100 likes | 245 Views
Relational Databases. Chapter 17 Part 3: Implementation Object-Oriented Modeling and Design Byung-Hyun Ha bhha@pusan.ac.kr. Lecture Outline. Introduction General DBMS Concepts Relational DBMS Concepts Relational Database Design Advanced Relational DBMS. Introduction.
E N D
Relational Databases Chapter 17 Part 3: Implementation Object-Oriented Modeling and Design Byung-Hyun Ha bhha@pusan.ac.kr
Lecture Outline • Introduction • General DBMS Concepts • Relational DBMS Concepts • Relational Database Design • Advanced Relational DBMS
Introduction • OO paradigm can also be used to design databases • OO designs are efficient, coherent, and less prone to the update problems that plague may other database design techniques • Use of uniform design technique improves integration of database and programming language code
General DBMS Concepts • Database management system (DBMS) • A computer program for managing a permanent, self-descriptive repository of data • Reasons why developers use a DBMS • Crash recovery • Sharing between users • Sharing between applications • Security • Integrity • Extensibility • Data distribution
General DBMS Concepts • Life cycle for most database applications • Design the application • Devise a specific architecture for coupling the application to a database • Select a specific DBMS to serve as a platform • Design the database and write DBMS code to set up the proper database structures • Write programming language code to compensate for DBMS shortcomings, provide a user interface, validate data, and perform computation • Populate the database with information • Run the application
General DBMS Concepts • Three schema architecture (Fig. 17.1) • External schema layer • Conceptual schema layer • Internal schema layer
Relational DBMS Concepts • Three major parts of a RDBMS, as defined by Codd: • Data that is presented as tables • Attributes, tuples, simple values, and domains • Operators for manipulating tables • Projection, selection, and aggregation • Embodied in SQL • Integrity rules on tables • Primary key, foreign key • Others • Normal forms • Views
Relational Database Design • Extended three schema architecture for object models • The use of object IDs • Mapping object classes to tables • Fig. 17.5 and Fig. 17.6
Relational Database Design • Mapping binary associations to tables • Many-to-many association (Fig. 17.7) • On-to-many association • Using distinct association table (Fig. 17.9) • Buried foreign key (Fig. 17.10) • Advantages • Fewer tables and faster performance • Disadvantages • Less design rigor, reduced extensibility, and more complexity • Mapping ternary associations to tables (Fig. 12.12) • Mapping generalizations to tables (Fig. 12.16)
Advanced Relational DBMS • Advanced RDBMS • Extend the relational model with new data types, operators, and access methods • Advantages • Definitely adds to existing RDBMS functionality • Integrates well with existing relational databases • Data sharing • Disadvantages • Performance • Functionality • Security