23
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI [email protected] October 8, 2013 1

Day 14: Access Chapter 1

  • Upload
    garnet

  • View
    53

  • Download
    0

Embed Size (px)

DESCRIPTION

Day 14: Access Chapter 1. RAHUL KAVI [email protected] October 8, 2013. Last Lecture. Introduction to Databases. Access Interface. Navigation Pane Table Views: Datasheet view (similar to Excel worksheet) Design view (used to modify table). Tables. - PowerPoint PPT Presentation

Citation preview

Page 1: Day 14: Access Chapter 1

DAY 14:ACCESS CHAPTER 1

RAHUL [email protected] 8, 2013

1

Page 2: Day 14: Access Chapter 1

2

LAST LECTURE

• Introduction to Databases

Page 3: Day 14: Access Chapter 1

3

ACCESS INTERFACE

• Navigation Pane• Table Views:

– Datasheet view (similar to Excel worksheet)– Design view (used to modify table)

Page 4: Day 14: Access Chapter 1

4

TABLES

• Tables store data about a particular set.• Contains fields and records.• Fields are…• Records are …

Page 5: Day 14: Access Chapter 1

5

PRIMARY KEY

• The primary key uniquely identifies each record in a table.

• By default, tables have an ID field that is an autoincremented integer– The value of ID goes up by one for each new

record

Page 6: Day 14: Access Chapter 1

6

EXAMPLES OF PRIMARY KEYS (DEPENDING ON CONTEXT)

• Username in bank users table.• Email ID in a contacts table.• WVU Student ID in students table.• Country domain id (.us, .in, .ch, .cn, .uk,

etc.) in internet domains table.• Facebook URL of CS101 class (https://

www.facebook.com/wvucs101) if making a tables of unique URLs.

Page 7: Day 14: Access Chapter 1

7

NAVIGATION BAR

• Record navigation– Forward, Back– First, Last– Record number (position of the record, not

primary key)• New Record• Search

Page 8: Day 14: Access Chapter 1

8

FORMS

• Allows you to enter, modify, or delete table data

• This can also be done in the Datasheet view, but forms allow you to customize what fields are shown and even work with multiple tables

Page 9: Day 14: Access Chapter 1

9

QUERIES

• Queries are questions you ask about the data

• Returns fields, or calculations on fields for records that match the criterion given

Page 10: Day 14: Access Chapter 1

10

REPORTS

• Formatted information from tables or queries

• Access has are different tools for designing, modifying, and viewing reports

Page 11: Day 14: Access Chapter 1

11

SAVING• Word, Excel, and Powerpoint all work from

memory– This means all changes are only stored in temporary

storage until you save• Access data works directly from storage

– As soon as you finish adding/editing a record, the changes are written to disk

• Access design (of tables, forms, queries, and reports) works from memory– You must manually save any database design changes

Page 12: Day 14: Access Chapter 1

12

UTILITIES- COMPACT AND REPAIR

• As you modify and delete records, not all of the space is reclaimed

• Compact and Repair reclaims that space by creating a new database, copying all definitions over, and finally copying the data over.

• Database Tools->Tools->Compact and Repair Database

Page 13: Day 14: Access Chapter 1

13

UTILITIES- BACKUP

• File->Save & Publish->Back Up Database• This creates a copy of the database, with

the date added to the filename• If you are about to try something new for

the first time, especially if it involves deleting something, backup your database first so you have a good copy to fall back on if you mess up

Page 14: Day 14: Access Chapter 1

14

FILTERING

• First, select the field you want to filter on• Home->Sort & Filter->Filter• Home->Sort & Filter->Selection can make

common filtering easier• Advanced filtering allows you to filter by

multiple fields

Page 15: Day 14: Access Chapter 1

15

SORTING

• Sorting changes the order of the records in a table

• Home->Sort & Filter-> Ascending, Descending

• Really, both filtering and sorting are special cases of queries

• Other queries can incorporate sorting and filtering techniques

Page 16: Day 14: Access Chapter 1

16

ACCESS VERSUS EXCEL

• Excel is often easier if you are working with data with simple relationships

• As the complexity of your data increases, the need for a logical organization increases

• Access allows you to specify that organization

Page 17: Day 14: Access Chapter 1

17

USE ACCESS WHEN YOU:

• Require multiple related tables to store your data

• Have a large amount of data• Need to connect to and retrieve data from

external databases• Need to group, sort, or total data based on

multiple parameters• Need to allow multiple users to simultaneous

modify the data

Page 18: Day 14: Access Chapter 1

18

USE EXCEL WHEN YOU:

• Only need one worksheet to handle all of your data

• Have mostly numeric data• Want to run “what if” analysis on your data• Need to create complex charts and/or

graphs

Page 19: Day 14: Access Chapter 1

19

ACCESS IS RELATIONAL

• This means you can manage groups of data (tables) and set rules (relationships) about how those tables interact

• Relationships are defined in the Relationships Window using Join Lines

Page 20: Day 14: Access Chapter 1

20

RELATIONSHIP WINDOW

• Database Tools->Relationships or Table Tools->Table->Relationships

• Add in the tables you want to join together• Before you can create relationships, you

must close the tables involved• Drag line from the primary key in one

table, to the foreign key in the other table

Page 21: Day 14: Access Chapter 1

21

REFERENTIAL INTEGRITY• Referential Integrity causes Access to ensure

the record exists for the primary table before it can be referenced in the related table

• If Referential Integrity is enabled, Cascading of Updates and/or Deletes can be enabled– Delete of primary record deletes related record– Update of primary record ID updates related

record’s foreign key

Page 22: Day 14: Access Chapter 1

22

NEXT CLASS

• Database design– Required tables– Avoiding redundancy– Data type selection– Calculated fields– Keys

• Sharing data with Excel• Relationship types

Page 23: Day 14: Access Chapter 1