complete theory from last lesson… put today’s date in the front of your book read pages 46 and...

16
Complete theory from last lesson… • Put today’s date in the front of your book • Read pages 46 and 47 of the textbook…

Upload: annabella-montgomery

Post on 02-Jan-2016

220 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Complete theory from last lesson…

• Put today’s date in the front of your book

• Read pages 46 and 47 of the textbook…

Page 2: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Answer the following questions…

Remember to use full sentences when answering questions.

1. What is a KEY FIELD? 2. Give an example of a key field. 3. Why are these needed?4. What is a FLAT FILE database?5. List two advantages of flat file databases.6. List two disadvantages of flat file databases.7. What is a RELATIONAL database?8. List two advantages of relational databases.9. List two disadvantages of relational databases.10.Answer question 1 at the bottom of page 48.

Page 3: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Answers…

Hands up with the right answers!

Page 4: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Data Manipulation – Practical

By the end of next lesson you will be able to:

1.Create an appropriate database record structure.

2.Enter and amend data in a database.

Page 5: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

So far…

Over the last few lessons we have looked at keydatabase terms including the following datatypes:

- Boolean- Alphanumeric- Real- Integer- Date- Currency

Page 6: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Scenario• Our school arranges school trips.

• Students hand in letters which must be collected and passed on to the school office.

• Office staff then enter this information into a database.

• Why do they need to enter the information into a database?

Page 7: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

School Trip Database

• The school holds the following information about each student going on a school trip:

- Name- Address- DOB- Emergency phone number- Allergy information- Deposit paid- Amount paid- Date paid

Page 8: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Setting up the structure…• Watch the following demonstration on how to

set up the school trip database.

• There is a video to watch if you don’t get it the first time around…

• You must think carefully about the information you want to store when assigning data types.

Page 9: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Tasks…

1. Set up the database table by assigning the correct data types to each field.

2. Write a numbered list of the steps used in your book under the title Creating a Database Structure.

3. Open Student Records – Manual Entry from the VLE or shared area.

4. Enter the records into the database.

Page 10: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Importing…

• Some of the data has already been entered onto a computer but it’s in a text file and each field is separated by a comma.

• We need to import this into our database in a new table.

• Observe the following demonstration to see how to do this…

Page 11: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Tasks…1. Import the data from the text file Student Records –

Import Data into a new table.

2. Write a numbered list of the steps used in your book under the title Importing Data.

Make a note of both options in your book.

Note – the steps are the same if you are given a text or spreadsheet file to import.

Page 12: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Class Q&A

• What data types should the following fields be given? Forename - Surname - Address Line 1 - Address Line 2 - Post Code - Phone Number - Allergy - Deposit - Amount Paid - Date Paid -

TextText

TextText

TextText

BooleanBoolean

CurrencyDate/Time

Page 13: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

By Default…• All fields apart from ID and Date set themselves to

text when importing data into a table that hasn’t yet been created.

Correct the data types for the following fields:• Allergy – Boolean • Deposit Paid – Boolean• Amount Paid – Currency

Page 14: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Formatting Fields…• Fields have properties which can be changed to make

the requirements of a particular field more specific.

• The format and decimal places are the only ones you need to know about for now…

• The example below shows how you can change the Currency options for the Amount Paid field.

Page 15: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Tasks…

• For the Currency field change the format to £ and decimal places from Auto to 2.

• Go through each of the fields in your table and make any relevant changes to the format of them.

• Write a few brief notes in your book about the changes you’ve made.

Page 16: Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…

Final Task!• You need to create a database containing one table/file on a

topic of your choice.

• Some ideas if you can’t think of anything: Cars CD’s Films

• You need to do the following: Create the database and save it using an appropriate filename Create a table/file and save it using an appropriate name Assign at least 5 fields including a primary key/key field Assign data types to each field Format each of the fields as appropriate Add 5 records to your table/file

• If you get stuck, look back at the ‘How To’ lists you created.