Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Basis Data Berorientasi Obyek

Presentasi serupa


Presentasi berjudul: "Basis Data Berorientasi Obyek"— Transcript presentasi:

1 Basis Data Berorientasi Obyek
PERTEMUAN KE-3

2 Basis Data Berorientasi Obyek
Basic Concepts Object Class Attribute Operation Interface (Polymorphism) Component Package Subsystem Relationships GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

3 PERANCANGAN BASIS DATA (KP130)
Class & Object REALITY Motorcycle Person Book MODEL GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

4 PERANCANGAN BASIS DATA (KP130)
Class & Object REALITY Motorcycle Person Book MODEL GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

5 PERANCANGAN BASIS DATA (KP130)
Class & Object REALITY Motorcycle Person Book Owns Reads MODEL GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

6 PERANCANGAN BASIS DATA (KP130)
Class & Object CLASS OBJECT GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

7 PERANCANGAN BASIS DATA (KP130)
Class & Object CLASS Person OBJECT Budi Tuti Murni GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

8 PERANCANGAN BASIS DATA (KP130)
Class & Object Class CLASS Object OBJECT Notation of Class & Object GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

9 PERANCANGAN BASIS DATA (KP130)
Class & Object Person CLASS Aditya Tuti Tyana OBJECT Notation of Class & Object GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

10 PERANCANGAN BASIS DATA (KP130)
Class & Object Class CLASS “instance of” Object OBJECT Notation of instance relationship GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

11 PERANCANGAN BASIS DATA (KP130)
Class & Object Person CLASS “instance of” Aditya OBJECT Example of instance relationship GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

12 PERANCANGAN BASIS DATA (KP130)
Class & Object Class/Objects are represented as rectangles ClassName ObjectName ClassName ObjectName ClassName ObjectName GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

13 PERANCANGAN BASIS DATA (KP130)
Class & Object A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics (Booch, 1999). An object is an instance of a class (Suatu object class menggambarkan kumpulan dari objek yang mempunyai sifat (atribut), perilaku umum (operasi), relasi umum dengan objek lain dan semantik umum.) A class is an abstraction: Emphasizes relevant characteristics Hides other characteristics GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

14 PERANCANGAN BASIS DATA (KP130)
Class & Object Sebelum menentukan kelas & objek, terlebih dulu dimulai dengan menentukan arti dari “kelas” dan “objek”. Objek adalah abstraksi dari suatu problem, menggambarkan kemampuan dari sistem untuk menyimpan informasi tentang objek tersebut. Objek merupakan pembungkusan (encapsulation) antara atribut dengan metoda(method) yang biasa disebut juga service dapat berupa fungsi atau prosedur. Kelas merupakan satu atau lebih objek dengan persamaan atribut dan metode, sedangkan kelas & objek adalah kelas dengan satu atau lebih objek didalamnya. GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

15 PERANCANGAN BASIS DATA (KP130)
Class & Object How Many Classes? GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

16 PERANCANGAN BASIS DATA (KP130)
Atribut Atribut menggambarkan data yang dapat memberikan informasi mengenai kelas atau objek dimana atribut tersebut berada. GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

17 PERANCANGAN BASIS DATA (KP130)
Operation (Methods) Methods disebut juga service atau operator adalah prosedur atau fungsi seperti yang terdapat dalam bahasa pascal pada umumnya, tetapi cara kerjanya agak berlainan. Method adalah subprogram yang tergabung dalam objek bersama–sama dengan atribut. Method dipergunakan untuk pengaksesan terhadap data yang terdapat dalam objek tersebut. GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

18 PERANCANGAN BASIS DATA (KP130)
Examples of Classes Programmer nama alamat tgl-Lahir buatProgram compileProgram cariProyek ClassName Atributte Operation/Method GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

19 PERANCANGAN BASIS DATA (KP130)
Examples of Object Programmer Andi Hakim Jl. Ciledug No. 8 buatProgram compileProgram cariProyek ClassName Atributte Operation/Method GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

20 PERANCANGAN BASIS DATA (KP130)
Basic Concepts Object Class Attribute Operation Interface (Polymorphism) Component Package Subsystem Relationships Sudah Dibahas Akan Dibahas Kemudian GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

21 PERANCANGAN BASIS DATA (KP130)
Name of the Class: Type in Boldface & Centered Name Atributtes Operations or Methods Describe the characteristics of the objects Used to manipulate the attributes or to perform other actions. Normally are called functions, but they are inside of a class and can be applied only to objects of that class. GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

22 PERANCANGAN BASIS DATA (KP130)
Name of the Class: Type in Boldface & Centered Name Atributtes Operations or Methods Bisnis Technical Software Pelanggan Sensor File Invoice Display Program Pinjaman Printer Windows Pesanan Mesin Icon Permintaan Tombol ToolBar Buku Kendali Menu Samples of a Class Name GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

23 PERANCANGAN BASIS DATA (KP130)
Describe the characteristics of the objects Name Atributtes Operations or Methods Mobil nomorPolisi merek namaPemilik Pesanan tanggal namaPemesan jumlahBayar spesifikasi namaPetugas Icon position backgroundColor picture sensitivity GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

24 PERANCANGAN BASIS DATA (KP130)
Name Atributtes Operations or Methods Used to manipulate the attributes or to perform other actions. Normally are called functions, but they are inside of a class and can be applied only to objects of that class. Pesanan tanggal namaPemesan jumlahBayar spesifikasi namaPetugas hitungHargaBayar simpanData periksaBarang Mobil nomorPolisi merek namaPemilik pindahGigi belok mengerem Icon position backgroundColor picture sensitivity blinking changeColor GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

25 PERANCANGAN BASIS DATA (KP130)
Classes Nasabah nama alamat nilaiKredit Set of Objects Defines name attributes operations GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

26 PERANCANGAN BASIS DATA (KP130)
Associations Relationship between instances of classes Pinjaman Nasabah Naming association: Avoid meaningless name like berhubungan_dengan terkait_dengan tersambung_dengan Name is often a verb phrase punya dapat jual GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

27 PERANCANGAN BASIS DATA (KP130)
Associations Relationship between instances of classes Pinjaman Nasabah Association only Pinjaman Nasabah punya Name of association Name of Association & multiplicity Pinjaman * 1 Nasabah punya GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

28 PERANCANGAN BASIS DATA (KP130)
Animal Dog Rat Chicken Animal Inheritance = Reusing Properties GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

29 PERANCANGAN BASIS DATA (KP130)
Animal SUPERCLASS / BASE CLASS Dog Rat Chicken SUBCLASS Inheritance = Reusing Properties GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

30 PERANCANGAN BASIS DATA (KP130)
Bangun Geometri SUPERCLASS / BASE CLASS SegiTiga Lingkaran SegiEmpat SUBCLASS Inheritance = Reusing Properties GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

31 PERANCANGAN BASIS DATA (KP130)
Bangun Geometri Generalization SegiTiga Lingkaran SegiEmpat Inheritance = Reusing Properties GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

32 PERANCANGAN BASIS DATA (KP130)
Bangun Geometri Specialization SegiTiga Lingkaran SegiEmpat Inheritance = Reusing Properties GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

33 PERANCANGAN BASIS DATA (KP130)
Mobil Sedan Truk Bis Mobil Sedan Truk Bis Generalization / Specialization Inheritance = Reusing Properties GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

34 PERANCANGAN BASIS DATA (KP130)
Generalization Definition – Generalization Generalization occurs when two or more classes are found to contain at least a few common attributes and/or behaviors. Other associated terms: Inheritance Is-a-kind-of GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

35 PERANCANGAN BASIS DATA (KP130)
Multiplicity * Zero or more, unrestricted 1..* At least one, but perhaps many more 1 Exactly 1 – minimum is 1; maximum is 1. Also called mandatory 1. 0..1 Minimum is zero; maximum is 1. 2..6 Minimum is 2; maximum is 6. GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

36 PERANCANGAN BASIS DATA (KP130)
Basic Class Diagrams Superclass Subclass Inheritance (Generalization) (is-a, kind-of) GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

37 PERANCANGAN BASIS DATA (KP130)
Generalization A relationship in which objects of the specialized element (the child) are substitutable for objects of the generalized element (parent) It is a “kind-of” relationship BankAccount name number balance withdraw CheckingAccount SavingAccount getInterest GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

38 Generalization (cont.)
How do we structure these classes? Person firstName lastName address Manager firstName lastName address salary supervisingDepartment Employee firstName lastName address salary GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

39 Generalization (cont.)
Employee and Manager are Person Manager is an Employee Person firstName lastName address Manager supervisingDepartment Employee salary GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

40 PERANCANGAN BASIS DATA (KP130)
Vehicle LandVehicle WaterVehicle Car Ship AmphibianVehicle GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

41 PERANCANGAN BASIS DATA (KP130)
Aggregation Models a whole/part relationship Both classes are conceptually at the same level Represents a “has-a” relationship The whole does not own the part GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

42 PERANCANGAN BASIS DATA (KP130)
Aggregation The Classes relate to each other as a Whole relates to its Part “has-a” relationship Universitas Fakultas Jurusan Car Engine Room Door GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

43 PERANCANGAN BASIS DATA (KP130)
Aggregation The Classes relate to each other as a Whole relates to its Part “has-a” relationship Car Engine Tire Cabin GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

44 PERANCANGAN BASIS DATA (KP130)
Composition Models a whole/part relationship with a strong ownership; when the whole dies, the part does so as well A object can be only part of one whole object The whole part is responsible for creation and destruction of its parts GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

45 PERANCANGAN BASIS DATA (KP130)
Composition Composition: occurs when objects of one class (the child class) cannot exist without objects of the other class participating in the association. Project Activity 1 1..* GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

46 PERANCANGAN BASIS DATA (KP130)
Composition The Classes relate to each other as a Whole relates to its Part “compose-of” relationship Hand Finger Invoice InvoiceItem GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

47 PERANCANGAN BASIS DATA (KP130)
Composition The Classes relate to each other as a Whole relates to its Part “compose-of” relationship Pohon Dahan Ranting Akar GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

48 PERANCANGAN BASIS DATA (KP130)
Student Class takes 0..* GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

49 PERANCANGAN BASIS DATA (KP130)
Mhs Mt-Kul daftar  ajar Mata-kuliah pengajar Dosen * GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

50 PERANCANGAN BASIS DATA (KP130)
Mhs Mt-Kul daftar  ajar Mata-kuliah pengajar Dosen GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

51 PERANCANGAN BASIS DATA (KP130)
Person Student Class takes Brain Money GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

52 PERANCANGAN BASIS DATA (KP130)
Flight Airplane CargoFlight PassengerFlight PassengerPlane CargoPlane 1 0..* flights GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)

53 PERANCANGAN BASIS DATA (KP130)
Airport Flight Passenger Airline * minAge Age departTime arrivalTime duration maxNrPassengers origin desti- nation name name: String {ordered} arriving Flights departing CEO 0..1 flights passengers book airline GASAL 2006/2007 PERANCANGAN BASIS DATA (KP130)


Download ppt "Basis Data Berorientasi Obyek"

Presentasi serupa


Iklan oleh Google