Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Databases Setting up a Database Starter Activity: 22 May 2017 Key Questions • How do I create a new database in Access? • What is validation and how do I add it to a database • What is an input form and how do I create an effective input form? Faculty of ICT: AGCSE in ICT Slide 2 LOs 22 May 2017 Homework • Update your project plan with everything we have done to date • These will be checked in your next lesson, so MUST be up to date Faculty of ICT: AGCSE in ICT Slide 3 LOs 22 May 2017 Creating a New Database • In Access, once you have a new document, there are 2 different Table views: – Design View – For changing the layout/structure of the Database. – Datasheet View – For adding data to the Database or browsing through data. • Change between different views by using the following button: Faculty of ICT: AGCSE in ICT Slide 4 LOs 22 May 2017 Task 1: Create Database 20mins • Your teacher will show you how to create a new database and database table. • Create your music database and table using your Data Dictionary from last lesson • Create any look ups need (i.e. drop down boxes) • Use the help sheet given to you at the start of the lesson Faculty of ICT: AGCSE in ICT Slide 5 LOs Task 2: Adding validation Faculty of ICT: AGCSE in ICT Slide 6 LOs 22 May 2017 20mins 22 May 2017 Task 3: Add validation to your music database Faculty of ICT: AGCSE in ICT Slide 7 LOs Importing data • Your teacher will demonstrate how to import data Reasons for errors: Too many fields Capital letters or spelling mistakes Validaiton rules are incorrect Faculty of ICT: AGCSE in ICT Slide 8 LOs 22 May 2017 Task Input Forms • Input forms are just electronic versions of traditional forms. • There are many input forms on the Internet. They are used to make inputting information easier, and they can also display information as well. Faculty of ICT: AGCSE in ICT Slide 9 LOs 22 May 2017 Database Input Forms • When working with a Database, we need to create an input form to help the user type information into the database: • eg Faculty of ICT: AGCSE in ICT Slide 10 LOs 22 May 2017 Making Input Forms (1) • Click on ‘Forms’ • Then click on ‘Create form by using wizard’: Faculty of ICT: AGCSE in ICT Slide 11 LOs 22 May 2017 Making Input Forms (2) • Click on the >> button to add all of the fields in the database to your input form. • Now click ‘Next’ Faculty of ICT: AGCSE in ICT Slide 12 LOs 22 May 2017 Making Input Forms (3) • Choose ‘Columnar’ and then click on ‘Next’ Faculty of ICT: AGCSE in ICT Slide 13 LOs 22 May 2017 Making Input Forms (4) • Choose ‘Standard’ and then click on ‘Finish’ Faculty of ICT: AGCSE in ICT Slide 14 LOs 22 May 2017 Making Input Forms (5) • Double click the name of the form from the main window. • The form will now open. Next, click on the ‘View’ button to go to design view (this will let you edit the appearance): View Button Faculty of ICT: AGCSE in ICT Slide 15 LOs 22 May 2017 Making Input Forms (6) • Hover your mouse in this area until your cursor changes, then drag down to make more space. • Right click on areas of the form to change the colours, fonts etc Faculty of ICT: AGCSE in ICT Slide 16 LOs 22 May 2017 Task 2: Input Forms • Create an input form for your school trip database. Make sure that you include the following: a) b) c) d) A sensible title Suitable buttons to help the user A related image Sensible colour scheme • Finished? Read these pages on Database reports. Faculty of ICT: AGCSE in ICT Slide 17 LOs 22 May 2017 Queries • When we need to search and/or sort the database, we can use a query. • Queries work in design and datasheet view in the same way that tables do. • When we make a new query we need to specify the search and/or sort criteria (ie what to search/sort). Faculty of ICT: AGCSE in ICT Slide 18 LOs 22 May 2017 Query Example • In order to make a query, we need to know the fields in the database that will be used. • Eg Search the ‘Country’ field for ‘Spain’ Search the ‘Price per person’ field for ‘£40’ Faculty of ICT: AGCSE in ICT Slide 19 LOs 22 May 2017 Making Queries 2 1 • Click on ‘Queries’ then on ‘Create query using wizard’. Faculty of ICT: AGCSE in ICT Slide 20 LOs • Click on ‘>>’ to add all fields then click ‘Next’. 22 May 2017 Making Queries (2) 2 3 • Click on ‘Modify the query design’ and then click ‘Finish’. Faculty of ICT: AGCSE in ICT Slide 21 LOs 22 May 2017 Making Queries (3) 4 • If you would like to find something, type into the ‘criteria’ box. To sort, choose a method of sorting from the ‘sort’ box. Faculty of ICT: AGCSE in ICT Slide 22 LOs 22 May 2017 Making Queries (4) 5 • Click the Exclamation mark to run the query. 6 • The query results will now be shown. After closing the results window, save the query with a sensible file name. Faculty of ICT: AGCSE in ICT Slide 23 LOs 22 May 2017 Task 3: Creating Queries • Create (and save) queries to do the following: 1. 2. 3. 4. 5. • Sort the destinations into descending alphabetical order. Show all educational destinations and sort this list into ascending order according to destination name. Show a list of all Heritage and Sports trips only. Show all trips costing less than or equal to £5. Show all trips that are free and sort into ascending order according to the ‘region’ field. Hide the web address, opening time and closing time fields. Need help? Click here. Finished? Click here & read – try the activity on this page also. Faculty of ICT: AGCSE in ICT Slide 24 LOs 22 May 2017 Homework • In PowerPoint, create an input form design for your Dance O’Clock database. Use your data dictionary for help with knowing which fields to include. Remember to include buttons, an image and sensible colours. • Annotate to explain fitness for purpose and audience. Faculty of ICT: AGCSE in ICT Slide 25 LOs 22 May 2017 Plenary • Here are some answers to questions regarding databases. • Write a question for each answer: 1. 2. 3. 4. 5. Field Record Query Validation Input Mask Faculty of ICT: AGCSE in ICT Slide 26 LOs 22 May 2017 IMPORTANT! • Log off the computer • Tidy up your computer area • Smarten up your uniform Faculty of ICT: AGCSE in ICT Slide 27 LOs