Database design representation will be done using E-R Model.
Entity :
An entity is a any object, place, person, concept o activity about which an enterprise records data.
Example :
Example :
Name | Price | Description |
---|---|---|
Keyboard | 800 | Computer Accessories |
Mouse | 200 | Computer Accessories |
Attributes :
An attribute is the characteristic property of an existing entity. Attribute type is the property of entity type, and attribute instance is the property of entity instance.
An ellipse always represents the attribute.
Example :
An ellipse always represents the attribute.
Example :
Relationship among data:
A relationship is defined as "an association among entities". A relationship type is an association of entity types. While a relationship instance is an association of entity instances.
A relationship may associate an entity with itself. Several relationships may exist between the same entities.
The three different types of relationships recognized among various data stored in the database are:
A relationship may associate an entity with itself. Several relationships may exist between the same entities.
The three different types of relationships recognized among various data stored in the database are:
- One - to - one
- One - to - Many (or Many - to - one )
- Many - to - Many
One-to-One :
Consider for example a set of students in a class. Each student can have only oneRoll number. Similaryly each role number can be associated with on Student. This is the case of a one-to-one relationship.
Many-to-One :
One student can register for only one particular course at a time, whereas a number of students could register for the same course.
Many-to-Many :
A vendor can sell a number of items and many vendors can sell a particular item.