Faeez, Franz & Syamim
Database – collection of persistent data Database Management System (DBMS) – software system that supports creation, population, and querying of a database Introduction
Relational Database Object Oriented Database Type of Database
set of tables containing data fitted into predefined categories. Each table (which is sometimes called a relation ) contains one or more data categories in columns. Each row contains a unique instance of data for the categories defined by the columns. was invented by E. F. Codd at IBM in Relational Database
Relational Database Management System (RDBMS) Consists of a number of tables and single schema (definition of tables and attributes) Students (sid, name, age, gpa) Students identifies the table sid, name, age, gpa identify attributes sid is primary key Relational Database
sidnameagegpa M.Nasir Rosyam Nor Example Table
Primary key – minimal subset of fields that is unique identifier for a tuple sid is primary key for Students cid is primary key for Courses Foreign key –connections between tables Courses (cid, instructor, quarter, dept) Students (sid, name, login, age, gpa) Relational Database
A database system that incorporates all the important object-oriented concepts Some additional features Unique Object identifiers Persistent object handling Object Oriented Database (OOdb)
Object Oriented Concepts Abstract Data Types Class definition, provides extension to complex attribute types Encapsulation Implementation of operations and object structure hidden Inheritance Sharing of data within hierarchy scope, supports code reusability Polymorphism Operator overloading Object Oriented Database
Advantages of OODB Designer can specify the structure of objects and their behavior (methods) Better interaction with object-oriented languages such as Java and C++ Definition of complex and user-defined types Encapsulation of operations and user-defined methods Object Oriented Database
Object Query Language (OQL) Declarative query language Not computationally complete Syntax based on SQL (select, from, where) Additional flexibility (queries with user defined operators and types) Object Oriented Database
Relational DatabaseObject Oriented Database MatureNew Extensive testedShortage of experience, quality programmers Vast amounts of data in this format already Lack consensus on standard, definition, etc. Programmers know how to optimize for high-speed retrieval Performance concerns Using SQLUsing OQL Relational vs Object- Oriented Database