What is Entity in Database
Entity
1) An entity is an object that exists and is
distinguishable from other object.
2) Every entity (also called as tuple) must have a
unique identification. It means that
for every entity in a table there is something that
uniquely identified it from any
other entity.
3) For example: “Student Id” in college, Account No. of the customer in a bank etc.
What is Relational Database Model
Entity Set:
1) A finite set of entities in the relational
database system, represents entity set.
2) Entity Set does not have duplicate entity.
3) The set of all the student having admission in
college, all customers of the banks etc .
Relationship:
I) The association among entities is called a
relationship.
2) In other words, a situation exists between two
tables when one table has a foreign
key that references the primary key of the other
table is called Relationship.
3) Each entity has one or more attributes, known as
relation key, which can identify
the row in the relation/table uniquely.
4) For example: a student admitted in a course and
lecturer works_at a department.
Relationship set:
1) A set of relationships of similar type ¡s called
a relationship set.
2) Like entities, a relationship can also have
attributes.
3) These attributes are called descriptive
attributes.
Degree of
Relationship:
The number of participating entities (tables) in a
relationship defines the degree of
the relationship.
a. Binary = degree 2 (Two tables in a relationship)
b. Ternary = degree 3 (Three tables in a
relationship)
c. N-ary = degree N (N tables in a relationship)