i am new to ER diagrams. I am creating an application for users to view and filter the yearly amount of population death tolls by attributes such as race, nationality and age. However, i cannot put all these attributes in a single entity because i don't have the required dataset to put them together. For example, i have the dataset for Table: race(Columns: Year, Race, Death Toll)
and Table: age(Columns: Year, Age Group, Death Toll)
, however, i don't have the dataset for Table: race_age(Columns: Year, Race, Age Group, Death Toll)
. As a result, i have to separate these entities. I realized the death_toll
attribute is repeated for all the entities so what i have done is create a ISA hierarchy. However, i find the naming convention weird and i don't know if i am right. Please check for me if i am right or wrong and guide me to the correct diagram. Thank you
Asked
Active
Viewed 1,000 times
0

user859385
- 607
- 1
- 6
- 23
-
1"filtered_by_age" is not an entity, really. If you're doing a generic ER model, you shouldn't worry about datasets or filters. Entities are Things, attributes are Facts About Things, and the rest is Other Stuff that doesn't belong into an ER model. – Juha K Sep 16 '16 at 13:09
-
Yes you are right. However, when we translate the ER model to the relational model (where we create the tables according to these entities) , there will be problems when we want to populate the data. We wont be able to populate data according to ER model drawn. Which makes the ER diagram meaningless. – user859385 Sep 16 '16 at 13:17
-
Well this gets quite philosophical rather fast, but I personally see the meaning of an ER diagram as "what the data actually is", whereas the DB relational model means "how we organize the data in a DB". It is not necessarily so that entity=table; you draw an ER diagram in order to understand your data, and then you figure out how to build the DB solution after that. But this starts to get further and further away from your original question, and I don't want to spam! – Juha K Sep 16 '16 at 14:19
1 Answers
0
If I understand your tables, they implement the functional dependencies:
race: (Year, Race) -> Death Toll
age: (Year, Age group) -> Death Toll
race_age: (Year, Race, Age Group) -> Death Toll
Based on that, I would build the ER model like this:
Your tables represent relationships between year, age group and race, with death toll an attribute of each relationship. The components of the keys identify the entities in the relationships.

reaanb
- 9,806
- 2
- 23
- 37