KEMENTERIAN PELAJARAN MALAYSIA

Lawati portal Kementerian Pelajaran Malaysia di www.moe.gov.my

JABATAN PELAJARAN JOHOR

Layari portal Jabatan Pelajaran Negeri Johor di www.moe.gov.my/jpnjohor

PEJABAT PELAJARAN DAERAH KULAIJAYA

Lawati Laman Web Rasmi Pejabat Pelajaran Daerah Kulaijaya di kulaijaya.net

Laman Web UPSI

Kami Komited Membawa Prubahan Dalam Pendidikan www.upsi.edu.my/en

Monday, 2 July 2012

DATABASE OBJECT-REPORT


A Report summarises information from the database.
A Report is a database object that presents selected information from Tables or Queries, for printing purposes.
When designing a Report, consider the point you are making, the audience and the level of information they needed.
Reports can be created based on the Table or Query.



You can create new Queries using one of the methods.
  • Create report in Design View.
  • Create report by using wizard.

DATABASE OBJECT-FORM



A Form is a database object that allows users to add, modify and view information.

Form can be created based on the Table or Query.




 
A Form is an organised and formatted view of selected fields from selected Tables or Queries.

By using Table, you need to scroll down to fill in the new data. This data entry process will take time.

DATABASE OBJECTS : QUERY

DEFINE THE QUERY

A Query is database object that retrieves specific information from a database.
For example, you can retrieve a student’s name and address from the database.


With Access Queries, you can do the following :
  • View specific data from Table.
  • Perform calculations on selected records.
  • Delete record from a table.

You can create new Queries using one of the methods.
  • Create query in Design View.
  • Create query by using wizard.

CREATING A RELATIONSHIP

You need to create the relationship between Tables before you can create Queries.




RELATIONSHIP BETWEEN PRIMARY KEY AND FOREIGN KEY

RELATIONSHIP BETWEEN TWO TABLES

Connections between fields of related tables having common values are called relationships.


A relationship works by matching data in key fields, usually a field with the same name in both tables.
These matching fields are the primary key from one table and a foreign key in the other table.

IMPORTANCE OF THE RELATIONSHIP BETWEEN PRIMARY KEY AND FOREIGN KEY

The primary key of one table becomes a foreign key of the other table.
By matching a foreign key with a primary key, the data does not need to be entered repeatedly.
A primary key makes creating Queries, Forms and Reports easier.
A primary key improves data performance by relating smaller tables into meaningful databases.

PRIMARY KEY AND FOREIGN KEY

DEFINE THE PRIMARY KEY
A primary key is the field that uniquely represents each record in a table. These keys must not have null values. Meaning, you must not leave these
keys blank.Each table in the database must have at least one primary key.
There is also another name for a primary key: the unique identifier.
In the student table, student name might not be a good primary key. For example there are two Sulaiman bin Yahya in this school.


DEFINE FOREIGN KEY

A foreign key is the field that matches the primary key in another table. It contains the same data as those of the primary key in the other table.
Foreign key fields are linked to fields in other tables. While a primary key must have unique values, a foreign key may have duplicate values.


THE IMPORTANCE OF THE PRIMARY KEY

A primary key ensures data integrity by uniquely identifying each record.
It helps to avoid duplicating records.
It prevents null values being entered in the unique field.

DIFFERENTIATE BETWEEN THE PRIMARY KEY AND FOREIGN KEY

A foreign key links to a primary key in another table.
While primary keys must have unique values, foreign keys may have duplicate values. These are the differences between the primary key and foreign key.