– Programming Concepts – Databases
Tutorial 2 –
Maintaining a Database
Guidelines for Designing a Database – Pg. 2.02
useful tool, but only if they are carefully designed so to fit the needs of
rules to building a DB:
related fields into tables
the primary key
A Composite Key is a primary key
where several fields are used together as the PK
common field with the Tables – Pg.
Redundancy (Normalization/Normalized Data)
the properties of each Field – PG. 2.04
Properties are characteristics of
each field like the name, size, description, valid values, etc.
Guidelines for Designing Access Tables
Naming Fields and Objects.
assign a data type to a field
type determines what types of information the field will store
list the 9 types of data which Access Supports
Field Size – Pg. 2.05
maximum storage size for text, numbers, and auto numbers only.
processes smaller data sizes faster, and they require less memory/disk
storage space so you can optimize your DB performance by using data which is
"just big enough" – Pg. 2.06
Sizes listed on Pg. 2.06
Creating a Table
Defining Fields – Pg. 2.08
Text – Size 3 – PK
as Text – Size 3 – FK
as Data – Format mm/dd/yyyy – Date Format Options listed on Pg. 2.12
Specifying the Primary Key – Pg. 2.14
not require a PK
have a PK however, some reasons why listed on Pg. 2.14 – 2.15
response to queries based upon the PK – also referred to as indexing – Pg.
Saving the Table Structure – Pg. 2.16
add to the table – Pg. 2.17
Saving the DB – Pg. 2.20
allows you to modify your table’s structure in Design View – Pg. 2.21
Deleting a Field –
Moving a Field – Pg. 2.22
Adding a Field – Pg. 2.23
To add a field between two existing fields, you must insert a new row.
To insert a row, select the row below where you would like to add the new
row, right click, and select Insert Row
Changing Field Properties – Pg. 2.24
Copying records from another database/table – Pg.
You can copy
and past records from other tables, even in other DBs
But only if
they have the same “structure” – i.e. same fields (names), of same
size, in the same order
Using the Windows and Office Clipboards – Pg.
Deleting Records – Pg. 2.30
Changing Records – Pg. 2.31