Day 22: MICROSOFT ACCESS – Review

17
DAY 22: MICROSOFT ACCESS – REVIEW Akhila Kondai [email protected] November 04, 2013

description

Day 22: MICROSOFT ACCESS – Review. Akhila Kondai [email protected] November 04, 2013. ANNOUNCEMENTs. MyITLab Lesson D is due on 11/04/2013 (Today). Homework # 5 would be due for 11/08/2013 Email me or visit open lab for assistance in home works or MyITLab . Homework 5. - PowerPoint PPT Presentation

Transcript of Day 22: MICROSOFT ACCESS – Review

Page 1: Day 22: MICROSOFT ACCESS –  Review

DAY 22:MICROSOFT ACCESS – REVIEW

Akhila [email protected] 04, 2013

Page 2: Day 22: MICROSOFT ACCESS –  Review

ANNOUNCEMENTS• MyITLab Lesson D is due on 11/04/2013 (Today).• Homework # 5 would be due for 11/08/2013• Email me or visit open lab for assistance in home works

or MyITLab.

Page 3: Day 22: MICROSOFT ACCESS –  Review

HOMEWORK 5

• 4 Tables– Counties ( Import from XML)– Harvest (Import from XML)– WMU ( Create a new table and enter data given in the

instruction sheet)– Analysis Questions ( Create a table and use it store your

answers for the analysis questions in step 7)

• 7 Queries– Validate if your query is right by checking the number of records

returned by your query with the hint given in the instruction sheet for each query.

Page 4: Day 22: MICROSOFT ACCESS –  Review

M.S ACCESS OVERVIEW • Creating tables or importing from XML files• Assigning primary key and formatting the fields accordingly• Entering records• Building relation ships between tables in the database• Creating Queries• Formatting fields used in queries• Creating forms• Creating reports

Page 5: Day 22: MICROSOFT ACCESS –  Review

BASICS

• Database – stores information in various tables.

• Tables – each table has multiple fields ( name, age, address) where data can be stored.

• Record – complete set of all the data (fields) in a table.– Fields are edited in DESIGN VIEW!!!– Records are edited in DATASHEET VIEW!!!

Page 6: Day 22: MICROSOFT ACCESS –  Review

STRUCTURE

• All data is organized in tables.• Tables shouldn’t contain multiple accounts

of similar information.– If this occurs a new table should be made.– Ex. Writing the same address for all the

employees of at the same office when you could have a separate “Locations” table.

Page 7: Day 22: MICROSOFT ACCESS –  Review

TABLES

• Usually created from scratch or imported from Excel or an .xml file.

• Always has either a single primary key or two or more fields acting as a composite key.

• Primary key: The field that separates every record from every other record. – Student ID #– SSN#

Page 8: Day 22: MICROSOFT ACCESS –  Review

TABLES

Design View• Fields• Primary Key

– COMPOSITE KEYS• Data Types

– AutoNumber, Number, Currency– Text, Memo– Yes/No– Lookup Wizard

Datasheet View• Add Records• View Records• Edit Records• Delete

Records

Page 9: Day 22: MICROSOFT ACCESS –  Review

TABLESAlways create tables in Design view

Add the Field Names ( Column Labels ) in Design ViewFlip from Design View to Datasheet View to enter the

Records

9

Field Names

Records

Page 10: Day 22: MICROSOFT ACCESS –  Review

CREATING TABLES – CONTD.Select proper field names and data typesData Types:• Text – when you are entering text, can be numeric or alphanumeric• Memo – when you need more than 255 characters• Number – when you are entering number:• Single & Double – Use these field sizes to store DECIMAL numbers• Integer & Long Integer – Use these field sizes to store WHOLE

numbers• Currency – when storing currencies• Date/Time – when storing dates and times• Auto Number – auto incrementing number – note it is sequential so

if you delete a record the associated Auto Number is gone. So don’t panic if your auto numbers are missing some values

Page 11: Day 22: MICROSOFT ACCESS –  Review

MAKING RELATIONSHIPS• Make sure neither table is open when you are

creating the relationships. If they are you will get an error.

• Always relate fields with the same Data Type and same Content

• In general related fields will have similar names – Country and Country Abbreviation, etc

• If the relationships aren’t set up properly it is very likely the queries won’t work

11

Page 12: Day 22: MICROSOFT ACCESS –  Review

QUERIES• Probably the most important area to focus your

study time on.• Criteria – AND vs. OR.• Sorting – Left Right• Wildcards – ‘*’• Aliasing – ‘:’• Calculated fields – use Expression Builder!!!• Total/Aggregate Queries• Show/Hide Fields

Page 13: Day 22: MICROSOFT ACCESS –  Review

QUERIES - TIPS

• In a Total Query, sometimes you want to use the same field more than once to get different calculations.– Think about grades for an exam. We

might want to find the Average and the Max and the Min. We find these using the same group of data (the exam grades).

Page 14: Day 22: MICROSOFT ACCESS –  Review

QUERIES - TIPS

• When choosing which tables to use, use a few as possible. Even though two tables might have the same field, if you can create the query using only one table then do it.

• If you’re query looks correct but isn’t returning the correct number of results check if you’re using too many tables than needed.

Page 15: Day 22: MICROSOFT ACCESS –  Review

FORMS WITH SUBFORMS• You can create a form with a subform by including fields from each

of two tables that have an established relationship formed• The main form will consist of data from the primary table and the

subform will consist of data from the related table• Create form by using wizard Create ribbon -> More Forms -> Form

Wizard– Click the “Tables/Queries” drop down to add all the fields you need Start

with your first table (usually the “One”) and add some fields from it.– Then add fields from your second table (usually the “Many) – Hit Next– You will see Form with subform at the bottom, if you don’t then either

your relationships aren’t correct or you didn’t add the entries in properly

Page 16: Day 22: MICROSOFT ACCESS –  Review

REPORTS

ReportsAgain, use the Report WizardAdd in all fields as requiredAdd in any viewing, grouping or sort levels

Page 17: Day 22: MICROSOFT ACCESS –  Review

Questions ?