Question from the SQL Data Design test

Write a SQL query to get the total amount of orders for each customer.

Hard

THIS BLOCK IS THE SAME FOR ALL QUESTIONS

You must design a landscaper marketplace.

A person can register as a landscaper. She then chooses the services she offers from a pre-established list. She then declares - by selecting on a calendar - her availability (a start date and an end date, the days are always whole).

Another person can register on the site as a client. She can then select the service or services she is looking for. A list of landscapers is then presented to her with a filter that allows only landscapers available for certain days / periods to be presented.

If the client finds an adequate landscaper, he can then select the dates he actually needs and then place an order.

All quiz questions refer to this problem.

####Two important constraints are added to answer the questions:

No data redundancy is tolerated.

We will consider the storage of structured data (table, hash, json, etc.) in a single data field impossible.

After the delivery of each order, the client can now leave a rating of 1 to 5 regarding the landscaper.

For what good reasons could we choose diagram A compared to diagram B?

Author: Clément DevosStatus: PublishedQuestion passed 550 times
Edit
0
Community Evaluations
developer avatar
Clément
19/11/2021
Ce schéma ne respecte pas la norme de notation. Les cardinalités sont inversées
developer avatar
Auteur anonyme
30/11/2021
C'est vrai ! Et mon cerveau est complĂštement en vrac maintenant que je l'ai vu.
developer avatar
Auteur anonyme
30/11/2021
J'ai sorti photoshop et j'ai corrigĂ© 👍 Merci !