Model & Prediksi Data | Model data berdasarkan objek [2.1/3]
Summary
TLDRThis script discusses data models, which are methods to represent data, its constraints, and relationships with the real world. It introduces two types of data models: object-based and record-based. Object-based models include entity-relationship models, semantic models, and object-oriented models. The entity-relationship model uses symbols like rectangles for entities, diamonds for relationships, and ovals for attributes. It also covers cardinality, such as one-to-one, one-to-many, many-to-one, and many-to-many relationships, using examples like citizens and ID cards. The object-oriented model views the real world as objects, with classes and attributes, and functions as methods of classes. The script concludes with a comparison to record-based models, emphasizing the object-oriented approach's focus on real-world objects as classes.
Takeaways
- π Data models represent data structures, constraints, and relationships with the real world.
- π There are two main types of data models: object-based and record-based.
- π Object-based data models include entity-relationship models, semantic models, and object-oriented models.
- π’ In entity-relationship models, entities are represented by rectangles, relationships by diamonds, attributes by ovals, and connections by lines.
- π Cardinality in entity-relationship models describes the possible relationships between entities, such as one-to-one, one-to-many, many-to-one, and many-to-many.
- π Semantic models are similar to entity-relationship models but use words instead of symbols to describe relationships.
- π Object-oriented models view the real world as a set of objects, each with attributes and methods.
- π Object-oriented models use classes to represent real-world objects, with attributes as characteristics of the class and methods as functions of the class.
- π Relationships in object-oriented models are not represented by symbols but are implied through class interactions.
- π Record-based data models focus on the structure of records and how they are organized and related within a database.
Q & A
What is a data model?
-A data model is a way to represent data, its constraints, and relationships with the real world.
How many types of data models are mentioned in the script?
-The script mentions two types of data models: one based on objects and the other based on records.
What are the components of an Entity-Relationship (ER) model?
-The components of an ER model include entities, relationships, attributes, and cardinalities.
What does the term 'entity' represent in an ER model?
-In an ER model, 'entity' represents an object in the real world.
What is the meaning of 'relationship' in the context of an ER model?
-A 'relationship' in an ER model refers to the connection between entities.
What are the symbols used to represent entities and relationships in an ER model?
-In an ER model, rectangles are used for entities, diamonds for relationships, ovals for attributes, and lines for connections.
What are the different cardinalities described in the script?
-The script describes four cardinalities: one-to-one, one-to-many, many-to-one, and many-to-many.
Can you provide an example of a one-to-one cardinality as mentioned in the script?
-An example of one-to-one cardinality is that one citizen can only have one ID card, and one ID card can only be owned by one citizen.
What is a semantic data model?
-A semantic data model is similar to an ER model but uses words instead of symbols to describe the relationships between objects.
What is an object-oriented data model?
-An object-oriented data model treats the real world as a set of objects, where each object is isolated and does not have relationships with other objects.
How are classes and attributes defined in an object-oriented data model?
-In an object-oriented data model, classes represent the blueprint of objects, and attributes are the characteristics of the class.
Outlines
π Understanding Data Models
This paragraph introduces the concept of data models as a way to represent data, constraints, and relationships with the real world. It explains that data models are divided into two types: object-based and record-based. The object-based model includes entity-relationship (ER) models, which consist of entities, relationships, attributes, and mappings using basic symbols like rectangles for objects, diamonds for relationships, ovals for attributes, and lines for connections. The paragraph also discusses cardinality in ER models, including one-to-one, one-to-many, many-to-one, and many-to-many relationships, providing examples for each. Additionally, it touches on the semantic model, which is similar to ER but uses words instead of symbols to describe relationships.
π¦ Object-Oriented Data Modeling
The second paragraph delves into object-oriented data modeling, which views the real world as a collection of objects. It contrasts this with the entity-relationship model, where objects are isolated and do not have relationships with each other. The paragraph uses the example of a 'class' to illustrate how objects are mapped to classes, with attributes representing characteristics and functions or procedures representing the behaviors of a class. It provides a specific example of a 'car' class, detailing attributes such as the number of seats, transmission type, and engine type, and functions like moving forward and backward. The summary emphasizes the object-oriented approach to data modeling, where the focus is on the objects and their interactions.
Mindmap
Keywords
π‘Model Data
π‘Entity-Relationship Model (ER Model)
π‘Cardinality
π‘Entity
π‘Relationship
π‘Attribute
π‘Object-Oriented Data Model
π‘Class
π‘Semantic Data Model
π‘Record-Based Data Model
π‘Normalization
Highlights
Data models can be considered as ways to represent data, constraints, and relationships with the real world.
Data models are divided into two types: based on objects and based on records.
Entity-Relationship (ER) model is characterized by four main components: entities, attributes, relationships, and mappings.
In ER models, entities are represented by rectangles, relationships by diamonds, attributes by ovals, and connections by lines.
Cardinality in ER models indicates the possible number of entities involved in a relationship, such as one-to-one, one-to-many, many-to-one, and many-to-many.
An example of one-to-one cardinality is a citizen having only one ID card, and an ID card being owned by only one citizen.
A one-to-many cardinality example is a citizen owning multiple vehicle registration documents, but each document belonging to only one citizen.
Many-to-one cardinality is illustrated by a student enrolling in one high school, while a high school can have many students.
Many-to-many cardinality is where multiple entities can relate to multiple other entities, such as a student participating in multiple extracurricular activities, and each activity being joined by many students.
Semantic models are similar to ER models but use words instead of symbols to describe relationships between objects.
An example of a semantic model is a simple representation of the relationship between banks, savings accounts, and customers.
Attributes in semantic models describe characteristics of entities, such as account numbers and balances for savings accounts.
Object-oriented data models view the real world as a set of objects, with each object encapsulated and having no relationships with other objects.
In object-oriented models, objects are mapped to classes, with attributes representing characteristics of the class and functions or procedures representing the class's behavior.
An example of an object-oriented model is a 'Car' class representing various types of cars in the real world, each with attributes like the number of seats and transmission type.
Functions in object-oriented models define the behavior of objects, such as moving forward and braking for a 'Car' class.
Record-based data models focus on the structure and organization of data records, rather than the relationships between objects.
Transcripts
twicsy Setelah mempelajari jenis-jenis
data Sekarang kita akan sama-sama
belajar tentang model data model data
dapat dikatakan sebagai cara untuk
merepresentasikan data batasan serta
hubungannya dengan dunia nyata model
data dibagi dua jenis untuk representasi
data yang pertama berdasarkan objek dan
kedua berdasarkan record model data
berbasis objek diantaranya model entity
relationship model semantik dan model
berorientasi objek karakteristik dan
istilah untuk model er adalah 1
dengan objek sebagai entitas yang kedua
adalah set entitas adalah kumpulan
entitas yang sama yang ketiga atribut
adalah karakteristik dari suatu entitas
yang keempat Relasi adalah hubungan
antar entitas yang satu dengan etiket
yang lain yang lima pemetaan entitas
dengan menggunakan simbol-simbol dasar
yang biasa digunakan pada model Ir
adalah persegi panjang untuk
menggambarkan objek di dunia nyata belah
ketupat untuk menghubungkan entitas
dengan entitas lain oval untuk mendapat
mendeskripsikan karakteristik tiap
entitas dan garis untuk penghubung set
entitas ada gambar ini kita lihat bahwa
persegi panjang itu disebut sebagai
handset entitas setan di Trans digunakan
untuk menggambarkan objek objek di dunia
nyata lalu ini adalah belah ketupat ini
disebut sebagai set relasi yang
digunakan untuk
yang sehat entitas dengan set entitas
lainnya selanjutnya adalah oval nah
gambar oval ini disebut sebagai atribut
digunakan untuk mendeskripsikan
karakteristik setiap entitas selanjutnya
adalah garis-garis digunakan untuk
sebagai penghubung antara set relasi
dengan set entitas ataupun menghubungkan
set entitas dengan atribut Selain itu
entity-relationship memiliki
kabinet-kabinet litas untuk menunjukkan
jumlah entitas yaitu pertama one-to-one
One atau satu ke-10 merupakan
kardinalitas dimana satu entitas hanya
dapat berelasi dengan satu entitas
lainnya dan berlaku sebaliknya contohnya
adalah satu penduduk hanya boleh
memiliki satu KTP atau satu KTP boleh
dimiliki hanya oleh satu penduduk
yang selanjutnya adalah want to many
many-to-one dan many-to-many one-to-many
atau satu ke banyak kuantum ini
merupakan kardinalitas dimana satu
entitas a dapat berelasi dengan banyak
entitas B lainnya dan satu entitas B
hanya dapat berelasi dengan satu entitas
a saja contohnya adalah satu penduduk
boleh memiliki banyak BPKB tetapi satu
BPKB hanya boleh dimiliki oleh satu
penduduk
yang selanjutnya adalah many-to-one atau
dari banyak ke-1 many Tuan merupakan
kardinalitas dimana satu entitas a dapat
berelasi hanya dengan satu entitas B
Adapun satu entitas b dapat berelasi
dengan banyak entitas a contoh nya
adalah seorang siswa dapat mendaftar di
1 SMA sedangkan 1 SMA itu bisa memiliki
banyak siswa yang selanjutnya adalah
many-to-many atau banyak ke banyak yaitu
kardinalitas dimana banyak entitas dapat
berelasi dengan banyak entitas lainnya
dan berlaku sebaliknya contohnya adalah
seorang siswa bisa mendaftar di banyak
ekskul sedangkan satu ekskul itu bisa
di banyak siswa selanjutnya adalah model
semantik modelnya mirip dengan entity
relationship yaitu menggunakan relasi
antar objek namun relasinya tidak
digambarkan dalam simbol tetapi dengan
kata-kata kita lihat bahwa ini adalah
salah satu model semantik ya contoh
model cantik semantik sederhana yang
menggambarkan hubungan antar bank
tabungan dan customer dimana sebuah bank
melayani tabungan dan mempunyai customer
dan customer yakni salah satunya bernama
Amir ya Ini adalah atribut-atribut dari
tabungan yaitu nomor rekening dan saldo
sedangkan atribut dari Aamir adalah
alamat dan nomor rekening yang c adalah
model data berorientasi objek yaitu
model data yang menganggap dunia nyata
sebagai sebuah objek pada model data ini
objek terisolasi dan tidak punya relasi
yang dengan objek yang lain Jika pada
entity relationship sebagai disebut
sebagai entitas D model-model berantas
objek setan tetap disebut sebagai class
karakteristik dan lab istilah untuk
model berotasi objek adalah memetakan
objek supaya kelas atribut merupakan
karakteristik dari kelas fungsi atau
prosedur merupakan fungsi dari sebuah
kelas contohnya adalah pada class mobil
Berikut ini yang merupakan representasi
dari berbagai jenis mobil dunia nyata
setiap mobil memiliki beberapa atribut
seperti jumlah kursi jenis transmisi
otomatis ataupun manual dan jenis mesin
yang digunakan dapat juga didefinisikan
fungsi mobil secara umum pada tiap mobil
seperti maju-mundur dan mengerem itulah
penjelasan model data berdasarkan objek
Thailand Jude ke model data yang kedua
yaitu model data berdasarkan record of
[Musik]
badges0
5.0 / 5 (0 votes)