Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.

Similar presentations


Presentation on theme: "Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura."— Presentation transcript:

1 Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura University University year: 1435/1436 Advanced Database System

2 Outline Advanced Database Applications Weaknesses of RDBMSs
Object-Oriented Concepts Abstraction, encapsulation, data independence Objects and Attributes Object Identity Methods Classes Object-Oriented DBMSs Advanced Database System

3 Advanced Database Applications
Computer-aided design (CAD); Computer-aided manufacturing (CAM); Computer-aided software engineering (CASE); Network management systems; Office information systems (OIS) and multimedia systems; Digital publishing; Geographic information systems (GIS); Interactive and dynamic Web sites. Advanced Database System

4 Weaknesses of RDBMSs Poor representation of ‘real world’ entities
Semantic overloading Poor support for integrity and enterprise constraints Homogeneous data structure Limited operations Difficulty handling recursive queries Impedance mismatch Other problems with RDBMSs associated with concurrency, schema changes, and poor navigational access Advanced Database System

5 Object-Oriented Concepts
Abstraction is the process of identifying the essential aspects of an entity and ignoring the unimportant properties There are two fundamental aspects of abstraction: encapsulation and information hiding. The concept of encapsulation means that an object contains both the data structure and the set of operations that can be used to manipulate it. Advanced Database System

6 Object-Oriented Concepts
The concept of information hiding means that we separate the external aspects of an object from its internal details, which are hidden from the outside world (information hiding provides a form of data independence). These concepts simplify the construction and maintenance of applications through modularization Advanced Database System

7 Object-Oriented Concepts
The object structure can be changed without affecting any applications that use the object. There are two views of encapsulation: The object-oriented programming language (OOPL) view Example of Languages with object-oriented features:C++, C#, Java, PHP5….. The database adaptation of that view. Advanced Database System

8 Objects and Attributes
A uniquely identifiable entity that contains both the attributes that describe the state of a ‘real world’ object and the actions that are associated with it.. Examples of objects using the DreamHome case study: a branch office, a member of staff, and a property. Each object can be defined and maintained independently of the others (an object is very similar to the definition of an entity). Advanced Database System

9 Objects and Attributes
The current state of an object is described by one or more attributes (Instance variables). Attributes can be classified as simple or complex A simple attribute can be a primitive type such as integer, string, real, and so on. Example: branchNo with the literal value ‘B003’ Advanced Database System

10 Objects and Attributes
A complex attribute can contain collections and/or references Example, the attribute SalesStaff is a collection of Staff objects A reference attribute represents a relationship between objects and contains a value, or collection of values, which are themselves objects (A reference attribute is conceptually similar to a foreign key in the relational data model or a pointer in a programming language) Example: SalesStaff is, more precisely, a collection of references to Staff objects) Advanced Database System

11 Objects and Attributes
An object that contains one or more complex attributes is called a complex object Attributes are generally referenced using the ‘dot’ notation. Example, the street attribute of a branch object is referenced as: branchObject.street Advanced Database System

12 Object Identity A key part of the definition of an object is unique identity. In an object-oriented system, each object is assigned an Object Identifier (OID) when it is created that is: system-generated; unique to that object; invariant, in the sense that it cannot be altered during its lifetime. Once the object is created, this OID will not be reused for any other object, even after the object has been deleted; independent of the values of its attributes (that is, its state). Two objects could have the same state but would have different identities; invisible to the user (ideally). Advanced Database System

13 Methods An object encapsulates both data and functions into a self-contained package. In object technology, functions are usually called methods. Object showing attributes and methods. Example of a method. Advanced Database System

14 Classes Classes are blueprints for defining a set of similar objects
The attributes and associated methods are defined once for the class rather than separately for each object Example: all branch objects would be described by a single Branch class The objects in a class are called instances of the class. Advanced Database System

15 Comparison of Object-Oriented Data Modeling and Conceptual Data Modeling
Advanced Database System

16 Object-Oriented DBMSs
OODM (Object-Oriented Data Model): A (logical) data model that captures the semantics of objects supported in object-oriented programming. OODB (Object-Oriented Database): A persistent and sharable collection of objects defined by an OODM. OODBMS (Object-Oriented DBMS): The manager of an OODB. Advanced Database System

17 Object Oriented Data Model
Origins of object oriented data model Advanced Database System

18 The Object Query Language
The Object Query Language (OQL) provides declarative access to the object database using an SQL-like syntax OQL can be used both for both associative and navigational access: An associative query returns a collection of objects. How these objects are located is the responsibility of the ODMS, rather than the application program. A navigational query accesses individual objects and object relationships are used to navigate from one object to another. Advanced Database System

19 The Object Query Language
An OQL query is a function that delivers an object whose type may be inferred from the operator contributing to the query expression Advanced Database System

20 Bibliography Database Systems, A Practical Approach to Design, Implementation, and Management, Fourth edition by Thomas Connolly-Carolyn Begg Advanced Database System


Download ppt "Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura."

Similar presentations


Ads by Google