The airline has a database of customer names and addresses.
(e) The database makes use of simple and complex queries.
(i)What is the difference between a simple and complex queries.
A simple query uses only one parameter or criteria with two fields of data. A complex query has more than one parameter or two or more criteria. This can be split into an AND query which search both parameters, or an OR query which searches one or the other but not both.
(ii)Give an example of a simple query and a complex query that could be used to search the customer database.
Simple: Departure of the flight as it only uses one parameter and doesn't need another to be a precise search.
Complex: Destination and date of the flight would allow for a more concise search as it would allow you to pinpoint when and where the flight is with the use of both parameters.
Give an example of a complex query that could be used to search the customer table (of a school).
For a school, a complex query that uses the parameters of surname and year group, which would allow a more concise search as there would probably be more than one person with a certain surname in a whole school. Using a year group would narrow this down to one or maybe two results, depending on the size of the school and the commonness of the name.
No comments:
Post a Comment