Ch_Online_QBE-95

Ch_Online_QBE-95 - Database Management Systems 3ed, Online...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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) 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. 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. 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 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! Database Management Systems 3ed, Online chapter, R. Ramakrishnan and J. Gehrke Duplicates Sailors sid sname rating age UNQ. P.P....
View Full Document

This note was uploaded on 05/09/2008 for the course CS 352 taught by Professor Michaeldell during the Spring '08 term at Chaminade University.

Page1 / 21

Ch_Online_QBE-95 - Database Management Systems 3ed, Online...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online