For years, query and report programs have been the primary applications that produce output from information systems. A query implies an online request as required (look up that record), while a report implies a more elaborate printout with page headings and numbers that is typically produced at regular intervals such as end of month. See report writer.
Simple or Complex
Defining a query for a relational database can be extremely simple or very complex. If the query is based on one matching condition, such as "retrieve all customers who owe us more than $10,000," it is usually easy to define in a query language or program. However, "retrieve all customers who owe us more than $10,000 from purchasing toasters" is not easy. It requires several steps to determine how many toaster orders are in the balance due.
Tables Must Be Joined
Relational databases are designed to eliminate redundancy. The goal is to store a data item in one table and not have it duplicated in others. For example, an order record will contain the product number ordered, but often not its description. The description is stored in a product table. Thus, any printout of products ordered and their descriptions requires that the order table be linked to the product table for that query or report. Linking customer, order and product tables is a common example of "joining" tables to satisfy a query.
Contents of a Query
Most queries require at least the following conditions to be stated. First, which table or tables is the data coming from. If from two or more tables, what is the link between (typically account number or name). Next, define the selection criteria, which is the matching condition or filter. Lastly, define which fields in the tables are to be displayed or printed in the result. See SQL.
The Query Statement
This diagram depicts the typical conditions that have to be stated when querying a relational database.
![]() | Reproduced with permission from Computer Desktop Encyclopedia. Copyright (c) 1981-2009 The Computer Language Company Inc. All rights reserved. |
Additional Resources
- Navicat for PostgreSQL 8.1.6 (Mac)
- Navicat features an intuitive interface and provides a set of useful tool to manage, backup/ restore, import/ export data, Synchronize database and connect to remote PostgreSQL server, etc. Navicat supports the latest PostgreSQL version and possesses below major features: Visual Query Builder SSH Tunnel for remote database connection Database transfer...
- Software downloads 2009-11-22
- Navicat for MySQL 8.1.6 (Mac)
- Navicat is an ideal solution for MySQL administration and development. This is an all-inclusive mysql front end provides a powerful graphical interface for databases management, development and maintenance. Easy installation and intuitive interface make it an irreplaceable tool for mysql on the web or your local desktop. Navicat supports all...
- Software downloads 2009-11-22
- Navicat (Oracle GUI) 8.2.17 (Windows)
- Navicat Oracle GUI is an Oracle database management tool, which can convert XML, CSV, MS Excel, MS Access, and popular data formats to MySQL databases, eliminating time-consuming data entry and the errors that accompany it. Other useful major features include Import and Export wizard, Unicode support, SSH Tunnel, Batch Job...
- Software downloads 2009-11-22
- Navicat (PostgreSQL GUI) 8.2.17 (Windows)
- Navicat PostgreSQL GUI is a PostgreSQL database management tool, which can convert XML, CSV, MS Excel, MS Access, and popular data formats to PostgreSQL databases, eliminating time-consuming data entry and the errors that accompany it. Other useful major features include import and export wizard, schedule backup, batch job scheduling, data...
- Software downloads 2009-11-22
- Navicat (MySQL GUI) 8.2.17 (Windows)
- Navicat MySQL GUI is a MySQL database management tool, which can convert XML, CSV, MS Excel, MS Access, and popular data formats to MySQL databases, eliminating time-consuming data entry and the errors that accompany it. Other useful major features include Import and Export wizard, Unicode support, HTTP/SSH Tunnel, Batch Job...
- Software downloads 2009-11-22
- EMS SQL Manager for SQL Server Lite 3.5.0.2 (Windows)
- EMS SQL Manager for SQL Server is a powerful tool for SQL Server administration and development. SQL Manager 2005 works with any SQL Server versions from 7 to 2005 and supports all of the latest SQL Server features including new SQL Server 2005 permission system, assemblies, DDL triggers, XML columns,...
- Software downloads 2009-11-21
- Alchemy Network Monitor 10.4 (Windows)
- Alchemy Network Monitor monitors your network servers and business-critical applications availability and performance and immediately alerts you if a server gets out of order. Alchemy Network Monitor can also perform certain actions (e.g. launch an external application or execute an SQL query) when a server stops responding to the programs...
- Software downloads 2009-11-19
- Alchemy Network Monitor PRO 10.4 (Windows)
- Alchemy Network Monitor monitors your network servers and business-critical applications availability and performance and immediately alerts you if a server gets out of order. Alchemy Network Monitor can also perform certain actions (e.g. launch an external application or execute an SQL query) when a server stops responding to the programs...
- Software downloads 2009-11-19
- NBL Purchasing 1.3.1 (Windows)
- NBL Purchasing is a Windows database-driven software designed for soho, small and medium size company, to manage and monitor purchasing process, from receive quotation, issue purchase order, receive material to validate supplier bill. Includes features: Master Editor: Store Supplier, Employee, Organization particular / contact and Material information; Issuing: Print, fax...
- Software downloads 2009-11-19
- NBL Product Sale 1.3.1 (Windows)
- NBL Product Sale is a Windows database-driven software designed for soho, small and medium size company, to manage and monitor sale process, include issue quotation, offer price and receive sale order Include feature: Master Editor: Store Customer, Employee, Organization particular / contact and Product information Issuing: Print, fax Quotation, Sale...
- Software downloads 2009-11-19
- RazorSQL 5.0.2 (Mac)
- Query, edit, browse, and manage all major databases from one database tool. RazorSQL OSX is a universal database query tool, programming and sql editor, database navigator, and administration tool with built-in connection capabilities for DB2, Derby, Firebird, FrontBase, HSQLDB, Informix, Microsoft SQL Server, MySQL, OpenBase, Oracle, PostgreSQL, SQL Anywhere, SQLite,...
- Software downloads 2009-11-18
- Bugzilla 3.4.4 (Mac)
- Bugzilla is the leading open-source/free software bug tracking system, with high-profile installations at mozilla.org (250,000 entries), Gnome, Red Hat and NASA, among others. It features a comprehensive set of fields, attachment management, inter-bug dependencies, email notification of changes, a powerful query interface, reporting, and web, xml, email and console interfaces....
- Software downloads 2009-11-18
- DatAdmin Personal 3.4.2 (Windows)
- Easy and quick database administration, natively supports MSSQL, MySQL, SQLite, Postgre SQL, MS Access. Also can be used to create and restoring backups, transfer data between databases, tables or files (supported formats are XML, CSV, HTML, Excel), edit database schema. Other functions: run queries, view data in tables of any...
- Software downloads 2009-11-17
- Altova DatabaseSpy 2010 (Windows)
- Altova DatabaseSpy is the unique multi-database data management, query, design, compare, and convert tool from the creators of XMLSpy. DatabaseSpy connects to all major databases, easing SQL editing and other database tasks for a fraction of the cost of single-database solutions. DatabaseSpy provides a straightforward database connection wizard and organizes...
- Software downloads 2009-11-17
- RazorSQL 5.0.1 (Windows)
- Query, edit, browse, and manage all major databases from one database tool. RazorSQL is a database query tool, SQL editor, database browser, and administration tool with built-in connection capabilities for DB2, Derby, Firebird, FrontBase, HSQLDB, Informix, Microsoft SQL Server, MySQL, OpenBase, Oracle, PostgreSQL, SQL Anywhere, SQLite, and Sybase. Any other...
- Software downloads 2009-11-16
- Altova XMLSpy Enterprise Edition 2010 (Windows)
- Altova XMLSpy 2010 Enterprise Edition is the industry's best-selling XML editor and XML development environment for modeling, editing, transforming, and debugging XML technologies. In addition to the world's leading XML editor, XMLSpy includes a powerful graphical XML Schema editor that allows you to design complex schemas with ease. Advanced error...
- Software downloads 2009-11-16
- Altova XMLSpy Professional Edition 2010 (Windows)
- Altova XMLSpy 2010 Professional Edition is the industry-leading XML editor and XML development environment, with intuitive editing views and powerful XML utilities to model, edit, transform, and debug XML-related technologies quickly and easily. In addition to the world's most popular XML editor, XMLSpy Professional includes a graphical XML Schema editor...
- Software downloads 2009-11-16
- Corona 3.3 (Mac)
- Originally introduced in 2001, Corona has been upgraded regularly to become a full general ledger accounting tool, yet still retains its "simple check register" appeal and price. Corona features "drag and drop" accounting, on-the-fly account creation, and one-click reconcilement. Innovations: On-the-fly account creation Journal selector for entry forms Popup selectors...
- Software downloads 2009-11-16
- Universal SQL Editor 1.2 (Windows)
- Universal SQL Editor is a graphical query tool for all database developers. It allows you connect any ODBC compliant databases, such as Oracle, DB2, SQL Server, Sybase, and edit SQL queries and scripts with code completion, syntax highlighting, SQL formatting, plus other useful features that allow you to work more...
- Software downloads 2009-11-16
- SmartCode VNC Manager Enterprise Edition 5.0.14 (Windows)
- SmartCode VNC Manager is a powerful yet easy to use remote administration and monitoring software application for both the business and home network environments. It is typically used for remote network management, remote system administration and in helpdesk environments. Its features include but are not limited to: Built-in VNC, RDP,...
- Software downloads 2009-11-15
Neighboring Terms
Premier Vendor Content Whitepapers, webcasts & resources from our Power Center Sponsors
- Reduce risk. Reduce complexity. Increase reliability.
-
A simplified IT environment isn't just less complex. It's also more reliable. Standardize on a single Linux platform with SUSE Linux Enterprise from Novell, and get the world's most interoperable Linux

- Learn more >>
- Microsoft Dynamics CRM Online - Free Six-Month Trial for Eligible Organizations
-
Microsoft Dynamics CRM Online provides fast online access, simple contact management and better sales performance for a low monthly cost - the best value on the market today.

- Learn more about the free, six-month trial offer>>
- The best support in the Linux business
-
If Linux is going to power your mission-critical applications, you'd better have the best support known to business. Novell was rated the top provider of Linux technical support.

- Learn more >>
- The best support in the Linux business
-
If Linux is going to power your mission-critical applications, you'd better have the best support known to business. Novell was rated the top provider of Linux technical support.

- Learn more >>
SmartPlanet
- Thought-provoking progressive ideas on diverse topics that intersect with technology, business, and life, and matter to the world at large. Visit SmartPlanet
- More from IBM
- Innovate your business' process model, play against the market, compete against others on our scoreboards and WIN! Try INNOV8 2.0: A BPM Simulator
- Enabling Real-World Business Transformation through IBM Service Management Read the EMA Analyst Report






