Presentation is loading. Please wait.

Presentation is loading. Please wait.

CORE 2: Information systems and Databases STORAGE & RETRIEVAL 2 : SEARCHING, SELECTING & SORTING.

Similar presentations


Presentation on theme: "CORE 2: Information systems and Databases STORAGE & RETRIEVAL 2 : SEARCHING, SELECTING & SORTING."— Presentation transcript:

1 CORE 2: Information systems and Databases STORAGE & RETRIEVAL 2 : SEARCHING, SELECTING & SORTING

2  In this part of the topic we said we would look at the following… 1.Types of Storage Hardware 2.Techniques for Data Security 3.Searching, Selecting and Sorting STORAGE AND RETRIEVAL

3  Searching is looking through a collection of data in order to locate required data. Selecting is a combined process used to identify the data needing to be retrieved. eg. Looking for Year 7 students in Currey House  Sorting involves arranging a collection of items in some specified order eg. Alphabetical or Numerical. Sorted data is easier for people to understand and as such it becomes information (data with meaning). eg. Ordering Year 7 students in Currey house by alphabetical order A – Z. SEARCHING, SELECTING AND SORTING

4 Tools for Database Searching and Retrieval - Indexes In a database table the order in which records are stored is entirely irrelevant. When a search is applied to a large database there are potentially thousands of records needing to be examined individually and in an unspecified order. The solution to this is indexes. Indexes are similar to that in a book, in that they give and ordered listing of areas where content can be found. Database indexes describe a particular record order without actually ordering or displaying the records. For example: An attribute of the index may be "sort order" which has cells beneath it specifying the organisational order for the fields listed in the index eg ascending or descending. The index is in order hence it can be used to quickly search through the data for records to be retrieved. SEARCHING, SELECTING AND SORTING

5 Tools for Database Searching and Retrieval - SQL  QUERY is a search of a database for records that meet a certain condition. It is a question you ask the database. The results are usually displayed in a table but can be used as the basis for a form, report, graph or another query. A query can also update or delete multiple records at the same time and perform calculations on data. Queries are constructed in the form. The data is often called the criteria. A common method for constructing a query is query by example, which requires a user to enter the criteria against a field. If the search of a database involves two or more entities it is called a relational query. SEARCHING, SELECTING AND SORTING

6 Tools for Database Searching and Retrieval - SQL  STRUCTURED QUERY LANGUAGE (SQL) is a query language used to access and manipulate data in a relational database. SQL statements contain keywords that are used to perform a particular task. When searching in SQL it is essential to use correct syntax. In most DBMSs keywords are in uppercase, fields are separated by commas, an entity and an attribute in that entity are separated by a fullstop, and the search criteria or data item is enclosed in double quotes. The keyword ORDER BY sorts on a field in ascending (ASC) or descending (DESC) order with ascending as the default. SEARCHING, SELECTING AND SORTING

7 Tools for Database Searching and Retrieval - SQL SQL – Stands for (Structured Query Language). SQL statements are structured using the following:  SELECT – Attributes to retrieve (e.g. surname)  FROM – Table (database)  WHERE – Search criteria (e.g. client age > 15)  ORDER BY – Alphabetical etc. SEARCHING, SELECTING AND SORTING

8 Tools for Database Searching and Retrieval - SQL ‘WHERE’ is the SQL statement that declares a criteria to be followed in order to complete the query. The following operators can be utilised as criteria for ‘WHERE’… SEARCHING, SELECTING AND SORTING RELATIONAL OPERATORS English meaningSQL ContainsLIKE Does not containNOT LIKE Equals= Not equal to<> Greater than> Greater than or equal to>= Less than< Less than or equal to<= LOGICAL OPERATORS True when both expressions are trueAND True when at least one expression is trueOR OppositeNOT WILDCARD OPERATORS Substitute a single character ? Substitute any number of characters *

9 Tools for Database Searching and Retrieval - QBE  QBE or Query by Example is a visual technique for specifying a database query. Common search criteria are entered into what appears to be an empty record, thus users do not need to understand the details of SQL. For example a modified QBE is used by most Internet Search engines.  In Access a simple QBE can be initiated using a ‘filter’ whilst more complex QBE can be utilised using the design view. SEARCHING, SELECTING AND SORTING

10 Tools for Database Searching and Retrieval - QBE SEARCHING, SELECTING AND SORTING


Download ppt "CORE 2: Information systems and Databases STORAGE & RETRIEVAL 2 : SEARCHING, SELECTING & SORTING."

Similar presentations


Ads by Google