Creating your first ERD
We have covered a lot of theory so far. Let's try out an example to make it clearer.
As we said, entity analysis is a top-down approach where we seek to gain insight into a process and its underlying database that stores all the data involved in the process. Take, for example, a pharmacy.
At a pharmacy, people buy medicine. Records are kept of who is using which medicines to prevent people from combining the wrong medicines. Medicines can be made from other medicines and we need to know for each medicine which components it is made from.
Customers can pay at the counter or ask for an invoice to be sent.
Let's make an ERD of this description.
One way to start is to mark all nouns and to analyze their meaning in the description. Nouns are potential entities. This is important if we are dealing with a collection (set) of possibly multiple elements and we need to know something about them. The nouns are as follows:
Pharmacy
People...