Ch_Online_QBE

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

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

View Full Document Right Arrow Icon
Database Management Systems 3ed, Online chapter, R. Ramakrishnan and J. Gehrke 1 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 2 QBE: Intro A“GUI”forexpressingqueries . 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 3 `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 ;w ew i l lu s eth e s e skeletons in our examples.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Database Management Systems 3ed, Online chapter, R. Ramakrishnan and J. Gehrke 4 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). QBEputsuniquenewvariablesinblank columns. Above query in DRC (no ordering): {} INTA S a i l o r s T ,,, | ,,, ∈∧ > 8 Database Management Systems 3ed, Online chapter, R. Ramakrishnan and J. Gehrke 5 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. Note: MiniQBE uses a slightly different syntax! Database Management Systems 3ed, Online chapter, R. Ramakrishnan and J. Gehrke 6 Duplicates Sailors sid sname rating age UNQ. P.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/28/2010 for the course CSE cse123 taught by Professor Benny during the Spring '10 term at LSU Eunice.

Page1 / 7

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

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

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