GOOD AFTERNOON
Chapter 3
Data Modeling using ER Model
The Entity-Relationship (ER) model is a visual representation of a database
structure, including entities, attributes, relationships, and cardinality. Entities are
real-world objects, attributes are properties, relationships show associations, and
cardinality indicates the quantity of related entities.
Data and Functional Requirements
In data modeling using the Entity-Relationship (ER) model, understanding
both data and functional requirements is essential. Data requirements
involve identifying the types of data needed to be stored and manipulated
within the system, while functional requirements focus on the operations
and processes that the system must perform.
Entities and Attributes
Entities and attributes are fundamental concepts in the realm of
data modeling, particularly in the context of database design.
Here's an explanation of each:
Entity Attribute
• An entity is a real-world object or • An attribute is a property or
concept that exists independently and is characteristic of an entity. It represents
distinguishable from other objects. In some piece of information about the
the context of database design, an entity entity that we want to capture and store.
typically corresponds to a table in a • Attributes are the columns or fields
relational database. within a database table. Each attribute
• Entities have attributes that describe has a data type associated with it, which
their characteristics or properties. defines the kind of data it can hold (e.g.,
integer, string, date).
• Examples of attributes might include:
• For a "Person" entity: name, age,
gender, address.
• For a "Product" entity: product ID,
name, price, quantity.
• For an "Order" entity: order ID, date,
customer ID, total amount.
In data modeling, entities and attributes are used to define the structure of a database,
specifying what information will be stored and how it will be organized.
Composite vs. Atomic
Composite Atomic
It’s refers to entities made up of multiple It’s typically denotes indivisible or
components or parts, forming a unified whole, fundamental units, whether in physics,
also applicable across various fields. chemistry, software engineering, or finance.
Single-Valued vs. Multivalued
Single-valued and multivalued are terms often used in various contexts, including
mathematics, databases, and functions.
Here's what they generally mean:
Single-Valued Multivalued
• In mathematics, a single-valued • In mathematics, a multivalued function
function is a relation in which each is a relation in which each element of
element of the domain is associated the domain is associated with multiple
with exactly one element of the elements of the codomain. This means
codomain. This means that for every that for some inputs, there can be more
input, there is only one corresponding than one possible output.
output. • In databases, a multivalued attribute is
• In databases, a single-valued attribute an attribute that can hold multiple
is an attribute that holds only one value values for each instance of an entity.
for each instance of an entity. For For example, in a database of
example, in a database of employees, employees, the attribute "Skills" could
the attribute "Employee ID" would be multivalued because each employee
typically be single-valued because might possess multiple skills.
each employee has only one unique
ID.
Stored vs derived
Are terms often used in various contexts, including data management,
mathematics, and knowledge representation.
Here's a brief explanation of each:
Stored Derived
• In data management and computer • Derived" refers to information or
science, "stored" typically refers to values that are calculated or
data that is saved or held in a obtained from other data or
persistent manner, usually in a sources rather than being explicitly
storage device like a database, file stored.
system, or memory. • In mathematics, a derived quantity
• For example, in a database, stored is one that is calculated from other
data would be the records or quantities using mathematical
information saved within the operations or relationships.
tables. • In data analysis or processing,
derived data may be generated
through operations such as
aggregation, transformation, or
computation based on stored data.
Null
It’s represents the absence of a value for an attribute in a particular
entity instance. It is used to indicate that either the value is unknown
or not applicable for that instance. Null values can occur in both
single-valued and multivalued attributes.
Complex
Some attributes may be complex, meaning they contain nested structures
or multiple components. These attributes require special handling in the
data model to represent their hierarchical nature effectively. For example,
an attribute representing a person's educational history might include sub-
attributes such as degree, institution, and graduation year.
QUIZ TIME
1. refers to entities made up of multiple components or parts, forming a unified whole, also
applicable across various fields.
2. This means that for some inputs, there can be more than one possible output.
3. It is used to indicate that either the value is unknown or not applicable for that instance.
4. These attributes require special handling in the data model to represent their hierarchical
nature effectively.
5. This means that for every input, there is only one corresponding output.
6. that are calculated or obtained from other data or sources rather than being explicitly
stored.
7. It’s typically denotes indivisible or fundamental units, whether in physics, chemistry,
software engineering, or finance.
8. that is saved or held in a persistent manner, usually in a storage device like a database, file
system, or memory.
9. Is a real-world object or concept that exists independently and is distinguishable from other
objects.
10. Is a property or characteristic of an entity.
ANSWER
1. Composite
2. Multivalued
3. Null
4. Complex
5. Single-Valued
6. Derived
7. Atomic
8. Stored
9. Entity
10. Attribute