1 / 21

Algèbre relationnelle et SQL

Algèbre relationnelle et SQL. SI3 - Exploitation des données. SI32-R-001a. Contexte. Contexte d’utilisation de l’algèbre relationnelle et du SQL. Contexte. Contexte. Algèbre relationnelle = concepts mathématiques (théorie des ensembles, normalisation des relations…)

nora
Télécharger la présentation

Algèbre relationnelle et SQL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algèbre relationnelle et SQL SI3 - Exploitation des données SI32-R-001a

  2. Contexte Contexte d’utilisation de l’algèbre relationnelle et du SQL

  3. Contexte

  4. Contexte • Algèbre relationnelle = concepts mathématiques (théorie des ensembles, normalisation des relations…) • SQL = implémentation des concepts dans un langage normalisé • QBE = implémentation des concepts avec un outil graphique

  5. Opérateurs relationnels • Projection • Restriction • Jointure • Tri

  6. Opérateurs relationnels • Projection

  7. Opérateurs relationnels • Projection (SQL) SELECT nom_client FROM client • Projection (QBE)

  8. Opérateurs relationnels • Projection

  9. Opérateurs relationnels • Projection (SQL) SELECT montant * 6.55957 FROM commande • Projection (QBE)

  10. Opérateurs relationnels • Restriction

  11. Opérateurs relationnels • Restriction (SQL) SELECT no_client, nom_client, ville_client FROM client WHERE ville_client = ‘Nancy’

  12. Opérateurs relationnels • Restriction (QBE)

  13. Opérateurs relationnels • Restriction

  14. Opérateurs relationnels • Restriction (SQL) SELECT no_commande, date_commande, no_client, montant FROM commande WHERE (date_commande > 15/10/2001 OR no_client = 101) AND montant > 12000

  15. Opérateurs relationnels • Jointure naturelle

  16. Opérateurs relationnels • Jointure naturelle (SQL) SELECT no_commande, date_commande, nom_client FROM commande, client WHERE commande.no_client = client.no_client Ou SELECT no_commande, date_commande, nom_client FROM commande INNER JOIN client ON commande.no_client = client.no_client

  17. Opérateurs relationnels • Jointure naturelle (QBE)

  18. Opérateurs relationnels • Tri

  19. Opérateurs relationnels • Tri (SQL) SELECT no_commande, date_commande, no_client, montant FROM commande ORDER BY no_client DESC, date_commande ASC

  20. Opérateurs relationnels • Tri (QBE)

  21. Algèbre relationnelle • Questions

More Related