

SQL
Presentation
•
Computers
•
10th Grade
•
Medium
K Parker
Used 48+ times
FREE Resource
14 Slides • 29 Questions
1
SQL
​

2
Introduction
Data, such as a list of names, can be stored in a straightforward text file. But it has some major limitations in terms of searching and sorting the data.
An alternative to storing data directly in a file is to store it in a database.
A database is designed specifically to handle, sort, search and manipulate organised data.
A database is a collection of data or information which is held together in an organised or logical way.
Because of the high organisation of a database, data can be retrieved, sorted and updated very efficiently.
3
Multiple Choice
What is a database?
something that holds data
a program on a computer
something that finds data
something that sends data
4
SQL
Adding and retrieving information in a database is done using a special-purpose programming language called SQL.
The basic actions carried out on a database are
Insert Update Delete Retreive Sort
5
Tables
A database is made up of one or more tables.
Like this:
Each table should be given a relevant name. The table above is named 'Characters' because it contains well known cartoon or comic characters.
6
Fields
Each column in a table is called a field and contains information about a particular item of data. Each field should be given a relevant name, for instance the field called 'city' contains a city name. A field is always set to a certain data type such as
numeric types: integer, float, real boolean character string Date and time binary Other e.g. blob
7
Records
A record is made up of collection of fields related to a single item.
In short:
Each piece of information is entered into a 'field'
Related fields are organised into records
Related records are placed into tables
Related tables are collected into a database
8
Data types
numeric types: integer (whole number), float and real (decimal number)
boolean - TRUE, FALSE,
character - 1 single character
string - 2 or more characters
9
Multiple Choice
10
Multiple Choice
11
Multiple Choice
12
Multiple Choice
13
Multiple Choice
14
Multiple Choice
In a database, all the information about one person or thing is called a
Worksheet
Presentation
Record
File
15
Multiple Choice
In a database, data is stored in
Queries
Forms
Reports
Tables
16
Multiple Choice
The best data type to choose for a memberID would be
Number
Date/Time
String
Currency
17
Multiple Choice
The best data type to choose for date of birth would be
Number
Date/Time
Text
Currency
18
Multiple Choice
In a TABLE, a row is known as a...
Information
Column
Data
Record
19
Multiple Choice
In a TABLE, a column is known as a...
Record
Field
Row
Data
20
Multiple Choice
Which of these holds lots of data?
Record
Field
Table
Drawing
21
SQL
Short for 'Structured Query Language'.
SQL was created for use with an SQL database. It consists of a set of commands that can carry out the following tasks
Search records, Update records, Insert records , Delete records , Find related records
SQL commands
SELECT This retrieves a record or a set of records. Other commands can then be carried out on that record set without affecting the whole database.
FROM The identifies the table where the data comes from
WHERE This sets out some condition with which to choose only certain records
22
Using SELECT
This is a command to retrieve records from a database table. It doesn't do anything to the record itself. But it is very useful because by selecting a record, other commands can be carried out on just the selected records without affecting the rest of the database.
If we wanted to retrieve every record from this table, the SELECT command is:-
SELECT * FROM Characters
The asterisk * is called a 'wildcard' and it means 'all records' or 'all fields'. The FROM is followed by the name of the table
23
SELECT
If we wanted to fetch all fields from within a specific record then the wildcard is useful, e.g if we wanted all fields from the Donald Duck record the SELECT statement is
SELECT * FROM Characters WHERE First Name = "Donald"
The SELECT command is also used to fetch fields from within a record set. e.g
SELECT Address, City FROM Characters WHERE First Name = "Donald"
24
Multiple Choice
How would you display Chairs in the Items table that have a Price greater than £50.
SELECT * FROM Items WHERE Type = 'Chair' AND Price > 50
SELECT * FROM Items WHERE Type = 'Chair' OR Price < 100
SELECT * FROM Iterms WHERE Type = 'Chair' AND Price >= 50
SELECT * FROM Items WHERE Price > 50
25
Multiple Choice
How would we script a SQL query to select "Description" from the Item table?
SELECT Item.Description
EXTRACT Description FROM Item
SELECT Item FROM Description
SELECT Description FROM Item
26
Multiple Choice
How do we select all rows for the "Designer" table?
SELECT * FROM Designer
SELECT [All] FROM Designer
SELECT Designer.*
SELECT FROM Designer
27
Multiple Choice
What is the correct order of clauses in a SQL statement?
SELECT, FROM, ORDER BY, WHERE
SELECT, FROM, WHERE, ORDER BY
SELECT, WHERE, FROM, ORDER BY
WHERE, FROM, SELECT, ORDER BY
28
Multiple Choice
Which character returns all the data found in a table?
%
#
*
/
29
Multiple Choice
Which word is missing from the following SQL statement? (Select, from, where)
Select * table_name
With
Where
From
And
30
Multiple Choice
Using which word allows you to specify that only one of a series of conditions needs to be met in a query filter?
And
Maybe
If
Or
31
Multiple Choice
Using which word allows you to specify that more than one condition must be met in a query?
Also
And
Or
Where
32
Multiple Choice
If you were wanting to filter data, which clause would you use?
Where
Order by
From
Select
33
Multiple Choice
Which statement is used to extract data from a database?
Extract
Get
Open
Select
34
Multiple Choice
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
35
Using SELECT .... WHERE
This is a command to select only certain records from a database table.
Table name: Characters
The general format of the SELECT ... WHERE command is :-
SELECT fields FROM table WHERE Criteria
36
SELECT, WHERE
Or, without the labels:
SELECT FirstName, LastName FROM Characters
WHERE City = 'Anaheim'
FirstName and LastName are fields (columns) within the table Characters.
This SQL command will return the first and last names of anyone in the table whose city is Anaheim. In this case, there are two matches:
Mickey Mouse Arnold Mouse
37
Operators
The standard set of arithmetic comparators can be used in the criteria (=, >, <., >=, <=, !=). For example Age < 60 would get all records with an age of less than 60.
38
Open Ended
State the most appropriate data type used to store Age
39
Open Ended
State the most appropriate data type used to store City
40
Open Ended
Type an SQL statement to select the First Name field for all records that have an Age greater than 50
41
Open Ended
How many records would appear in the result of the SQL statement to select the First Name field for all records that have an Age greater than 50
42
Open Ended
What does the wildcard (*) do?
43
SQL
​

Show answer
Auto Play
Slide 1 / 43
SLIDE
Similar Resources on Wayground
35 questions
ข้อมูลส่วนบุคคล
Presentation
•
10th - 11th Grade
36 questions
Nitrogen Cycle
Presentation
•
9th Grade
40 questions
PENGENALAN KOMPUTER
Presentation
•
10th Grade
39 questions
Sketching Higher Order Polynomials
Presentation
•
10th - 11th Grade
40 questions
CCS 10 - Transmit and Receive Calls to or from Customers
Presentation
•
10th Grade
35 questions
Layanan Sistem Jaringan
Presentation
•
10th Grade
38 questions
Artificial Selection
Presentation
•
9th Grade
40 questions
PERFORMING MENSURATION AND CALCULATION
Presentation
•
9th - 10th Grade
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade
Discover more resources for Computers
50 questions
STAAR English 2 Review
Quiz
•
10th Grade
20 questions
Figurative Language Review
Quiz
•
10th Grade
20 questions
Grammar
Quiz
•
9th - 12th Grade
31 questions
Easter Trivia
Quiz
•
KG - 12th Grade
16 questions
Circles - Equations, Central & Inscribed Angles
Quiz
•
9th - 12th Grade
46 questions
Unit 4 Geosphere Test Review
Quiz
•
9th - 12th Grade
10 questions
Calculating Surface Area of a Triangular Prism
Interactive video
•
6th - 10th Grade
20 questions
Central Angles and Arc Measures 2
Quiz
•
10th Grade