What kind of Relationship to this case?

1

I am a beginner programmer in C # and would like to help my company get out of the paper, it is a Ice Cream Factory.

We provide freezers to clientes . I'm developing a system that manages the freezers that every cliente has. A Customer may have several freezers of various types.

Example:

  

Claudinho's Ice Cream Parlor can have 1 vertical freezer, 2 horizontal etc ...

Is it a relation 1 to N?

Table Cliente = idCent, nameFantasy, Cnpj, address;

Table Freezer = idFreezer, model, voltage, capacity, quantity;

Or N for N?

    
asked by anonymous 17.10.2018 / 18:52

1 answer

0

To better understand how to make this relationship and making a description of everything that should be present in the bank.

Example:

  • 1 Freezer can have many models, but 1 Model can have a freezer
  • 1 Client can have several freezers, but a freezer can only have 1 client.

In this case we have two relations 1 for many.

The freezer is related to models and relates to customers, if this relationship is different, I do not understand your business rule, but for example ...

  • 1 customer many freezers and 1 many freezer clients.

In this case you would have many to many of which you would need to create a table specific to that relationship.

For example: freezercliente that is 1 for many with freezer and 1 for many with clients.

Pay close attention on these many-to-many links a many-to-many table should be directly related, it would be impossible to administer.

    
17.10.2018 / 19:06