Modeling Relationships in a Supermarket: ER Model with Cardinalities

  • MHB
  • Thread starter mathmari
  • Start date
  • Tags
    Model
In summary, there are several relationships in a supermarket, including employees with employee numbers, last names, first names, addresses, and departments. Each employee works in one department, which has a name, employees, a responsible manager, and offered items. Items can be offered in multiple departments and have a description, supplier, sales price, and article number. Suppliers have a name, address, and delivered items with prices. Each item is supplied by one supplier but can have different prices. The ER model should include key attributes for employee, department, article, and supplier.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! 😊

In a supermarket, there are the following relationships: For each employee (Angestellter), there are employee numbers (AngNr), last name (Name), first name (Vorname), address (Adresse) and department (Abteilung) known. Each employee works in exactly one department. Of each department knows their name (Name), their employees (Angestellte), the responsible manager (Manager) and the items (Artikel) offered.
An item can be offered in several departments. Description (Bezeichnung), supplier (Lieferant), sales price (Verkaufspreis) and an article number (Artikelnummer) assigned by the supplier as well as by the supermarket. From each supplier the name (Name), address (Adresse) and items (Artikel) delivered to the supermarket with delivery prices are known. An article is supplied by exactly one supplier, but can be supplied at different prices.

Represent these relationships in an ER model with cardinalities and define suitable ones key attributes.Does this mean that we have to make a graph with how these attributes are related ? :unsure:

Do we have the attributes employee, department, article, supplier ? :unsure:
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
So far I have done the following :
1643740958824.png


Is that correct so far? :unsure:
 
Last edited by a moderator:

FAQ: Modeling Relationships in a Supermarket: ER Model with Cardinalities

What is an ER model with cardinalities?

An ER model with cardinalities is a visual representation of the relationships between entities in a database. It uses symbols and lines to show how entities are connected and the type of relationship between them.

What are the cardinalities used in an ER model?

The cardinalities used in an ER model are one-to-one (1:1), one-to-many (1:N), and many-to-many (N:M). These represent the number of instances of one entity that can be related to the number of instances of another entity.

How are cardinalities represented in an ER model?

Cardinalities are represented using symbols and lines in an ER model. The symbols used are a crow's foot, a line, and a circle. The crow's foot represents many, the line represents one, and the circle represents zero or one.

What is the purpose of using cardinalities in an ER model?

The purpose of using cardinalities in an ER model is to accurately represent the relationships between entities in a database. It helps to define the type of relationship and the number of instances involved, which is important for database design and data integrity.

Can cardinalities change in an ER model?

Yes, cardinalities can change in an ER model. As the data and relationships in a database evolve, the cardinalities may need to be updated to reflect any changes. It is important to regularly review and update an ER model to ensure it accurately represents the current state of the database.

Similar threads

Replies
5
Views
10K
  • Sticky
Replies
2
Views
497K
Back
Top