28
5/31/2017 1 Lesson - 1 www.semainformatics.wordpress.com What is a database? A database is any collection of data that is organized for quick retrieval. Databases can be computer based or paper based

What is a database? - WordPress.com · organized fashion for previewing on the screen or as hard-copy printouts. Reports vs. Forms Reports and forms are used to give people easy access

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

5/31/2017

1

Lesson - 1

www.semainformatics.wordpress.com

What is a database? A database is any

collection of data that is organized for quick retrieval.

Databases can be computer based or paper based

5/31/2017

2

Examples of Databases Computer Based

Databases

Bank databases

School databases

Business databases

Paper Based Databases

Telephone book

Address book

Index of a book

Paper Based

Computer Based

Types of Computer Based Databases There are two main types of

databases:

Flat Database

Relational Database

5/31/2017

3

Flat Database Is a simple database model, where all the

information is stored in a plain text file, one database record per line.

Relational Database All information in the

database is stored in related tables each consisting of rows and columns.

The tables can be linked to each other in the database by the use of values common to more than one table.

5/31/2017

4

Relational Database

What is MS Access 2010? Access is a powerful database

management program that can be used for:

storing,

organizing,

retrieving, and

reporting (summarize and print) information.

5/31/2017

5

What can we do with a database? Find the related data

Analyze, manage, manipulate and retrieve the data

Display the information as a chart, graph or Web page

Print or publish uses friendly reports

Automate auto repetitive tasks

Export the data to other programs such as MS Excel and MS Word, and

Protect the data from errors

Access or Excel? An Excel spreadsheet is a good choice to do calculations,

analysis such and graphing.

But Excel is relatively poor at handling lots of different sets of related data.

An Access database is used for storing lots of data in a format that can be searched and summarized on reports.

It is ideal for setting up and managing sets of related data, but is relatively poor at the mathematical analysis whereas Excel is good at.

5/31/2017

6

Microsoft Access Database Objects

A database usually consists of several objects.

An Access database might contain up to seven different database object types.

Microsoft Access Database Objects

Tables

Queries

Forms

Reports

Pages

Macros

Modules

5/31/2017

7

Tables Tables store a

database’s data in rows (records) and columns (fields).

A database must always contain at least one table where it can store the information.

Tables

In a database table:

Rows are called Records

Columns are called Fields

5/31/2017

8

Queries

Queries ask a question of data stored in a table.

Forms

Forms are custom screen that provide an easy way to enter, view and modify the data in a table or query.

5/31/2017

9

Reports Reports present

data from a table or query in a printed format

Pages A special type of Web

pages designed for viewing and working with Access data from an Intranet or Internet.

It is the only external object of a MS Access Database.

5/31/2017

10

Macros Macros help us to

perform routine tasks by automating them in a single command.

Modules

Are like Macros, modules automate tasks but by using a built-in programming language called Visual Basic for Applications or VBA.

They are much more powerful and complex than macros.

5/31/2017

11

Class Work - 1 Create a simple school database with one table. The

table is going to contain students’ personal information, like:

Student_ID

Student_Name,

Student_Surname

BirthDate

BirthPlace

PhoneNumber

Student_Email

Student_Address

Lesson - 2

5/31/2017

12

Creating and Modifying

Tables

Tables form the essential foundation of a

relational database and the development of a

database begins with building the tables to

store the distributed data.

A table in a database is divided in Records

(Rows) and Fields (Columns).

Table Views There are four different

views of tables:

Datasheet View

PivotTable View

PivotChart View

Design View

5/31/2017

13

Datasheet View

It is similar to Excel worksheet view.

Rows in datasheet view are called Records.

Columns are called Fields.

Design View of a able

Is used to define

Names,

Properties and

Descriptions

of fields.

5/31/2017

14

Primary Key Primary key is the unique identifier of a table.

Primary key is used to prevent duplicates of

records.

Data Types in Table

Design View

Text

Memo

Number

Currency

AutoNumber

Date/ Time

Yes/No

Ole object

Hyperlink

5/31/2017

15

Data Types in Table Design

View

Text:

Used to store any text or number that does not require

calculations up to 255 characters in length.

Memo:

Used to store paragraphs, sentences or large block of text

up to 65535 characters in length.

Number:

Used to store various kinds of numbers that are used in

calculations.

Data Types in Table

Design View

Currency:

Is used to store currency values.

AutoNumber:

Unique sequential or random values generated

for use as primary key.

Date/ Time:

Used to store dates and times.

5/31/2017

16

Data Types in Table Design

View Yes/No:

Used to store two-valued data. Yes or No appears as

checkbox in a table.

Ole object:

Used to get data from Windows based applications such us

images, graphs and movies clips.

Hyperlink:

Used to link a document, a file on our computer or an

internet resource.

Example

5/31/2017

17

Lesson - 3

What is a Form?

Forms are used to view, enter, edit, and modify data quickly and easily in tables directly or through a query.

5/31/2017

18

Record navigation buttons

Making a Form in MS Access There are several ways to create a form in MS Access:

5/31/2017

19

Form Views

Lesson - 3

5/31/2017

20

What is a Query? Queries are database objects used to extract, gather

and select required data from database.

We can use queries even to perform calculations on data or to update or delete records.

Query Types

5/31/2017

21

Query Types

Creating a Query

On the Create tab, from Queries Group click the Query Wizard button

5/31/2017

22

Query Views and Run Button To change the Query

View click: Home / Views/ View

Main Query Views are:

Datasheet View

SQL View

Design View

To display results of a query click:

Design / Results / Run Button

Lesson - 4

5/31/2017

23

What is a Report? Reports display selected

and required information in an organized fashion for previewing on the screen or as hard-copy printouts.

Reports vs. Forms Reports and forms are used to give people

easy access to the information stored in the tables in a database.

However, reports and forms have different aims for use:

5/31/2017

24

Reports vs. Forms Forms Reports

Forms are used to enter, view, delete, and edit information.

Forms are usually used to display information on the screen.

Forms generally provide information for the people who actually work with the database.

Reports are used only to view information.

Reports are usually designed for printing needs.

Reports are often used to group and summarize data and are often for people who do not work with the database, but who use its information for other business tasks.

The Anatomy of a Report Reports are made up of

many parts and sections.

A report usually has the following three sections:

Page Header section

Detail section

Page Footer section

5/31/2017

25

Page Header Section Page header appears at the

top of each page of the report.

The Page Header section automatically prints at the top of every page of the report.

You can use this section for column headings, page title, or some common information for all records on the page.

Detail Section The Detail section is the

main section of the report.

It is used to show the details of each record from the table or query.

5/31/2017

26

Page Footer Section The Page Footer section

automatically prints at the bottom of every page of the report.

The footer is used to specify information that you want to appear at the bottom of each report page, such as page numbers, dates, or copyright notification.

The Anatomy of a Report In addition to these

three sections, a report can also include:

Report Header section

Report Footer section

Group Headers section

Group Footers section

5/31/2017

27

Report Header Section The header appears and

prints once at the beginning of a report.

The report header is often used to show the Report title or make a cover page for a report.

Report Footer Section This appears and prints

once at the end of a report.

The most common use of the report footer is for grand totals, but it can also include any other information for a report.

5/31/2017

28

Making Reports

There are several ways to create a report in MS access:

Report Creates a simple report automatically based on currently

selected table or query.

Report Design Creates a new blank report in the design view to design a report

from scratch.

Blank Report Create a blank report in layout view but lets you layout the

report controls.

Report Wizard Creates a report based on some steps.

Report Views To change the Report

View click: Home / Views/ View

Report Views are:

Report View

Print Preview

Layout View

Design View