access databases adult study - weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... ·...

29

Upload: others

Post on 25-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help
Page 2: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL

ADULT STUDY

A database Help and click sample databases

Page 3: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Databases⬜ This is a collection of data organised for a

specific theme in one or more tables, e.g video library. Can use to keep a record of customers. Carzone use to split their cars into different data types. A field is a specific piece of information e.g name, address etc. A record is a list of info on a customer for example

⬜ Table is a two dimensional structure where data is stored like in a spreadsheet e.g video catalogue ie names of all the videos

Page 4: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Keys Terms

⬜ Record: A row of info (name of video, director, year made , date last rented etc)

⬜ Field: one video name in a cell⬜ Preparing your folder;⬜ You can enter practise files into access

otherwise its just a blank database that u cant yet work on

Page 5: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Starting

⬜ Click start all programs, microsoft office then microsoft access. You ll see a task pane pop up on your right.

⬜ Open a database someone has already created. These template can be downloaded from the internet for most things which saves companies time in creating from blank.

⬜ Be careful to save correctly with good name and .mdb are access files

Page 6: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

First screen

⬜ Here look at the title bar at the top to see what database you’re in.

⬜ U have options of open, design and new then on the left tables queries etc. This is your main screen.

⬜ To create a new table double click create table in design view the main screen. Type number in field name and click number function as data type

Page 7: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

⬜ Tab button is used always. P216 enter data⬜ How to assign a primary key

◼ Every record must have one field that is diff to any other. This is is your primary key. E.g pps numbers

◼ Click on the field number then click the key symbol.⬜ To switch to datasheet view to enter data click

the data sheet tool p217 or select view datasheet

⬜ Save your table

Page 8: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Datasheet view

⬜ Similar to excel⬜ Select table u saved and double click to open⬜ Click the tab called design to change to design

view to see what the design of it looks like, whereas datasheet view is to see where ur data is entered.

⬜ Sorting in a table works the same way as excel⬜ To search for info click the binoculars button.

Use M* for any names beginning with m. click on employees table to see binoculars button

Page 9: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Inserting records

⬜ In dsv (Data Sheet View) click the red play arrow

⬜ To delete click the red x⬜ Col wid and height are changed by format or

double click between the lines⬜ To change table layout click table tab click on

your table and then click design option⬜ Any change u make in design view will also

update ur dsv.

Page 10: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Field Properties

⬜ Each field has properties that u can change at the bottom of the screen of ur table.

⬜ Fields can be indexed click lighning button to view.

⬜ Hit f6 when in table to go to field properties

Page 11: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Add and record fields p223

⬜ Click design view, click the open boxes button⬜ To reorder use drag and drop

⬜ Printing can specify records to print

Page 12: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Filtering record

⬜ E.g only see all dvds 2010⬜ Highlight the records that have 2010 in it⬜ Click the lightning button that has a filter pic

on it.⬜ The records appear at the top p226⬜ Click pic of filter alone to view all records again⬜ Or click drop down menu in table and click

same pic

Page 13: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Form View

⬜ For a better view of your data⬜ Click forms now instead of table and create

using the wizard⬜ Select the the fields you will use by click <

button or click << button and this will select all fields

⬜ Select columar, then standard⬜ Play button with * creates a new record

Page 14: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Changing forms

⬜ Click design view⬜ Drag out form to 22cm from the right width

and 8cm down⬜ Click form view pic of two little boxes p230⬜ To move a label wait for cursor to turn to a

hand and drag. 1 finger raised means only part will be moved

⬜ Click view and header ticked

Page 15: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

queries

⬜ Used to analyse data from tables⬜ Click design view and create query⬜ Choose what table to query and add⬜ In the small sqaure window choose fields and

drag down to lower design grid⬜ Click ascending order if u want⬜ Click save⬜ To run a query click the ! Button. Click x to

close

Page 16: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Combination and logical queries

⬜ Click the tick on show to hide fields⬜ = 2010 – all movies in 2010⬜ <> euro all record that do not have euro⬜ < 10 numbers less than ten⬜ <=⬜ >, >=⬜ BETWEEN finds values between or equal to 2 values

e.g between 18 and 45⬜ IN (romance,horrer)⬜ find records A* , beginnin with A⬜ You put these commands into the criteria tab⬜ p238

Page 17: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Criteria functions contine

⬜ Put byrne or burn into criteria tab will find both

⬜ Also u can type not romance

Page 18: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Reports

⬜ Load file then Use wizard then modify⬜ Tables tab then double click e.g educational sites

table⬜ Choose the fields u want using the arrows⬜ Then u can choose to group records by whatever

field⬜ Can sort order from a field or leave blank and click

next⬜ Click design view to edit parts⬜ U can inset text box click Aa.⬜ Click shift and select fields to change font to 10

Page 19: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Database relationships

⬜ When u have many tables with many records e.g pps, addresses but also pps numbers with tax details. Until access is told that these two different tables are related they will act separtately. To set up relationships the related fields must be of the same type.

⬜ E.g one husband record marries one wife record so ther relationship is one to one

⬜ However One manager manages many players so the relationship is one to many

Page 20: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Relationships continued

⬜ Also Many managers can Manage many teams⬜ Or many students can study many subjects if a

principal was using access to form a database

Page 21: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Relationships

⬜ To form a one to one first views all your tables⬜ Click the three connected boxes button p249⬜ Click on the field that’s common to most

headings e.g country (the primary key) and click and drag to the other box

⬜ Make sure in the edit relationship window that you two different titled tables and under them is the word country. Also tick all the boxes below such as enforce ref integrity.

Page 22: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

continue

⬜ Ref integrity ensures relationships with records are valid and related data isnt deleted or changed

⬜ Cascade means any time the primary key si changed in the link then the foreign key also changes

⬜ Cascade delete means if a record is deleted so is the related record.

⬜ Changing the primary table link field will change the related but not visa versa

⬜ Clicking on the + will show u more info and + means this field has a link with another table

Page 23: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

In one to many

⬜ Same idea.⬜ Tables in a circle are already linked⬜ Delete by clicking on line and click delete⬜ Tick boxes and run query

Page 24: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Common Errors .diag

⬜ Data is raw facts whereas info is data processed in some way

⬜ Each field in a table should contain only one type of data.

⬜ To find and sort faster use an index⬜ Nb to keep integrity of relationships cos it prevents

related data being challenged or deleted.⬜ If data is changed in a table data might be lost⬜ An administrator recovers data after a database crash.

Page 25: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

More common errors

⬜ For default values in the notes field click design view , general tab, type new

⬜ Add a field to a table, click design view, select memo data type, click save

⬜ Filter Classid 2 only. Click datasheet view, select a 2, click filter by selection.

⬜ Query using only 4 in locationid, create query in design view, enter 4 in the criteria under location

⬜ To hide uncheck box⬜ Only large cars: double click on fields that should be in

the query, enter Large in criteria on class field,

Page 26: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

More common errors

⬜ To modify older cars query for a brand of car. Design view, enter brand on the row for car filed, always save when things are changed

⬜ Records starting with B only. Design view, enter Like “B*” in criteria at city field, save

⬜ Change text in form header to Adding new locations. Design view, form header, select the label in the form header, press F2, change the text

⬜ To delete record 4, open form view, next x 4, click delete record number (play button with a red star).

⬜ To print all records in cars table, the all radio button⬜ Create report using total rental query; create report using wizard,

select quer total rental from tables drop down list, click >> button, next, summary options button, click check price for sum under price field, next x 3, type rental, click finish

Page 27: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Conclusion⬜ Databases⬜ First screen⬜ Datasheet view⬜ Inserting records/fields⬜ Form View⬜ Filtering⬜ Criteria⬜ Relationships⬜ Queries⬜ Common errors

Page 28: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Access Tutorials

⬜ Basic 10 min Tutorial⬜ Advanced Access Tutorial

Page 29: ACCESS DATABASES ADULT STUDY - Weeblymrmacgarry.weebly.com/uploads/3/8/0/6/38060565/ch5... · ACCESS DATABASES MODULE 5. AN OVERVIEW TO ENABLE FUTURE ECDL ADULT STUDY A database Help

Questions

⬜ Explain types of databases?⬜ Explain the difference between data sheet view

and design view.⬜ Explain the difference between a record and a

field?⬜ What's form view used for?⬜ How do you select criteria?⬜ Explain database relationships?⬜ Explain database queries