Professional Documents
Culture Documents
ADMS Chapter One-1
ADMS Chapter One-1
Advanced Database
Management System
Instructor: Shewakena G.
Outline
● Overview
● Object Identity
● Object Structure
● Type Constructors
Chapter One ● Encapsulation of
Operation
● Methods & Persistence
Object-oriented ● Type Hierarchies &
Inheritance
Complex Objects
Database ●
● Polymorphism
● Multiple & Selective
Inheritance
● Data
■ Data is known facts that can be
recorded and that have implicit
meaning.
Introduction ● Database
○ A collection of related data with an implicit meaning
○ A database has the following implicit properties:
■ represents some aspect of the real world,
sometimes called the mini-world
■ a logically coherent collection of data with some
inherent meaning.
■ designed, built, and populated with data for a
specific purpose.
&
a n i ze d ■ It has an intended group of users and some
l org
Wel logical preconceived applications in which these users
are interested.
● DBMS
○ A database management system (DBMS)
Introduction DBMS is a collection of programs that enables
users to create and maintain a database.
○ There are two operation(Fasilitate) in
DBMS:
■ DDL: allows users to specify the data types and
structures and the constraints on the data to be stored in
the database.
● What is Object ?
OODBs
● The number operation are declared for each class,
and the signature (interface) of each operation is
included in the class definition.
● A method (implementation) for each operation must
be defined elsewhere using a programming language
● Object constructor operation (often called new),
Encapsulation in OODBs which is used to create a new object, and the
destructor operation, which is used to destroy
(delete) an object.
● An operation is typically applied to an object by
using the dot notation.
For example,
○ if d is a reference to a DEPARTMENT object, we
can invoke an operation such as no_of_emps by
writing d.no_of_emps. Similarly, by writing
d.destroy_dept, the object
● Persistence in databases refers to the ways in
which processes or objects can continue on, or
remain, even when systems are shut down.
○ When a created process needs persistence, non-
volatile storage, including a hard disk, is used
instead of volatile memory like RAM.
● Specifying Object Persistence via
○ Naming and
Methods and Persistence ○ Reachability
Naming
○ The naming mechanism involves giving an object
a unique persistent name within a particular
database.
○ It is not practical to give names to all objects in a
large database , so objects are made persistent by
using the second mechanism called reachability
Reachability
○ The reachability mechanism works by making the
object reachable from some other persistent object.
○ An object B is said to be reachable from an object
A if a sequence of references in the database lead
from object A to object B.
Creating persistent objects by naming and
reachability
Methods and
Persistence
Inheritance allows the definition of new types based on other
predefined types, leading to a type(or class) hierarchy.
A type is defined by assigning it a type name, and then defining a
number of attributes (instance variables) and operations (methods)
for the type
Type (class) Hierarchy
Type Hierarchies and ○ A type in its simplest form can be defined by it’s type name and a
listing of the names of its visible/public functions. Attributes
Inheritance (instance variables) and operations (methods) for the type are
together called functions
○ TYPE_NAME: function, function, . . . , function
○ For example a type that describe a character of person
○ Example: PERSON: Name, Address, Birthdate, Age
○ Name, Address ,and Birth_date functions can be
implemented as stored attributes, whereas the Age function
can be implemented as calculated value.
○ Subtype: when the designer or user must create a new type
that is similar but not identical to an already defined type
○ Subtype: inherits all the functions of the predefined type
(also known as the super type)
Type (class) Hierarchy
Example (1):
PERSON: Name, Address, Birthdate, Age, SSN
Manager salesStaff
Multiple and Selective
inheritance salesManager
○ The multiple inheritance is very problematic . The conflict arises
when the superclasses contain the same attributes or method.
○ It can be handled by the following ways:
■ Include both attributes/method and use the name of the
superclass as qualifier