From 84babcf2e732983ec0602d0be7bd255cf0c6ca49 Mon Sep 17 00:00:00 2001 From: Joel Cavat <jcavat@gmail.com> Date: Fri, 6 May 2022 09:32:16 +0200 Subject: [PATCH] S01 --- corrections/alg_chapitre_01/1.4.txt | 28 ++++++++++ corrections/alg_chapitre_01/1.5.txt | 82 +++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 corrections/alg_chapitre_01/1.4.txt create mode 100644 corrections/alg_chapitre_01/1.5.txt diff --git a/corrections/alg_chapitre_01/1.4.txt b/corrections/alg_chapitre_01/1.4.txt new file mode 100644 index 0000000..da0b133 --- /dev/null +++ b/corrections/alg_chapitre_01/1.4.txt @@ -0,0 +1,28 @@ +# Ex 1.4 + +Conference(id_conference, nom, date, prix, intitule) + id_conference CLE + Conference.intitule <= Theme.intitule + +Theme(intitule) + intitule CLE + +Visiteur(login, nom, prenom) + login CLE + +CompteFidelite(login, nombre_points) + login CLE + login <= Visiteur.login (demandé au point 1) + +Inscription(login, id_conf) + (login, id_conf) CLE + login <= Visiteur.login (demandé au point 1) + id_conf <= Conference.id_conference (demandé au point 1) + +Notation(login, id_conf, note) + (login, id_conf) CLE + (login, id_conf) <= Inscription.(login, id_conf) (demandé au point 2) + +Commentaire(login, id_conf, commentaire) + (login, id_conf) CLE + (login, id_conf) <= Inscription.(login, id_conf) (demandé au point 2) diff --git a/corrections/alg_chapitre_01/1.5.txt b/corrections/alg_chapitre_01/1.5.txt new file mode 100644 index 0000000..5617959 --- /dev/null +++ b/corrections/alg_chapitre_01/1.5.txt @@ -0,0 +1,82 @@ +# 1.5 - HepiaShop v1 + +## DF + +id_ticket -> {date_heure, no_client, vendeur} +no_client -> nom_complet_client +no_client -> points_fidélités_totaux +article -> prix_unitaire +{id_ticket, article} -> quantité + +## Schémas + +Ticket(id_ticket, date_heure, no_client, vendeur) + id_ticket CLE + no_client <= Client.no_client + vendeur <= Vendeur.nom_complet + +Client(no_client, nom_complet_client) + no_client CLE + +Vendeur(nom_complet) + nom_complet CLE + +CompteFidélité(no_client, points_fidélités_totaux) + no_client CLE + no_client <= Client.no_client + +Article(article, prix_unitaire) + article CLE + +TicketItem(id_ticket, article, prix_unitaire, quantité) + (id_ticket, article) CLE + article <= Article.article + id_ticket <= Ticket.id_ticket + + + + + + + + + + + + + +# 1.5 - HepiaShop v2 + +## DF + +{id_ticket_journ, date} -> {no_client, heure, vendeur} +no_client -> nom_complet_client +no_client -> points_fidélités_totaux +article -> prix_unitaire +{id_ticket_journ, date, article} -> quantité + +## Schémas + +Ticket(id_ticket_journ, date, heure, no_client, vendeur) + (id_ticket_journ, date) CLE + no_client <= Client.no_client + vendeur <= Vendeur.nom_complet + +Client(no_client, nom_complet_client) + no_client CLE + +Vendeur(nom_complet) + nom_complet CLE + +CompteFidélité(no_client, points_fidélités_totaux) + no_client CLE + no_client <= Client.no_client + +Article(article, prix_unitaire) + article CLE + +TicketItem(id_ticket_journ, date, article, quantité) + (id_ticket_journ, date, article) CLE + article <= Article.article + (id_ticket_journ, date) <= Ticket.(id_ticket_journ, date) + -- GitLab