|
George Klington.A
|
|
j | ect
j An o ect represents a real world entity (Person), a concept
(Drama), a logical thing (Licence), a physical thing (Car)
j Every o ect has a unique | ect Identifier (|ID)
j System generated
j Classification
j Classification is the process of grouping together objects which have
common features.
j Programming languages have type systems and database systems
have data models to classify object.
j The name used for the classificatory group of values is usually either
class or type
type..
class Person
properties
name: String
address: String
birthDate: Date
operations
age(): Integer
end Person
||
j Encapsulation
j The integration of the description of data structure and operation
is called ? .
j | ects are composed of properties (values) and operations.
j This feature is missing in Relational Data ases (RDBs) and is
usually coded into the application.
j Inheritance
j A new class is usually descri ed in terms of one or more
previously defined classes from which the new class takes (
(
?)
?)
properties and operations. For instance, the following defines a
new class
? ::
¬
Student j Person ¬
¬
maor: String
¬
tutor: Lecturer
register(C: Course): Boolean
Student
]
|
|
j | ect |riented Data ases (||DBs) are inevita le when:
j Data is complex and varia le in size
j complex o ects
j inheritance
j DBMS characteristics
j Persistence
j Scala le
j Concurrency
j Fault tolerance
j Simple query support
||
j An ?? or ?
??
? is one which supports the
modeling of data as a stract entities, with o ect identity.
j An ?
? ? ?
? is an o ect system in which all data is
created as instances of classes which take part in an inheritance
hierarchy.
j An ?
? ? ?
? ?? ? (||DBMS) is a
DBMS with an o ect- ect-oriented logical data model.
j An ?
? ? ?
? is a data ase made up of o ects and
managed y an ||DBMS.
Ý
||
j UML can e used to aid in || Data ase
Design
j Use Case Diagrams
j Class Diagrams
j Sequence Diagrams
j State Diagrams
j RDBMSs ² two level storage model
j Application storage model in main & virtual memory
j Data ase storage model on disk
Main Memory
Main Memory
Secondary Storage
j Resident | ect Ta le (R|T)
j Easy implementation, potentially inefficient
j Pointer Swizzling
j More complex, more efficient
|
j Advantages
j Reuse
j Sharing
j Disadvantages
j Complexity
j Costs
||
"
Ý
Person
name: string
address: string
birthDate: date
age(): integer
Student
tutor tutees Lecturer Department
major: string
* 1
room: string worksFor staff deptId: string
register(C: Course): boolean salary: float
enrolledOn * 1 name: string
takeUnit(U: Unit): boolean joinDate: date
*
teachUnit(U: Unit): bollean getCourses(): Set(Course)
takes *
offers 1
takenBy *
students Course
Unit
1
courseCode: string dept
unitCode: string
description: string partOf units name: string
*
* *
getCourses(): Set(Course) getUnits(): Set(Unit)
||
Vl erson Vl Lecturer j erson Vl Course
!r! rti !r! rti !r ! rti
name: String room: Integer name: String
address: String tutees: set(Student)
offeredBy: Department
worksFor: Department
birthDate: Date hasStudents: set(Student)
teaches: set(Unit)
! r ti hasUnits: set(Unit)
! r ti
age(): Integer teachUnit(U: Unit): Boolean Course
erson Lecturer
Complexity
Cost
" !
"|Ý
###