Download presentation
Presentation is loading. Please wait.
Published byCornelius Johns Modified over 8 years ago
1
Starter Draw an ERD and Normalise (Using the notation learned) the following flat file database into a relational database using 4 tables. Pupi l No. Pupil Name DOBExam Num SubjectLevelDate of Exam Roo m Code Room Name 1Jane C12/08/93ex1ComputingAS12/06/14SHHall 1Jane C12/08/93ex2MathsA210/06/14SGGym 1Jane C12/08/93ex3PhysicsA210/06/14SGGym 2Leroy S14/10/92ex2MathsA210/06/14SGGym 2Leroy S14/10/92ex3PhysicsA210/06/14SGGym
2
Objectives Understand and use Query by Example and SQL to interrogate a database Investigate the role of the Database Administrator.
3
CG3.6 Databases (QBE & SQL)
4
Query by Example One of the biggest advantages of using databases is to interrogate (Search) them to find useful information to help organisations. Query by example is one method of interrogating a database
5
Query by Example 1)Download the Bats database from Moodle. 2)Using the Query by Example worksheet interrogate the database to find the required information.
6
Structured Query Language (SQL) SQL is another method of interrogating a database. It uses written commands to find the data needed.
7
SQL Structure Select Distinct fields to be shown (separated by commas) From the table(s) which contain the data Where Condition(s) you want the data to meet (Optional) Order By field you want it to be sorted by (Optional) Group By field you want to group by (Optional) The last line should finish with ;
8
SQL Structure from two tables When using SQL to get data from two or more tables in the WHERE clause we have to state how the tables are connected to each other. Eg. WHERE tblCustomer.CustomerNo = tblOrder.CustomerNo
9
SQL Practise 1)Download the Stationary database from Moodle. 2)Using the SQL worksheet interrogate the database to find the required information.
10
Homework Activity Complete the homework worksheet available via Moodle.
11
Plenary Clarifying Learning Objectives
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.