TG1 E4 R - Ontolan Data Models
TG1 E4 R - Ontolan Data Models
TG1 E4 R - Ontolan Data Models
___________________________________
Classcode: CS211N________________ Class Description: Information Management
Time: 11:00 PM__________________ Date: Feb 12 2024___________________
Objectives:
1. To determine the different data models
2. To determine how business rules are applied in a data analysis
3. To determine the basic building blocks of a data model
Background
The basic building blocks of all data models are entities, attributes, relationships, and
constraints.
1. Entity – is a collection of objects that are distinguishable from other objects by a set of
attributes, e.g., customer, account, student, etc.
2. Attribute– is the characteristics or properties of an entity, e.g., city, balance, surname
3. Relationship– is an association among entities. It could be a one-to-one, one-to-many, or
many-to-many relationship
4. Constraints– is the restriction placed on the data, e.g., Voter’s age must be greater than
seventeen-year-old.
1. Hierarchical Model
The entities and relationships between entities in this model are managed with the
help of a tree-like structure. The tree has a root and a related child.
Example:
The entities shown in Figure 3.1 are related with the following relationships:
Each Zone contains many Regions (1 Zone – many Regions)
Each Region contains many Areas (1 Region – many Areas)
Each Area contains many Salesman (1 Area – many Salesman)
Each Salesman sells many Items, and each Item is sold by many Salesman (1
Salesman – many Items and many Items – 1 Item)
Open your Microsoft Visio application and do the following problems. Save your file in
jpeg format and upload it to your eLearning account or computer laboratory account. Rename it
as E3_yourlastname_modeltype.jpg.
1. Consider the entities given below and draw their relational, object-oriented, and entity
relationship models.
2. Identify and explain the relationships between entities.
Batch table has a one-to-many relationship with Class table. The (batch) on the class
table, which serves as the main key for the Batch, is also used as a foreign key in the
Class table. This relationship exists because a batch represents a specific time period
when particular classes were conducted at a school. Class has another one-to-many
relationship with Student. The (class_id), which is the main key for Class, along with the
batch (foreign key from Batch), serves as the foreign key in the Student table. Lastly,
there is a one-to-many relationship involving Faculty, Class and Subject within the Teach
table. Teach holds information about faculty members and their assigned subjects and
class. Given a faculty member’s assignment, various combinations of subject can occur.
3. Does the database design avoid any data anomalies? Explain.
The database design minimizes the chances of data anomalies by using multiple tables for
each entity that store specific data. These tables have one-to-many relationships with
each other. This is a good practice to keep data in separate tables to prevent data
anomalies. For example, to avoid deletion anomaly, some data from the deleted records
in the main table will remain in their own tables. To avoid update anomaly, you only
need to update the data from the other tables once, instead of multiple times in the main
table. To avoid insertion anomaly, you can insert a new record that is not complete yet,
and fill in the missing data in the other tables later.
Reference:
[1] S. Naik, Concepts of Database Management System, New Delhi, India: Pearson, 2014.
[2] P. Rob and C. Coronel, Database Systems: Design, Implementation, and Management,
Eight Edition, 8th Edition ed., Course Technology, 2009.
[3] R. Elmasri and S. B. Navathe, Fundamentals of Database Systems, 7th Edition, Pearson
Higher Education, 2016.
[4] G. Powell, Beginning Database Design, Indiana: Wiley Publishing, Inc., 2006.