Professional Documents
Culture Documents
Intro - To-Database - Chapter No 2
Intro - To-Database - Chapter No 2
Intro - To-Database - Chapter No 2
Introduction To Database
By: Hadeesullah Sahak
Department of Computer Science
Entity-Relationship Data Model
is, the conceptual database design expressed in E-R data model can be
Entity
Attribute
Relationship
Entity
An entity can be a real-world object, either animate or inanimate,
things.
Entity Type – Continue
It is collection of entity having common attribute. As in Student table each
Regular ETs are also called strong or independent ETs, whereas weak
instances of some other entity type, i.e., they cannot exist independently.
being linked to the instances of any other entity type is called strong entity
type. A major property of the strong entity types is that they have their own
identification, which is not always the case with weak entity types.
strong entity types rectangle with a single line is used whereas double
below:
Attributes
Entities are represented by means of their properties, called attributes.
instances of that entity type. Entity instances of same entity type have
unique with respect to that entity type. It means one entity type
cannot have two attributes with the same name. However, different
environment or system.
Simple or Composite
Single valued or multi-valued
Stored or Derived
Simple or Composite Attributes
attributes.
Simple or Composite Attributes
Composite attributes are made of more than one simple attribute. For
Some attribute have single value at a time, whereas some others may
valued attributes.
Stored or Derived Attributes
Normally attributes are stored attributes, that is, their values are
other way. For example, we may store the name, father name,
address of employees, but age can be computed from date of birth.
Stored or Derived Attributes
Example
Relationships
The association among entities is called a relationship. For example,
relationship set.
Relationship Cardinalities
One-to-one − One entity from entity set A can be associated with at
establish and identify relation between tables. They also ensure that
sequence the stored data quickly and smoothly. They are also used to
{RegNO, Name} is also a super key. And similarly {RegNo, Class} or any
other combination.
Database Keys – Candidate Key
A candidate key is a super key that constrains no extra attribute. It
composite key.
Database Keys – Foreign Key
A foreign key is an attribute or set of attributes in a relation