Search Header Logo
[igCS] Database Query

[igCS] Database Query

Assessment

Presentation

Computers

10th Grade

Practice Problem

Easy

Created by

Andy tsui

Used 6+ times

FREE Resource

9 Slides • 2 Questions

1

[igCS] Database Query

Slide image

2

Objectives

  • Learn about what is database query and why we need it

  • Types of querying method

3

Open Ended

Recalled from what we previously learnt, what are the two fundamental function of a database?

4

Database query

  • Filtering results from data in the Db with the given criteria

  • (imagine it as a question to ask the computer about data)

5

Activity: Query for our class

  • All students that wear glasses

  • All students from F4B

  • All students where they are NOT from F4B

  • All students who's glasses=Yes AND from F4B

  • All students where class=F4B AND class=F4C

6

How is the query looks like in computer?

  • One most common language for database is called SQL (Structural Query Language)

  • SQL is supported by most major database system

  • MS Access also supports using GUI in query building, we call it QBE (Query By Example)

7

How SQL looks like:

  • SELECT * FROM Students WHERE class="F4B"

  • translates to: Select all students which class is F4B


8

How QBE looks like

  • We will create in Access...

9

Create a few more query

  • All students who's glasses=Yes AND from F4B

  • All students who's LastName starts with 'C'

  • All students who is wearing glasses OR who is from F4A

10

Further

  • All students, who's class is F4A, order by their LastName, displays ONLY their firstName and glasses

  • All students, who's NOT wearing glasses, order by their LastName, displays ONLY their firstName and class

11

Multiple Select

Which operation is supported in a database query

1

Selecting Records

2

Selecting Fields

3

Ordering

4

Removing records

[igCS] Database Query

Slide image

Show answer

Auto Play

Slide 1 / 11

SLIDE