cpsc 203 introduction to computers tutorial 03 & 29 by jie (jeff) gao

8
CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

Upload: emil-stewart

Post on 02-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

CPSC 203Introduction to Computers

Tutorial 03 & 29

By Jie (Jeff) Gao

Page 2: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 2

Database Concept

• A collection of information related to a particular subject or purpose

• Database structure:

– Database• Tables

– Fields

• Fields have data types– Should be explicitly defined, not like

Excel

Page 3: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 3

Records

• Information in databases are stored as records– A “row” in a table– Containing values for each field– Databases store records without

considering their orders– The unit of many operations

Page 4: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 4

DBMS

• Database Management System

• Microsoft Access is a DBMS in Office

Page 5: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 5

Access – Introduction

• A component in Office• You need to save an Access

database first (unlike other Office documents)

• Objects in an Access database– Tables– Forms– Queries– Reports– …

Page 6: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 6

ATTENTION – WebDisk and Access

• DO NOT open an Access database directly from WebDisk– Otherwise you will probably lose your

data– Once this happens, you have no way

to get data back. No kidding!

• ALWAYS copy Access databases from WebDisk to the Desktop or “My Documents”, then open it– Remember to copy the updated

database back to the WebDisk

Page 7: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 7

Access – Creating Tables

• Use the table design view to define tables

• Give names to each field, and define data types for them

• Field options– Required / Index / Size / …

• Primary Key– The unique identifier for a record

• Save and give a table name

Page 8: CPSC 203 Introduction to Computers Tutorial 03 & 29 By Jie (Jeff) Gao

12 & 13 October 2004 CPSC 203 Tutorials by Jie Gao 8

Access – Relationships

• Relationships help keep the data consistent

• Different types of relationships– One-to-One– One-to-Many– Many-to-Many

• Creating a relationship– Menu Tools Relationships