Вы находитесь на странице: 1из 18

October 31, 2013 Go over Exam 2 Access PowerPoint show Begin Lab 8 tables in Access

Database and Introduction to Access

Definitions
Database organized collection of related data that allows access, retrieval, and use of the data
Databases are used for two major purposes:
Operational processing tracking activities Analytical extract information for decision-making

DBMS Database Management System


Package of computer programs and documentation

that lets you establish and use a database


Power of DBMS comes with the ability to link tables together through the use of a common field Relational database

Access is a relational DBMS that is readily available and integrates with other Office software as well as other DBMS.

Relational DBMS
Allows you to create fields, tables and table

relationships Allows you to add new records, change field values and delete records Has a built-in query language Has a built-in report generator Has a built-in control, recovery and security features

In Access, Objects are


Table the part of the database that holds the data

similar to a 2-D table in which columns are fields and rows are records
The content of a field is called the field value

Query set of conditions that provides for retrieval

of certain records from a table


SQL is a popular query language

Report provides the specifications for output of

data in a tabular format Form customized manner of inputting data into a database (usually presents one record at a time) Macros a set of actions that you want Access to perform with a single command

In Access
Each database can be up to 2 gb in size

Can contain up to 32,768 objects


Each field name can be up to 64 characters in

length
No periods, exclamation marks, or square brackets

Can have up to 255 simultaneous users


Works primarily from secondary storage which limits

the use of the undo button


Note: On Baylors system, you cant email

access files to be open using your BU email address for security reasons.

Definitions
Data dictionary document that contains a list of tables that are

designed and maintained for the business Index used to determine how data is organized or sequenced in a table; contains a table of record numbers called pointers which are used to rapidly locate records Key identifier for each record Primary key uniquely identifies each record Foreign key field in one table that also is stored in a different table as a primary key For example: Customer ID # is primary key in Customers table Customer ID # is found multiple times in Orders table and is the foreign key

Example of Primary/Foreign Key


Primary key Customer Table Customer ID First Name Last Name 11005Owen Hawes 11008Melissa Caputo 11014Amir Mehta 11016John Weiss 11027Karen O'Brien 11053Hwan Tang Foreign key Order Number Phone 616-392-0622 269-985-1122 616-396-1972 616-637-7783 517-483-9244 616-396-8401

Order Number Table


Customer ID Order Amount Signing Date 3012 11027 $3 2/18/2009 3015 11005 $1,500 3/1/2009 3027 11008 $1,250 3/10/2009 3032 11014 $6,500 3/18/2009 3033 11005 $1,120 3/18/2009 3050 11016 $1,000 4/1/2009 3060 11005 $4,000 4/4/2009 3062 11053 $20,000 4/8/2009

Definitions
Referential integrity set of rules that ensures that data stored in related tables remain consistent as the data are updated. Also called validation Data redundancy occurs when unnecessary duplicate information exists in database

Access vs. Excel


Choose Access when:
a relational database is required (multiple tables) you have large amounts of data You are relying on external databases You need to maintain constant connectivity to external

databases You have many people working on the database at one time
Choose Excel when:
A flat database is all thats needed (especially if its

mostly numeric) You want to run primarily calculations and statistical comparisons You know that data is less than approximately 15,000

Using a Database
Knowing the purpose and organization of the data is critical to produce accurate and valid results 1. purpose of the table 2. definition or description of each field 3. index of the table 4. field or fields that make up primary key

Access
Views Design and Datasheet Common data types
Memo-used for long messages or descriptions; can

be combinations of numbers or words Text-used for descriptive information Date/Time-used for date and time data Currency-used for monetary data; can be used in calculations Number-used for any number; can be used in calculations
Integer-used for smaller numbers without decimals Long integer-used for larger numbers without decimals Single-used for smaller numbers with decimals Double-used for larger numbers with decimals

Definitions
Query ask questions about the data stored and

returns the records that meet the query criteria


Select - basic Nested - building a query from a query rather than a

table Advanced using several comparison operators to expand the types of criteria Crosstab used for evaluating trends over a period of time by placing data into a 2-dimensional table
Record set (data set) the records that satisfy

the query

Warning!
If you edit or delete a record in the record set of a

query, it will edit or delete the data in the table.

Guidelines for Good Table Design


Include necessary data
Determine what fields you need to create the necessary

reports and set up those fields in the table

Design for the next 100 years


Field size properties

Validation rules

Design in compliance with Sarbanes Oxley Act

(SOX)
Act passed after 2002 accounting scandals at

Enron and World Com

More Guidelines
Design in Compliance with PNPI Regulations
Personal, non-public information like SS #, medical

records, credit card and bank accounts protected by federal law like:
FERPA educational records Gramm-Leach-Bliley financial records HIPPA health information

Store data in smallest parts and set up data types and

properties as accurately as possible Remember that Access stores dates as serial numbers (like Excel) and can perform date arithmetic Field names can have up to 64 characters
CamelCase notation for naming

Guidelines for setting field properties


Naming fields and objects

Assigning field data types (AC 55)


Setting field sizes (number fields AC 56) Access comparison operators (AC 132) Setting the caption property for fields
Specifies how the field name is displayed in

database objects-you can make it more readable than field names which are recommended to have no spaces

Defining a One-to-Many Relationship


Process of relating tables in Access is called a

Join. One-to-Many relationship exists between two tables when


One record in the first table matches zero, one or

many records in the second table And One record in the second table matches at most one record in the first table.
The primary table is the one table and the

secondary table is the many table.

Вам также может понравиться