Professional Documents
Culture Documents
Databases 2
Databases 2
Consultations
¿What is a consultation?
es la hoja que se obtiene después de seleccionar los registros
It is the sheet that is obtained after selecting the records that meet
certain conditions, always imposed by the user.
Differences between queries(CONSULTATIONS)
consultas
and filters:
With filters, you can only use fields from the same table.
With queries you can combine fields from multiple tables.
Purpose of the consultations:
View, modify, or analyze data.
They are a source records source for forms, reports, etc.
1
11 Databases, II
TYPES OF QUERIES(CONSULTATIONS)
ELEMENT DEFINITION
SELECTION They allow you to display the data, analyze it and even edit it.
In addition, you can automatically combine fields from two or
more tables or queries and using the criteria you specify. The
results are displayed in the order you want. They are the
most common.
OF CROSS- They organize the information according to different grouping
REFERENCE values. They calculate the sum, the average or other types of
TABLES totals by grouping some data from different parts
TYPE DEFINITION
UNION
They combine fields from one or more tables into one.
DUPLICATE SEARCH
They determine whether duplicate records exist in a table
or which ones share the same value.
SEARCH FOR They help locate records in one table that don't have
MISMATCHES related records in another.
PARAMETERS They offer the possibility for the user to specify the
search criteria at the time of executing them.
OF TOTALS They are based on the use of aggregate functions (sum,
account, max, etc.).
3
11 Databases, II
SOME CRITERIA USED IN CONSULTATIONS
FIELD EXPRESSION DESCRIPTION
Forms formularios
What is a form?
herramienta
It is the tool used to enter, modify and present the information
stored in one or more tables of a database.
Parts of a form:
Headline. The identification data of the form are provided.
5
11 Databases, II
6
11 Databases, II
Reports informes
¿What is a report?
Reports obtain the information from the fields in the tables in the
database and organize and summarize it consistently. They are
ideal for working when hard copies are needed. In addition, if the
data in the tables is modified, the reports will be updated
automatically.
7
11 Databases, II
What is SQL?
It is a structured query language that allows you to perform
various tasks of management and control of databases, in
addition to performing searches and queries.
An SQL statement is a set of words written in English that
indicates what you want to get and where to look for it. It
always starts with a verb and is followed by various clauses,
mandatory or not.
Some statements: SELECT, ALL, DISTINCT, FROM, WHERE,
ORDER BY, DESC, GROUP BY.
8
11 Databases, II