My teacher always asked us to create simple but precise databases. Being able to explain it simply but not without leaving the theory "to your wise but aged loved Grand'ma"...

I have to create a database to model the stocks of a firm which commercialize constructing industry products. A same product (Produit) can be bought (Achat) from suppliers (Fournisseur(s)). Client(s) place orders (Commande(s)) which will be used on different construction sites (Chantier(s)). An order is composed (Composition) by severals products. For each of them a discount can be done as a percentage of the selling price. Every order can be delivered in several times. The total quantity of a product can be allocated in several delivery notes (Bon de commande).

This is described in UML in the following pics:

UML description of the database

Therefore we should have:

  • Fournisseur
  • Achat
  • Produit
  • Composition
  • Commande
  • Client
  • Chantier
  • Livraison
  • ContenuBL
  • BonDeLivraison

The scheme modeling the database is the following one


with the following Latex Code

! $Achat(\underline{#IdFourniseur},#IdProduit,PrixVente,Date)$

! $Fournisseur(\underline{IdFourniseur}, NomFournisseur, NumérotSIRET,NuméroTel)$

! $Produit(\underline{IDProduit},PrixVente,QuantiteEnStock)$

! $BonDeLivraison(\underline{NuméroBon},AdresseLivraison)$

! $Commande(\underline{IDNuméroCommande},Date)$

! $Client(\underline{IDClient},AdresseClient,NomContact,NuméroSIRET)$

! $Livraison(\underline{#RefChantier},\underline{#IDProduit},\underline{#NumeroBon},Date)$

! $ContenuBL(\underline{#IDProduit},#NuméroBon,Quantité)$

! $Chantier(\underline{#RefChantier},ResponsableChantier,AdresseChantier)$

Yet, I'm not sure about it, especially because the associations between "classes", are not always shown in the scheme.

  • I'm not sure about Livraison for instance, which links ContenuBl and Chantier but therfore Produit and BonDeLivrasion to Chantier
  • I'm not sure about Client, which as an Association Qualifier and how to lin it between two classes which are not association classes

Furthermore, I created these relations by reflex. How to be able to explain to my loved Grand'ma why I always use Foreigner Kyes to association classes and not For simple classes ?

  • What leads to establish the relations I did, if they are right and optimal?

You might find this page interesting. Your schema seems to be reasonable - the only way you'll know is by writing your application and seeing if it works :-).

What you initially call a "bon de commande", you later refer to as a "bon de livraison" (which makes more sense in French). You also fail to provide a definition of ContenuBL (La composistion d'un bon de livraison je présume?).

Most of the people on this forum won't be able to speak/read French and will find it difficult to answer the question. If you like, I can translate it into English for you?

  • Your link is definitely interrestin. Too bad we don't have the actual databases, some would have really been amazing to have! Thank you for your answer, I'm okay with translation if you think it can help me design my database better. I'm going to realize it tonight to see if it actually works. – Revolucion for Monica Apr 8 '16 at 18:32
  • I tried translating, but didn't realise that the Latex was an image - so, all that effort for nothing :-) - if you want the text that I wrote, put @Vérace here with a message to that effect. As I said, it "looks" like a very reasonable first pass. Do some prototyping and see how it works for you - and bonne chance! :-) – Vérace Apr 9 '16 at 1:46
  • thank you anyway but the Latex Code is right under! I did a screenshot of a draft from M.SE. WHy not about your attempt anyway. I will ask my teacher during the lecture on Monday – Revolucion for Monica Apr 9 '16 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.