15. 1.1. ความสัมพันธ์แบบ หนึ่งต่อหนึ่งความสัมพันธ์แบบ หนึ่งต่อหนึ่ง
(( One to one Relationships)One to one Relationships)
1.1. ความสัมพันธ์แบบ หนึ่งต่อหนึ่งความสัมพันธ์แบบ หนึ่งต่อหนึ่ง
(( One to one Relationships)One to one Relationships)
เป็นการแสดงความสัมพันธ์ของข้อมูล ของเอนทิตี้หนึ่ง
ว่ามีความสัมพันธ์กับข้อมูลในอีกเอนทิตี้หนึ่ง ใน
ลักษณะ หนึ่ง ต่อ หนึ่ง หรือเขียนได้เป็น 1:1 แสดงว่า
ข้อมูลเพียงหนึ่งข้อมูลของเอนทิตี้แรกมีความสัมพันธ์
กับข้อมูลในเอนทิตี้ที่สองเพียงข้อมูลเดียว
16. 2.2.ความสัมพันธ์แบบ หนึ่งต่อกลุ่มความสัมพันธ์แบบ หนึ่งต่อกลุ่ม
(( One to many Relationships)One to many Relationships)
2.2.ความสัมพันธ์แบบ หนึ่งต่อกลุ่มความสัมพันธ์แบบ หนึ่งต่อกลุ่ม
(( One to many Relationships)One to many Relationships)
เป็นการแสดงความสัมพันธ์ของข้อมูล ของเอนทิตี้
หนึ่งว่ามีความสัมพันธ์กับข้อมูลในอีกเอนทิตี้หนึ่ง
ในลักษณะ หนึ่ง ต่อ กลุ่ม หรือเขียนได้เป็น 1:N
แสดงว่าข้อมูลเพียงหนึ่งข้อมูลของเอนทิตี้แรกมี
ความสัมพันธ์กับข้อมูลในเอนทิตี้ที่สองหลายข้อมูล
เช่น
16/33
17. 3.3.ความสัมพันธ์แบบ กลุ่มต่อกลุ่มความสัมพันธ์แบบ กลุ่มต่อกลุ่ม (( ManyMany
to Many Relationships)to Many Relationships)
3.3.ความสัมพันธ์แบบ กลุ่มต่อกลุ่มความสัมพันธ์แบบ กลุ่มต่อกลุ่ม (( ManyMany
to Many Relationships)to Many Relationships)
เป็นการแสดงความสัมพันธ์ของข้อมูล ของเอนทิตี้
หนึ่งว่ามีความสัมพันธ์กับข้อมูลในอีกเอนทิตี้หนึ่ง
ในลักษณะ กลุ่ม ต่อ กลุ่ม หรือเขียนได้เป็น N:M
แสดงว่าข้อมูลเพียงหนึ่งข้อมูลของเอนทิตี้แรก มี
ความสัมพันธ์กับข้อมูลในเอนทิตี้ที่สองหลาย
ข้อมูล และทำานองเดียวกัน ข้อมูลเพียงหนึ่งข้อมูล
ของเอนทิตี้ที่สองมีความสัมพันธ์ในทางกลับกันกับ
ข้อมูลในเอนทิตี้ที่แรกหลายข้อมูล
29. 29/33
The Entity Relationship ModelThe Entity Relationship ModelThe Entity Relationship ModelThe Entity Relationship Model
Widely accepted and adapted
graphical tool for data modeling
Introduced by Chen in 1976
Graphical representation of entities
and their relationships in a
database structure
30. 30/33
The Entity Relationship Model-BasicThe Entity Relationship Model-Basic
StructureStructure
The Entity Relationship Model-BasicThe Entity Relationship Model-Basic
StructureStructure
Entity relationship diagram (ERD)
Uses graphic representations to
model database components
Entity is mapped to a relational table
Entity instance is row in table
Entity set is collection of like
entities
Connectivity labels types of
relationships
33. 33/33
The Object Oriented ModelThe Object Oriented ModelThe Object Oriented ModelThe Object Oriented Model
Object is described by its factual
content
Like relational model’s entity
Includes information about
relationships between facts within
object and relationships with other
objects
Unlike relational model’s entity
Subsequent OODM development
34. 34/33
Object Oriented Data Model- BasicObject Oriented Data Model- Basic
StructureStructure
Object Oriented Data Model- BasicObject Oriented Data Model- Basic
StructureStructure
Object: abstraction of a real-world
entity
Attributes describe the properties
of an object
Objects that share similar
characteristics are grouped in
classes
Classes are organized in a class
hierarchy
35. 35/33
A Comparison of the OO Model andA Comparison of the OO Model and
the ER Modelthe ER Model
A Comparison of the OO Model andA Comparison of the OO Model and
the ER Modelthe ER Model
36. 36/33
Summary : The Evolution ofSummary : The Evolution of
Data ModelsData Models
Summary : The Evolution ofSummary : The Evolution of
Data ModelsData Models