1 / 12

GESTION DE LA PRESSE

GESTION DE LA PRESSE. Requêtes avec les opérateurs algébriques. Les titres présents dans la BD. Res = projection (PUBLICATION; titre). Requête 1. Les titres des quotidiens. R1= sélection( PUBLICATION ; période=‘quotidien’) Res = projection ( R1 ; titre). Requête 2.

shel
Télécharger la présentation

GESTION DE LA PRESSE

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. GESTION DE LA PRESSE Requêtes avec les opérateurs algébriques

  2. Les titres présents dans la BD Res = projection (PUBLICATION; titre) Requête 1

  3. Les titres des quotidiens R1= sélection(PUBLICATION; période=‘quotidien’) Res = projection (R1; titre) Requête 2

  4. Les titres des hebdomadaires édités à Rennes R1= sélection(EDITER; nomVil=‘Rennes’) R2= sélection (PUBLICATION; période=‘hebdomadaire’) R3=jointure(R1,R2; R1.titre=R2.titre) Res= projection( R3; titre) Requête 3

  5. Les titres non distribués en kiosque R1=projection( PUBLICATION; TITRE) R2= projection( DISTRIBUER; titre) Res= différence( R1,R2) Requête 4

  6. Les titres des hebdomadaires informatiques édités à Paris et distribués à Brest R1= sélection( PUBLICATION; genre=‘informatique’ et période=‘hebdomadaire’) R2= sélection(EDITER; nomVil=‘Paris’) R3= sélection( KIOSQUE; nomVil=‘Brest’) R4=jointure( R1,R2; R1.titre=R2.titre) R5= jointure(R3, DISTRIBUER; R3.numk=DISTRIBUER.numk) R6= jointure(R4,R5; R4.titre=R5.titre) Res= projection(R6; titre) Requête 5

  7. Les noms des propriétaires des titres édités à Lyon et distribués à Lille. R1= sélection(EDITER; nomVil=‘Lyon’) R2= sélection( KIOSQUE; nomVil=‘Lille’) R3= jointure(R2, DISTRIBUER; R3.numk=DISTRIBUER.numk) R4= jointure(R3,R1; R4.titre=R5.titre) R5=jointure( R4, PUBLICATION; R4.titre=PUBLICATION.titre) R6= jointure( R5, PATRON; R6.numProp= PATRON.numProp) Res= projection(R6; nomProp) Requête 6

  8. Les nom des directeurs qui sont aussi propriétaires des leurs titres R1= jointure(PUBLICATION, PATRON: PUBLICATION.numProp=PATRON.numProp) R2= selection (R1; nomDir=nomProp) Res= projection( R2; nomDir) Requête 10

  9. Les titres présents dans la BD Res = projection (PUBLICATION; titre) Select titre from PUBLICATION Requête avec SQL

  10. Les titres des quotidiens R1= sélection(PUBLICATION; période=‘quotidien’) Res = projection (R1; titre) Select titre from PUBLICATION where période= « quotidien ». Requête 2 avec SQL

  11. Les titres des hebdomadaires édités à Rennes R1= sélection(EDITER; nomVil=‘Rennes’) R2= sélection (PUBLICATION; période=‘hebdomadaire’) R3=jointure(R1,R2; R1.titre=R2.titre) Res= projection( R3; titre) Select titre FromPUBLICATION, EDITER Where PUBLICATION.titre= EDITER.titre and période=« hebdomadaire» and nomVil=« Rennes » Requête 3 avec SQL

  12. Les titres non distribués en kiosque R1=projection( PUBLICATION; TITRE) R2= projection( DISTRIBUER; titre) Res= différence( R1,R2 Select titre From PUBLICATION Where titre not in ( select distinct titre from DISTRIBUER) Requête 4

More Related