Basic Definition-Unit 2 Reality
Basic Definition-Unit 2 Reality
Basic Definition-Unit 2 Reality
Entity:
An Entity is a person, place,
object, event or concept in the
user environment about which
the organization want to
maintain data.
Example
Person: EMPLOYEE,
STUDENT, CUSTOMER
Object:
Objects represent things that
are important to users.
Ex:
People, automobiles, books,
computers etc
Conceptual objects would be
companies, skills, organization,
transactions etc.
Event : SALE,
REGISTRATION, RENEWAL
Concept: ACCOUNT,
COURSE, WORK CENTER
Entity type
Entity instance
It is a single occurrence of an
entity type.
Ex: DEPENDENT
(Dep_name, DOB)
E-R Model:
An entity-relationship is
detailed, logical representation
of the data for an organization
or for a business area.
Strong Entity:
A strong entity type is one that
exists independent of other
entity types.
E-R Diagram:
A simple attribute is an
attribute that cannot be
broken down into smaller
components.
For example: All of the
attributes associated with an
entity STUDENT
Simple atttributes: Student_id,
Sname, Dob
Composite Attributes:
Attributes:
An Attributes is a property or
characteristics of an entity
types that is of interest to the
organisation.
A composite attributes is an
attribute which is having more
than one fields. such attributes
can be divided in to number of
sub attributes
Example address can be broken
down in to component parts.
Tuple:
The row of a relation is called tuples.
Identifier:
It is an attribute (or
combination of attributes)
that uniquely identifies
individual instances of entity
types. The identifier for the
STUDENT entity type is stud_no.
A composite identifier: it is an
identifier that consists of a
composite attributes.
Ex: FLIGHT (FLIGHT_number,
FLIGHT_id, Date,
No.of_passenger)
Degree of Relationship:
The degree of a relationship is
the number of entity type that
participates in that relationship.
There are 3types of Relationships in
E.R.Model:
i. UNARY (degree 1)
ii. BINARY (degree 2)
iii. TRINARY (degree3)
Unary Relationship:
It is relationship between the
instances of a single entity type.
Cardinality Constraints:
Binary Relationship:
It is a relationship between
the attributes of two entity
types and is the most
common types of relationship
in data modeling.
This relationship has 3 types:
One-one
One-to-many
Many to many
A cardinality constraint is a
constraint that specifies is
constraints that specify the
number of instances of entity
B that may be associated
with each instance of Entity
A.
cardinality constraints normal
specify the minimum and
maximum cardinality of one
specifies mandatory
participation.
Minimum Cardinality:
The minimum number of
instances of one entity that may
be associated with each
instances of another entity.
Maximum Cardinality:
Ternary Relationship:
A Ternary relationship is
simultaneous relationship
among the instance of 3 entity
types.
EMPLOYEE(Employee_id,
Name,Skill)
Attributes are
Employee_id,Name,Skill
Composite key:
Ex: ASSIGNMENT(Worker_id,
Bildg_id, Start_date, days)
Null Values:
Ex:
WORKER(Worker_id,
Name,Skill_Type, Sup_id)
ASSIGNMENT(Worker_id,
Build_id, Start_date, days)
SKILL(Skill, Bonus,
Hours_per_week)
ASSIGNMENT table has two key
attributes, both of them are
underlined. This means that
Worker_id and Bldg_id together
are key for ASSIGNMENT.
Skill_type in the WORKER
relation,
WORKER_ID in ASSIGNMENT
are foreign keys.
FOREIGN key attributes need
not have the same name as the
key attributes to which they
correspond.
Specialization:
Specialization is the process of
defining one or more subtypes
of the super type and forming
super type/subtype relationship.
Specialization is the process of
defining a set of subclasses of
an entity type
Generalization:
Generalization is the process of
defining a more general entity
type from a set of more
specialized entity types.
Generalization is a bottom-up
process.
It may be noted that
generalization process is
inverse of the specialization
process
Aggregation:
A relationship set is an
association between entity sets.
Aggregation allows us to
indicate that a relationship set
participates in another
relationship set
Integrity constraints:
Domain constraints
Entity integrity
Referential integrity
Operational constraints
Domain constraints: