1 / 24

Databases

Databases. Storing and Organising Data. Log into your computers. Open up the DiDA website and read over the Database task, paying particular attention to the mark alerts. 5 Minutes. Key Questions. What is a database and what are the basic parts of a database?

margot
Download Presentation

Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Databases Storing and Organising Data • Log into your computers. • Open up the DiDA website and read over the Database task, paying particular attention to the mark alerts. 5 Minutes

  2. Key Questions • What is a database and what are the basic parts of a database? • What do the words: field, record, database and validation mean? • How do I plan and create a new database? • How do I check the data entered into a database?

  3. Databases • A database is just a large collection of organised information. • Many paper-based databases exist, such as: • These will probably be used by the people in your lists from the start of the lesson!

  4. Parts of a Database • Fields (one piece of information) • Records (several pieces of information on one topic/item)

  5. Question 1 • How many records are shown in the database below?

  6. Question 2 • How many records are shown in the database below?

  7. Question 3 • How many different fields does the database shown below have?

  8. Question 4 • How many records are shown in the database below?

  9. Question 5 • How many different fields does the database shown below have?

  10. Task 1: Car Database • Go to: • Shared > ICT > Year 10 DiDA > Unit 1 > Nov-Dec > Lesson 1 • Copy and paste the ‘Car DB’ folder to your own ICT folder inside “My Documents”. • Work through ‘Car DB Tasks’ word document, using the Access database called ‘Car DB’. 20 Minutes

  11. Data Types • Every field has what is known as a data type. This lets us know what sort of information will be placed into that field. Some data types are: Memo Text Number Currency Date/Time

  12. Data Types - Example • What are the data types for the following examples: • “Green” • “12/03/1992” • “£4.50” • “01707 5421233” • “LS24 8AD” • “399” Text Date/Time Currency Text Text Number

  13. Primary Key • A primary key is the name given to a special field which is the most important field in a database. This field is unique and therefore is different for each record in the database. • Eg a bank card number • Can you think of any other primary key examples?

  14. Task 2: Planning A Database • As part of your Dance O’Clock coursework you will have to plan a database using a data dictionary. • Using the data saved in the shared area (click here) to help you, create a data dictionary (click here) to show how you will make a database to hold this information. Choose a sensible primary key and highlight it in bold in your data dictionary. • Finished? Compare with the person next to you then create in Access.

  15. Validation • Validation checks that the data you enter is in the right form-ie it is valid data to enter and as expected. • Eg Check that numbers are not entered into a box that is reserved for text eg “First Name” • There are several ways of validating fields...

  16. What to Validate? • The data type (eg Text/Numbers/Dates etc) • The field size (eg 16 characters) • The data that has been entered itself (eg for a Gender field, “M” or “F”) • The format of the data entered (eg capital letters, combinations of letters numbers or symbols etc). • There are 2 main methods to achieve the above – input masks and validation rules.

  17. Method 1: Input Masks • An input mask can be used to change the text that is entered or to prevent certain text from being entered. • It should be added before adding data into the database. We use particular codes to specify what the input mask should do:

  18. Input Mask Codes 0 A digit 0-9 must be entered # A digit 0-9 is optional L A letter between a-z must be entered ? A letter between a-z is optional A A letter or a digit must be entered a A letter or a digit is optional & Any character (or symbol )can be entered • We can combine certain input mask codes as well, eg: “L????” or “0&00” or “Aaaa&&&”.

  19. Method 2: Validation Rules • Validation rules should be used to specify field sizes and in the case of predictable text input, to check what has been entered and then provide an error message in the case of any errors. • Eg to specify “only 14 characters long” (<=14) • Eg to specify “only accept M or F and if anything else is entered, give an error message” (M or F) • Click here for an example.

  20. Validation Rule Example

  21. Task 3: Validate • Now add input masks or validation rules to your database. Check them carefully. • Now import the data file to the database (use this help sheet if unsure) and check that the data has been imported correctly. • Finished? Add at least 5 records of your own choice to the database.

  22. Homework • Ensure you have completed the data dictionary for the Dance O’Clock database (click here). Indicate the primary key and also explain any input masks or validation rules to use.

  23. Plenary • Click here and attempt the quiz for our lesson today.

  24. IMPORTANT! • Log off the computer • Tidy up your computer area • Smarten up your uniform

More Related