Databases

1 Learning Objectives

Objectives

In this lesson you will develop an understanding of the learning strand Data and data representation on your progress ladder, working towards blue/indigo level.

  • You will demonstrate understanding of searching databases.
  • You will build knowledge of multiple search methods.
  • You will contribute to query and searching discussions.
  • You will understand the structure and purpose of SQL statements.

2 Querying the Database

Try It

  • Starter - Click on the image below to test your knowledge of database terminology:

Learn It

  • A query is a question, often expressed in a formal way.
  • A database query can be either a select query or an action query.
  • A select query is a data retrieval query, while an action query asks for additional operations on the data, such as insertion, updating or deletion.

QueryDB.jpg

Try It

  • Open your *Game Stock Database* Download this file from the last lesson.
  • Today you are going to complete the following queries (Searches):
  • Your Teacher will demonstrate how to create a query or you can watch the video above or view this guide?
    1. Create a query that finds all games that are 3+.
    2. All PlayStation games in alphabetical order of name.
    3. An RPG game that is suitable for 11+.
    4. All Sport games suitable for 15.
    5. Your own query (Any titles/platforms/age/price etc.)

Picture1.png

3 Activity 2: Progress Check

Learn It

  • In the previous lesson you should have used query guides to help you complete the five basic queries.
  • Databases store data in a structured format, which can be accessed using queries.
  • In fact, the structured query language (SQL) was designed specifically for this purpose.
  • Users can create SQL queries that retrieve specific information from a database.

SQL.jpg

Try It

  • Today your taks is to create a new query that uses at least 4 different criteria to search and display the results.
  • For example: xbox games, Sports Genre, age 15+ and Price less than £40.00.
    1. Explain how you used criteria to search the database for required information.
    2. Explain how you used the sort function to sort the data in your search.
    3. Take screenshots to prove you have completed each search.
    4. Click on the SQL view to show the SQL commands used in your query, take a screenshot of this.

    Query.png

Try It

  • Plenary - Using your knowledge of databases so far, have a go at the Query Quiz

Badge It - Silver

Learning Strand: Data and Data Representation

  • Upload your screenshots of the five queries, including an explanation of the criteria used to www.bournetolearn.com.

Badge It - Gold

Learning Strand: Data and Data Representation

  • Upload your screenshots of the five queries, including a detailed explanation of the criteria used to perform each search to www.bournetolearn.com.

Badge It - Platinum

Learning Strand: Data and Data Representation

  • Create your own query that uses at least 4 different search criteria. Upload your evidence to www.bournetolearn.com.
  • Upload your SQL screenshot showing the SQL commands used in your search.