Access Notes and Activity
Access Notes and Activity
❖ Database – A collection of related tables. It can also include other objects, such as
queries, forms and reports. The structure of a database is the relationships between its tables.
❖ Field – this a single piece of information. It is an area (within a record reserved for a
specific piece of data. Examples: customer number, street address, city, current balance etc.
❖ Record – A collection of values for all the fields pertaining to one entity: i.e., anything
that data will be collected on e.g. person, product, company, transaction etc.
❖ Table/File – A collection of related records. E.g. employee table, product table, customer
table, student table, flight table etc. In a table, records are represented by rows and fields are
represented as columns. In a relational database a table may be referred to as a relation and a
row may be referred to as a tuple.
❖ Entity – a person, place or thing on which data will be collected e.g. student, lecturer,
product, store.
Types of Keys
Primary Key:
➢ The attribute or combination of attributes that uniquely identifies a
row or record in a relation is known as primary key.
➢ Single key that is unique and not-null.
➢ The field in a database that is the primary "search key" used to locate records.
Foreign Key:
➢ A foreign key is an attribute or combination of attribute in a
relation whose value matches a primary key in another relation. In
other words, it is a key stored in one table which refers to data in
a different table. It is used to establish a relationship between two
tables.
Secondary key:
➢ This key is alternatively referred to as an alternate key. Secondary
is an additional key, or alternate key, which can be use in addition
to the primary key to locate specific data.
➢ Secondary key is a non-unique field. One secondary key value
may refer to many records.
Access stores the numeric value zero (0) for false and -1 for
true.
formulas/functions.
• What data will you use? This will help with your field names
so on).
• You group meaningful data together so that your table will have a
• How will your tables be linked together? You need a primary key in
• What data types will your data have (alphanumeric?, numeric?, date?, logical?)
• To add a field, click on the cell to the left of the Field Name to
highlight where you want to insert your row.
• Then, Click on Insert Rows, to add a row where you have
selected.
2. Deleting Fields from a Database Table
• Similar to adding a row, you select the row that you want to delete
and then click the Delete Rows icon to remove the row.
Data types can be modified
▪ Right click on the table you want to delete and choose Delete from
the drop down menu
Renaming a Table
▪ Right click on the table you wish to rename and choose Rename
▪ Type in the new name
• Click on view and select design view and change the field name that
you would like to change. OR
• Double-Click (left side of mouse) on the field name that you want
to change, and make the necessary changes.
What is a Query?
1. Access 2007: Click create, from the ribbon, and choose Query
Design (near to the right hand side of the ribbon)
References
Class Activity
1. Create a database consisting of three tables. One table should contain
information about students’ personal data, the second table should hold
students’ subject information and the third table should hold teacher
information. Each table should have a valid field name, and a corresponding
data type. Once all tables have been created, you should rename each table
using their respective names.
between tables.
within a database. -