Wednesday, October 24, 2007

Specialization and Generalization

Specialization and Generalization



Specialization: dividing an entity into multiple entities based on the unique characters between them.
E.g. In below employee table .the employees who are fresher has a  “trainer-name” , but with out any "Project"

name
age
role
trainer
Project
Amit
21
fresher
smith

Bill
30
developer

Prj-A
split this table into two tables based on the unique characteristics

Developers
name
age
Project
  Bill
30
Prj-A

Fresher
name
age
trainer
Amit
21
smith
..
Generalization: creating a super entity through identifying the common attributes between two or more entities.

with the same example as mentioned above :
Developers
name
age
Project
  Bill
30
Prj-A

Fresher
name
age
trainer
Amit
21
smith

create a super entity based on the common properties found in both the tables (name , age)
Employees
emp-id
name
age
1
  Bill
30
2
Amit
21

Developer
emp-id
project
1
Prj-A

Fresher
emp-id
trainer
2
smith

No comments:

Post a Comment

Featured Post

SQL Server AWS Migration BCP

stored procedure to generate BCP scritps to migrate the SQL Server database. Developed this stored procedure on my labs to simulate t...

Contributors