Question from the SQL Data Design test

Which of the following SQL queries will return the same result? A: SELECT * FROM table WHERE id = 1; B: SELECT * FROM table WHERE id = 1 ORDER BY id;

Hard

THIS BLOCK IS THE SAME FOR ALL QUESTIONS

You must design a marketplace for landscapers.

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 (array, hash, json, etc.) in a single data field impossible.

We now want to add a wallet to each landscaper to account for the money he receives. We then create a wallet table.

Author: Clément DevosStatus: PublishedQuestion passed 544 times
Edit
-1
Community Evaluations
developer avatar
Clément
19/11/2021
On ne peut pas "stocker une clef Ă©trangĂšre", on peut "stocker une clef primaire d'une autre table", ce qui en fait une clef Ă©trangĂšre
developer avatar
Auteur anonyme
30/11/2021
Oui c'est vrai ! C'est plus prĂ©cis indiquĂ© comme ça. J'ai modifiĂ© la rĂ©ponse. Merci beaucoup pour votre contribution 🙏