10

Click here to load reader

CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Embed Size (px)

Citation preview

Page 1: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

CPSC 203CPSC 203Introduction to ComputersIntroduction to Computers

Lab 60Lab 60

By Jie GaoBy Jie Gao

Page 2: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Introduction to DatabaseIntroduction to Database

What is a database?What is a database? A database is a collection of information A database is a collection of information

related to a particular subject or purpose.related to a particular subject or purpose.

Why database?Why database? Keep consistent information altogetherKeep consistent information altogether Easy to manage and find useful informationEasy to manage and find useful information Easy to manage related informationEasy to manage related information

Page 3: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

An ExampleAn Example

IDID F. NameF. Name L. NameL. Name ProgramProgram Start DateStart Date

232398232398 AndyAndy ChuChu CPSCCPSC 01/09/0001/09/00

134764134764 JieJie GaoGao CPSCCPSC 01/09/0201/09/02

324509324509 PeterPeter SmithSmith MATHMATH 01/01/0201/01/02

254389254389 JohnJohn SmithSmith CHEMCHEM 01/05/0101/05/01

342532342532 BillBill LeeLee CPSCCPSC 01/01/0301/01/03

112543112543 HelenHelen JamesJames MATHMATH 01/07/0001/07/00

Page 4: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Terminology (1)Terminology (1)Field

Record

Table

IDID F. NameF. Name L. NameL. Name ProgramProgram Start DateStart Date

232398232398 AndyAndy ChuChu CPSCCPSC 01/09/0001/09/00

134764134764 JieJie GaoGao CPSCCPSC 01/09/0201/09/02

324509324509 PeterPeter SmithSmith MATHMATH 01/01/0201/01/02

254389254389 JohnJohn SmithSmith CHEMCHEM 01/05/0101/05/01

342532342532 BillBill LeeLee CPSCCPSC 01/01/0301/01/03

112543112543 HelenHelen JamesJames MATHMATH 01/07/0001/07/00

Page 5: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Terminology (2)Terminology (2) DBMSDBMS

Database Management SystemDatabase Management System Database Objects in AccessDatabase Objects in Access

TableTable QueryQuery FormForm ReportReport PagesPages…………

Page 6: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Plan for LabsPlan for Labs

This labThis lab Basic operation in Access: create table, alter Basic operation in Access: create table, alter

table, input data, append or insert data, sort table, input data, append or insert data, sort records, …records, …

Following labsFollowing labs Advanced operation in Access: forms, Advanced operation in Access: forms,

queries, filters, …queries, filters, … Assignment requirementsAssignment requirements

Page 7: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Creating A TableCreating A Table

Design table structureDesign table structure Add fieldsAdd fields Select data type for fieldsSelect data type for fields Set input mask for fieldsSet input mask for fields

Set primary keySet primary key Give the table a nameGive the table a name

Page 8: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Alter A TableAlter A Table

Change in design viewChange in design view Everything could be changedEverything could be changed

If delete a field, the data in that field will be If delete a field, the data in that field will be deleteddeleted

Page 9: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

Edit DataEdit Data

Input data in datasheet viewInput data in datasheet view The format should conform to the maskThe format should conform to the mask Move insert point among records using the Move insert point among records using the

navigator at the bottom of the datasheet navigator at the bottom of the datasheet viewview

Page 10: CPSC 203 Introduction to Computers Lab 60 By Jie Gao

Feb 24, 2003Feb 24, 2003 CPSC 203 by Jie GaoCPSC 203 by Jie Gao

A Little More WorkA Little More Work

SortSort By a fieldBy a field Ascending or descendingAscending or descending

Simple querySimple query Filter out the data we need according to our Filter out the data we need according to our

criteria criteria