New game
Download
Get Academic Plan
Share game
Integrate it into your platform

You can integrate the game into an LMS compatible with LTI 1.1 or LTI 1.3 such as Canvas, Moodle, or Blackboard. This way, the scores will be automatically saved into the platform’s gradebook.
Download
You have exceeded the maximum number of games you can integrate into Google Classroom with your current Plan.

To integrate as many games as you want in Google Classroom, you need an Academic Plan or a Commercial Plan.

You have exceeded the maximum number of games you can integrate into Microsoft Teams with your current Plan.

To integrate as many games as you want in Microsoft Teams, you need an Academic Plan or a Commercial Plan.

Downloading games is an exclusive feature for users with an Academic Plan or a Commercial Plan.

Get your Academic Plan or your Commercial Plan now and start integrating your games into your LMS, website or blog.

If you wish, you can download a demo game here and test its integration:

0478 Unit Section 9: Databases - DATATYPES - FIELDS - SQL

Fill in the Blanks

Played 2

About this activity

DATATYPE - FIELDS - SQL

Created by

Singapore

Download the paper version to play

Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

%
Anonymous
Anonymous
%
%
%
You have exceeded the maximum number of games you can print with your current Plan.

To print as many games as you want, you need an Academic Plan or a Commercial Plan.

Print your game
0478 Unit Section 9: Databases - DATATYPES - FIELDS - SQL
 

Fill in the Blanks

0478 Unit Section 9: Databases - DATATYPES - FIELDS - SQLOnline version

DATATYPE - FIELDS - SQL

by Jonathan Dunsby
1

A database is a collection of data that allows people to information in a way that meets their needs . The can include text , , pictures ; anything that can be in a computer . A single - table contains only table .

2

Why are databases useful ?
Databases problems occurring because :
» if any or additions are made it only has to be done once ? data is
» the same data is used by
» data is only once in relational databases which means no data .

3

What are databases used for ?
To information about people , for instance :
» patients in a
» at a school .
To store information about things , for instance :
» to be sold
» books in a .
To store information about , for instance :
» bookings
» results of .

4

Fields and records ? the building for any database
Inside a database , data is in tables , which consists of many records . Each consists of several fields . The number of records in a will vary as new records can be added and deleted from a table as required . The number of in a table is fixed so each record contains the same number of fields . An easy way to remember this is : each record is a in the table and each field is a in the table .

5

A table contains data about type of item or person or event , and will be given a name , for example :
» a table of called PATIENT
» a table of books called
» a table of doctor ? s called APPOINTMENT .

6

Each within a contains about a single item , person or event , for example :
» Winnie Sing ( a patient )
» IGCSE Computer ( a book )
» 15 : 45 on 2020 ( an appointment ) .

7

As every record contains the same number of , each field in a record contains a specific piece of about the item , person or event stored in that record . Each field will have a meaningful name to the data in it ,

8

For a hospital patient the could include :

? The patient ? s first field called FirstName
? The patient ? s family name field called
? The patient ? s of admission field called DateOfAdmission
? The name of the ? s consultant field called Consultant
? The patient ? s ward field called WardNumber
? The patient ? s bed number field called , etc .

9

There are six basic data that you need to be able to use in a :

» text /
» character
»
» integer
» real
» date / .

10

What is a data type ?
Each will require a data type to be selected . A data type how the data is stored , displayed and the that can be performed on the stored value . For example , a field with an integer data type is stored and displayed as a number and the value stored can be used in .

11

As each within a table contains data about a item , person , or event , it is important to be able to uniquely this item . In order to reliably identify an item from the data stored about it in a record there needs to be a field that identifies the item . This is called the primary key .

12

A that is a primary key must contain data values that are never in the table . The primary key can be a field that is already used , provided it is , for example the ISBN in the book . The PATIENT table would need an extra field for each record as all of the existing fields could contain repeated data . To create a primary key , we could add a new to each record , for example a unique could be added to each patient ? s record .

13

Structured Language ( SQL ) is the standard query language for writing scripts to obtain useful from a database . We will be using SQL to obtain information from single - databases . For example , somebody needing to visit a patient would only require the
number and the bed of that in order to find where they are in the hospital . Whereas a consultant could need a list of the of all the that they care for .

14

SELECT Fetches specified ( columns ) from a ; queries always with SELECT .

FROM the table to use .

WHERE Includes only ( rows ) in a query that a given .

ORDER BY the results from a by a given column either or numerically .

SUM Returns the of all the in a field ( column ) . Used with SELECT .

COUNT Counts the of records ( rows ) where the field ( column ) matches a condition . Used with SELECT .

15

Only the SELECT and FROM commands are in an SQL script . All other commands are .

A SELECT statement takes the form : SELECT Field1 , Field2 , Field3 , etc . ? this specifies the individual ( columns ) to be . SELECT * ? this specifies that fields ( columns ) are to be shown .

16

A FROM statement takes the form :

FROM ? this specifies the to use .

A WHERE statement takes the form :

WHERE ? this specifies the condition to .



17

An ORDER BY statement takes the form :

ORDER BY Field1 , Field2 , etc . ? this specifies a sort in ascending or alphabetical order starting with the first field .

ORDER BY Field1 , Field2 DESC ? this specifies a sort in descending or reverse order starting with the field .

A SUM statement takes the form :
SELECT SUM ( Field ) ? this specifies the ( column ) for the . The field should be integer or .

A COUNT statement takes the form :
SELECT COUNT ( Field ) ? this the field ( column ) to count if the given is .

Are you sure you want to leave the page?

If you leave, you will lose the game in progress.