You are on page 1of 2

Assignment#1

Entities:
An entity in a database is defined as an object, a concept that is independent. It can be an object, place
or thing. In the database they are represented in a table. In a table every row is an example of an entity,
and every column represents the property of a entity.

Example:

A table of “Book” can be an example of an entity. The book entity must have different attributes. Such as
book title, publishing year, author etc.

Book Title Publishing Year Author Availability


Dictionary 2006 Mohid Baig Available

Attributes:
An attribute in a database is defined as properties of an entity. Attributes give information and
characteristics of an entity.

Examples:

Take an entity “Book” and its attributes are its name, author name, publishing year etc.

Cardinalities:
A cardinality in a database is defined as a relationship between the data of two database tables. It
defines how data of one entity is related to another entity. It has many different types.

Examples:

Student id and teacher teaching number of courses are examples of cardinality.

Relationships in entities:
Entities can be related in any of the following relationships:

 One-to-one relationship
 One-to-many relationship
 Many-to-many relationship
Comprehensive Entity Relationship Diagram (ERD):
An ERD is a visual representation of relationships among entities in a database. It is a tool to understand
the structure of a database between different elements. Its three main components are entity,
relationship, attributes. In ERD we:

 Identify entities.
 Define attributes.
 Make Relationships.
 Normalize.
 Review and iterate.
 Make understandable.

You might also like