Entity in DBMS can be a real-world object with an existence. To identify entity from a given problem, follow the below given tips −
Under the problem description, try to find the entity.
- Search for nouns, like Teacher, Doctor, etc.
- Classify nouns to get a wider picture about the entities.
- Read the problem description repeatedly.
- Entities are like Persons, Students, Teachers, Courses.
- Entities has attributes, that properties describing it, for example, for Professor entity, the attributes are Professor_Name, Professor_Address, Professor_Salary, etc
For example,
Problem Description
Hospital has doctors and patients. Patients visit the hospital to get a consultation from the doctor. Doctor may suggest tests to examine the condition of the patient.
Entities
The following are the entities −
- Hospital
- Patient
- Doctor
- Tests
Attributes
- The attributes for Hospital Entity: Hospital_Name, Hospital_Location, Hospital_Phone, etc.
- The attributes for Patient Entity: Patient_Id, Patient_Name, Patient_Age, Patient_VisitDate, etc.
- The attributes for Doctor Entity: Doctor_Id, Doctor_Name, Doctor_Specialization, etc.
- The attributes for Tests Entity: Tests_Name, Tests_Date, Tests_Result, etc.