You are on page 1of 20

Introduction to Computers and

Information Technology

Chapter 9: Database Basics

1
Database

• Database is an organized collection of information.


• Databases make it easy to store, organize and retrieve information.
• Advantages of a Database :
• Enter information.
• Store large amounts of information.
• Find information quickly.
• Organize information in different ways.
• Update information.

• Database is structured in three parts:


1. Tables.
2. Records.
3. Fields.
2
Tables

• Database has one or more tables.


• Each table contains a collection of
related data.
• For example :
• School’s database might contain
separate tables for students,
teachers and staff.

3
Records

• Data in each table is split into smaller units contain related information
about one item.
• Each of these units is called a record.
• For example:
• School’s database each unit of information is about an individual
student or teacher.

Record

4
Fields

• Each separate piece of data that is stored in a


record is called field.
• Each field is set up so that only a certain type
of information (Data Type) is permitted in
that field.
• For example:
• Student’s last name is called a field.
• Data type of student’s last name field is a
text.
5
Data types

• There are several common data types:


• Text– letters (for name and address).
• Number (can be used in calculation).
• Logical ( yes/no true/false).
• Currency (for billing information).
• Date/Time.
• Memo (unlimited amount of text
information).

6
Type of Database Programs

• Database management system (DBMS) : is software used to manage the


storage, organization, processing, and retrieval of data in a database.
• There are several kinds of database management programs :
1. Flat-File databases.
• Allow you to work with data in only one table.
2. Relational database.
• Use data from several tables at the same time.
• This is because the tables are linked by a key filed.

7
Browsing Data

• One way to find data is to browse or look through all the records.
• Database can display data like a spread sheet.
• Each record occupying a row and each field in a column.
• Many database programs provide tools such as scroll bars and navigation
buttons that help users browse quickly through records.

Scroll bar

navigation buttons Scroll bar 8


Sorting Data

• A way to save time is sort the data. Sorting lets you locate information
quickly.
• Types of Sorting:
• Alphabetical sorting of letters and symbols. A A

Descending
Ascending
• Numerical sorting of number and values.
• Chronological sorting of dates and times.
• Data ca be sorted in: Z Z
• Ascending order ( A,B,C or 1,2,3).
• Descending order (C,B,A or 3,2,1).

9
Using Forms

• Form is a window that makes it easier for users to view, enter and edit data.
• Database form lets you work with the data in single record.

10
Querying Data
• A query is a user-created direction that tells the database to find and
display specific records.
• Example :
• Query to show all students living in Jeddah city.

11
Using Reports

• Report is an ordered list of selected records and fields in an easy-to-read


format.
• Can display data in columns or single records.

12
Activity

Create a database about landforms that


glaciers make as they move. You need to
create a table for the information and use a
form for entering records. Also, you need to
create a report to present the data.

13
Create a Database

1. Start MS-Access program and create a new blank database file.

14
Create a Database

2. Save it as (DB-1_Glacial) > Create.

15
Create a Table

3. Create a new table named (tbGlacial Landforms).

16
Create table fields

4. Add the following two fields to the table:


Field Name Data Field
Type Size
Landform Text 50
Description Text 250

5. Do not specify a primary key.


6. Save and close the table.

17
Create a Form

7. Create a form based on tbGlacial Landforms.


8. Save the form as (frmGlacial Landforms).

18
Add data to the table

9. Add the following data to table using the frmGlacial Landforms.


Landform Description
Arete a sharp mountain ridge
Cirque A cirque may also be a similarly shaped landform arising from fluvial erosion
are elongated, teardrop-shaped hills of rock, sand, and gravel that formed under
Drumlin
moving glacier ice

19
Create a report

10. Create a tabular report


based on the table (tbGlacial
Landforms) including all fields.
11. Name the report (rpGlacial
Landforms).
12. Preview the report and
adjust the page layout and
design as necessary.
13. Close the database file and
exit the database program. 20

You might also like