a. Entity Type
There are different types of entities in ER model. The existences of an entity depend on the existence of one or more other entities, and are called as existence dependent. Entities which are not dependent on other entities are called as not existence dependent. Following are the classification of the entities types
1. Strong Entities: An entity having a primary key is called as strng entity. For e.g. EMPLOYEE entity identified by employee id as primary key.
2. Weak Entities An entity that do not have a primary key is termed as weak entitiy and they are existence dependent. For e.g. a ROOM cannot exists with a BUILDING hence ROOM is a weak entity.
3. Recursive Entities: An entity having a relationship with its own entity set. For e.g. EMPLOYEE can have a manager who intern is the instance of an EMPLOYEE entity.
4. Composite Entities: To convert many to much relationship into 1-to-many we need to create a bridge entity which is called as composite entity. For e.g. INVOICE can have multiple ORDER instances having many-to-many relationship and in ORDER to identify each order with an INVOICE we need to make an entity INVOICE_ORDER which has ORDER_ID and INVOICE_ID to identify each entry.
b. Entity Instance
Entity instance represents an entry in the entity database table. For e.g. a record in EMPLOYEE table represent an instance of entity EMPLOYEE.
Attributes define the properties of en entity for example EMPLOYEE entities have properties such as FIRST_NAME, LAST_NAME, ADDRESS, PHONE etc.
d. Relationship Type
Relationship represents the dependency between two entities. There are 3 types of relationships between the tables
1. one-to-one: A relationship in which one row in the table A has no more tahn one matching row in table B. A one-to-one relationship is created if both of the related columns are primary keys or have unique constraints.
2. one-to-many: A relationship in which a row in table A can have many matching rows in table B, but a row in table B can have only one matching row in table A. For example, the publishers and titles tables have a one-to-many relationship: each publisher produces many titles, but each title comes from only one publisher.
3. many-to-many: A relationship in which a row in table A can have many matching rows in table B, and vice versa. You create such a relationship by defining a third table, called a junction table, whose primary key consists of the foreign keys from both table A and table B. For example, the authors table and the titles table have a many-to-many relationship that is defined by a one-to-many relationship from each of these tables to the titleauthors table. The primary key of the titleauthors table is the combination of the au_id column (the authors table's primary key) and the title_id column (the titles table's primary key).
An Identifier is essentially a name of a database, table, or table column. Following are the guideline to define an identifier.
1. Develop your own unique naming scheme. 2. Be conscious of how long your names become. 3. Avoid names without meaning. 4. Be consistent.
f. Foreign Key
A foreign key means that values in one table must also appear in another table. The referenced table is called the parent table while the table with the foreign key is called the child table. The foreign key in the child table will generally reference a primary key in the parent table. For e.g. An EMPLOYEE entity can have a foreign key reference to ADDRESS instance.
g. Associative Entity
To convert many to many relationships into 1-to-many we need to create a bridge entity which is called as composite…