Page 448 - Computer_Science_F5
P. 448
(d) Object-Oriented database model
In contrast to relational databases, which are table-oriented, an object-oriented
database architecture represents both the data and the relationship in a single
structure called an object. The object-oriented data model better represents real-
world problems. It allows us to store music, video, photographs, and other data Chapter Eight: Databases and Database Management Systems
FOR ONLINE READING ONLY
types in databases, which was not possible or efficient in the relational paradigm.
Furthermore, in this object-oriented database architecture, two or more objects with
various properties and methods are linked together, as in today’s object-oriented
databases and programming languages. These links are used to connect one thing
to another. Figure 8.5 shows an example in which each object has its properties
and methods. For example, consider the employee object, “Salary” is one of the
employee object properties, while “Get hired” is one of the methods.
Employee Department
Attributes Attributes
Name Dept_id Name
Job_Tittle Dept_name
Phone_no
Salary Methods
Dept_id
Methods Change Department
Get_Hired
Change Number
Figure 8.5: An example of object-oriented database model implementation
(e) Entity-Relationship database (ii) Relationships: Relationships define
model how entities interact or associate
The Entity-Relationship (ER) database with each other, including one-
model is a conceptual framework used to-one, one-to-many, or many-to-
for database design, illustrating the many connections. For instance, a
database’s structure through entities, customer may have multiple orders,
relationships, and attributes. Here are forming a one-to-many relationship.
key insights into the ER database model: (iii) Attributes: Attributes describe the
(i) Entities: Entities represent real- properties or characteristics of
world objects or concepts stored entities, like names or ages. They
in the database, such as people or are represented as columns within
products. They are organised into entity tables and can be simple or
tables within the database. composite.
439
Student’s Book Form Five
Computer Science Form 5.indd 439 23/07/2024 12:34

