0% found this document useful (0 votes)
12 views4 pages

Database Notes

The document provides an overview of databases, specifically focusing on Microsoft Access, explaining key concepts such as fields, records, tables, and keys. It outlines the structure of a database, the importance of unique identifiers like primary keys, and the principles of database design. Additionally, it describes various database objects and their functions, as well as the planning required for creating tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Database Notes

The document provides an overview of databases, specifically focusing on Microsoft Access, explaining key concepts such as fields, records, tables, and keys. It outlines the structure of a database, the importance of unique identifiers like primary keys, and the principles of database design. Additionally, it describes various database objects and their functions, as well as the planning required for creating tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

INFORMATION TECHNOLOGY

DATABASE (MICROSOFT ACCESS)

DATABASE
A field stores a single piece of information,
A database is a large collection of data in a also called an attribute.
computer file. The data is held in a  In a typical database table, a field is
structured form so it is easy to find the shown as a single column of the table.
information you need.  Every field has a name. The field
appears at the top of the column.
A database is typically made up of one or  Every field has a size. This shows
more tables. how much information can be stored
in that field.
TABLE  Every field has a data type.

A table is made up of rows and columns. KEY FIELDS


The rows of the table are database records.
Each record stores all the information about Every record in the database must have an
a particular item or person (called an entity). attribute that is unique. That is so you can
An entity is anything you want to store tell that record apart from all the other
information about. records in the database. This field is called
the primary key.
The columns of the table are database fields.
Each field stores a single item of The primary key is often a code number
information (called an attribute). An entity which identifies each entity in the database.
has attributes. These are the facts you know In a school, students might have a code
about the entity. Use the term attribute number which appears on a school id that
when referring to facts about the entity. they have.

RECORD REASONS DATABASES ARE USEFUL

A record stores all the information about a Standardization


single entity. Here are some key facts about
records: Every record in a database has the same
 In a typical database table a record is structure. This means the database user
shown as a single row of the table. knows what information is held, and in what
 Every record in a table has the same form.
fields in the same order.
 A record is sometimes called a tuple. Fast retrieval

FIELD
The way the information is organized makes school might have more than one student
it easy for the computer to find items of data with the same name. For this reason it is
in the database. necessary to have a key field which is
Large size different for every record in the database.

You can store thousands of records in a Primary key


database, and still find the ones you want. Most database tables include primary key
field which stores a unique value. The
Multiple views primary key is often a code number which
identifies each entity in the database. In a
You can produce many different useful school, students might have a student
outputs from a database, in different orders, number which appears on a school card that
with different records or fields. they carry. The primary key is usually the
first field in the table.
AD HOC QUERY
Alternate key
This is a latin phrase that literally means ‘for If there are other fields as well as the
this’. It is used nowadays to mean ‘for just primary key field which could be used for
this once’ or ‘one time only’. In database the same purpose, those are called alternate
work an ad hoc query is a new unplanned key fields.
query, that might only be asked once.
Composite key
Sometimes a database designer decides to do
DATABASE DESIGN PRINCIPLES without a primary key and uses a composite
key instead. A composite key is made by
Database design must take into account a taking values from more than one field to
number of principles, for example: find a unique way of identifying each
 There must be a way to identify every record.
record in the database, so that the user
can find information. Candidate key
 Data must be stored in a standard way Together, all these keys: primary keys,
throughout the database. composite keys and alternate keys of the
 Each item of data should be stored database are called candidate keys. They are
once only. all possible ways of identifying the records
in the database.
To help identify and find every record in the
database, a key is used.

USE OF IDENTIFYING KEYS Secondary key


As well as the candidate keys, a database
There must be some way to distinguish each designer might define a secondary key. This
record from all the other records in the is a field that is not necessarily unique for
database. Fields such as Name or Date of each record in the database, but is very
birth are not always unique. For example a useful when you need to find a record. It
might be used to sort or reorder the
database.

Foreign key
Foreign keys are keys that are used to link
together different tables in a relational
database

OBJECT DESCRIPTION
A collection of related data
Table about a subject (person, place or
thing)
A method used to enter, view or
Form print the information in a table
other than as rows and columns
A means of storing and
Query answering questions about
information in a database
A customized printout or hard
Report copy of the information in a
table or in the response to a
query
A series of instructions that can
Macro be saved and used over and over
again
Programs written in Visual
Modules Basic to customize and further
automate your database

CREATING TABLES
Database Objects and their
meanings TABLE STRUCTURES

Before you create a table in your database, it


would be wise for you to plan what you
want it to contain. You need to think about
the field names, field types and field sizes.
Such a plan is called the table structure. For
example, if you want to create a table called
Personal Details that stores the name,
address, date of birth, age, gender, average
mark, passed and fees rate of students, you
might create a table structure like the one
below.

FIELD FIELD FIELD


NAME TYPE SIZE
First Text 20
Name
Last Text 20
Name
Date Of Date/Time Pre-Set
Birth Field Size
Age Number Long
Integer
Gender Text 10
Average Number Long
Mark Integer
Passed Yes/No Pre-Set
Field Size
Fees Rate Currency Pre-Set
Field Size

Notice that you have to split the name into


First and Last name fields. That is because
you want to sort the records on last name
only, which would not be possible if the
whole name is stored as one field. Fields
like date of birth, passed, fees rate and
currency do not need a field size as their
field sizes are pre-set.

You might also like