entity-relationship-model

Why should I avoid loops when designing relationships for a database?

[亡魂溺海] 提交于 2019-11-28 04:38:15
Someone told me that it was bad design to have loops in the datamodel. I have heard this before a couple of times but didn't pay much attention. For example you have entities User, Project, Activity. A project is owned by a User, so we have a one-to-many relationship from user to Project. An activity can be assigned to a single User, another one-to-many relationship from User to Activity. Of course a project is defined by a set of activities, another one-to-many relationship from Project to Activity. Thus a loop is formed. I asked this guy why is it bad design but he told me he didn't know

Why should I avoid loops when designing relationships for a database?

此生再无相见时 提交于 2019-11-27 05:21:15
问题 Someone told me that it was bad design to have loops in the datamodel. I have heard this before a couple of times but didn't pay much attention. For example you have entities User, Project, Activity. A project is owned by a User, so we have a one-to-many relationship from user to Project. An activity can be assigned to a single User, another one-to-many relationship from User to Activity. Of course a project is defined by a set of activities, another one-to-many relationship from Project to

What is the difference between an entity relationship model and a relational model?

你离开我真会死。 提交于 2019-11-26 14:43:44
I was only able to find the following two differences: The relationships in an E-R model are explicitly defined, while they are implicit in a relational model. Relational models require an intermediate table (often called a "junction table") to hold two foreign keys that implement the many-to-many relationship. And why do we use the relational model, when we have an E-R diagram ? You have it backwards. The relationships in an E-R model are explicitly defined, while they are implicit in a relational model. No. Each Relational Model (RM) database base table and query result represents an

What is the difference between an entity relationship model and a relational model?

点点圈 提交于 2019-11-26 04:00:10
问题 I was only able to find the following two differences: The relationships in an E-R model are explicitly defined, while they are implicit in a relational model. Relational models require an intermediate table (often called a \"junction table\") to hold two foreign keys that implement the many-to-many relationship. And why do we use the relational model, when we have an E-R diagram ? 回答1: You have it backwards. The relationships in an E-R model are explicitly defined, while they are implicit in