Wednesday, October 22, 2014

Database Notes Part 1

A database is a collection of related data about a particular subject stored together. There are two forms of database: Manual Database and Computerized Database. For our purpose, we focus on Computerized Database, and particularly on relational database being Microsoft Access.
There are two types of database:
1. Flat File - one dimensional database containing/storing simple lists. An example is an electronic address book.
2. Relational Database - RDBMS. An example is Microsoft Access; relational meaning that more than one table may be used for storing data. The tables are linked by relationships in a manner to facilitate easy access of information.

Hierarchy of Database Production

A table is a collection of related data about a specific subject.
A field is column in a table that contains a category of information. Insertion of fields is done in design view.
Formatting of data types is done while creating fields. There are four common data types used: text, number, currency and date/time.
A record is a group of related fields pertaining to one subject; it is a row of data in a table. Inputting of records is done in data sheet view.
Microsoft Access uses objects. An object is a sub program that manages one aspect of the database. There are four objects used in Access: Form, Table, Query and Report.
Forms are used for input of information.
Tables are used for storage.
Queries are used for processing of information.
Reports are used for output.
While Forms are the first object listed, for our purposes, we will focus on creating Tables in design view. We create them in this view in order to customize them to our needs.
STORAGE - After creating your database, tables are created to store information. Within tables, fields are formatted and records are inputted. Field properties are formatted from the general tab on the lower left hand of your screen when in design view.
Field Properties:
  • Field size - the default field size for a text field is 50 and cannot exceed 255.
  • Format - changes the way data is displayed; not stored to create custom formats.
  • Input Mask - used to insert special characters in a field.
  • Validation Rule - ensures that a number being entered is withing the specified range. Validation text is a message that appears when the validation rule is violated.
  • Required - Yes or No
  • Primary Key - a field that uniquely identifies each record in a table; speeds up operations such as data retrieval, sorting and the running of queries. Primary key allows users to establish relationships between tables so that they can be joined.
After creating and formatting fields in design view, switch to data sheet view by clicking on the icon that resembles a table on the tool bar. At this point, you will be asked to save your table and to select a primary key. Records can now be entered.
Many tables can be created and stored in one database; sometimes the data is stored in more than one table and therefore, the tables can be linked by forming a relationship.
We will stop at this point and continue in Part Two.

1 comment: