{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Ch_Online_QBE-95 - Query-by-Example(QBE Online Chapter...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Database Management Systems 3ed,  Online chapter, R. Ramakrishnan and J. Gehrke Query-by-Example (QBE) Online Chapter Example is the school of mankind, and they will learn at no other.  -- Edmund Burke (1729-1797)
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Database Management Systems 3ed,  Online chapter, R. Ramakrishnan and J. Gehrke QBE: Intro A “GUI” for expressing queries. Based on the DRC! Actually invented before GUIs. Very convenient for simple queries. Awkward for complex queries. QBE an IBM trademark. But has influenced many projects Especially PC Databases: Paradox, Access, etc.
Image of page 2
Database Management Systems 3ed,  Online chapter, R. Ramakrishnan and J. Gehrke `Example Tables’ in QBE Boats bid bname color Sailors sid sname rating age Reserves sid bid day Users specify a query by  filling in  example tables , or  skeletons ;  we will use these  skeletons in our examples.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Database Management Systems 3ed,  Online chapter, R. Ramakrishnan and J. Gehrke Basics Sailors sid sname rating age P._N P._A To print names and ages of all sailors: Print all fields for sailors with  rating  > 8, in  ascending order by ( rating, age ): Sailors sid sname rating age P. AO(1). >8 AO(2). QBE puts unique new variables in blank columns.   Above query in DRC (no ordering): { } I N T A I N T A Sailors T , , , | , , , 8
Image of page 4
Database Management Systems 3ed,  Online chapter, R. Ramakrishnan and J. Gehrke And/Or Queries Sailors sid sname rating age P. < 30 P. > 20 Names of sailors younger than 30  or  older than 20: Names of sailors younger than 30  and  older than 20: Sailors sid sname rating age _Id P. < 30 _Id P. > 20 Names of sailors younger than 30  and   rating  > 4: Sailors sid sname rating age _Id P. > 4 < 30 Note: MiniQBE uses a slightly  different syntax!
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Database Management Systems 3ed,  Online chapter, R. Ramakrishnan and J. Gehrke Duplicates Sailors sid sname rating age UNQ. P. < 30 Single row with  P:  Duplicates not eliminated by default;  can force elimination by using UNQ.
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern