Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…"— Presentation transcript:

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

2 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.

3 Answers… Hands up with the right answers!

4 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.

5 So far… Over the last few lessons we have looked at key database terms including the following data types: -Boolean -Alphanumeric -Real -Integer -Date -Currency

6 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?

7 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

8 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.

9 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.

10 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…

11 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.

12 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 - Text Boolean Currency Date/Time

13 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

14 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.

15 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.

16 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.


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

Similar presentations


Ads by Google