Database Slides
Database Slides
MANAGEMENT
An Introduction
Lecture objective:
•DATA
- raw facts, text, graphics,
images, sound, video segments
•DATABASE
• A collection of related data organized in a
way that facilitates data searches.
Definition of terms:
INFORMATION
-Processed data that is useful in
decision making.
METADATA
-Data that describes data
Summarized data :
Program-Data Dependence
–All programs maintain metadata for each file they
use
Data Redundancy (Duplication of data)
–Different systems/programs have separate copies of
the same data
Limited Data Sharing
–No centralized control of data
Lengthy Development Times
–Programmers must design their own file formats
Excessive Program Maintenance
–80% of information systems budget
Three file processing systems at
Pine Valley Furniture
Duplicate Data
THE DATABASE APPROACH
Database Management System
•software application which allows you
to create, store, organize, and retrieve
data from a single database or many
databases.
Application
#1
Application
#2
DBMS Database
containing
centralized
shared data
Application
#3 DBMS manages data
resources like an operating
system manages hardware
resources
ADVANTAGES OF DATABASE APPROACH
Program-Data Independence
•Metadata stored in DBMS, so applications don’t
need to worry about data formats
•Data queries/updates managed by DBMS so
programs don’t need to process data access
routines
•Results in: increased application development and
maintenance productivity
•Fields
•individual pieces of information
•Record
•collection of related fields within one entity
SAMPLE DATA TABLE
PersonalInfoTABLE
KEY DATABASE ISSUES AND ACTIVITIES
•Data Entry
•process of adding information into a
database
•possible methods of data entry:
•Data Entry Professional, Electronic
Files, Historical Records, or Web Based
(Forms)
QUERYING DATA
•Querying:
•how we get information from a database
•Report
•A compilation of data from the
database that is organized and
produced in a printed format.
•Typically produced on paper, but
also can be displayed on-screen.
Creating Database Reports
•Report:
•Example: Quarterly Sales Report
DATA STRUCTURE
•Database has two parts:
• Data
• Data Structure: how the data is organized.
•Data Model
• representation of entities and their relationships
to the real world
•Primary Key
• a unique identifier in the database
• one or more fields
Data Structure continued….
•Data Dictionary:
•a document (often published online)
prepared by the database designers to
aid users in data entry.
Data Dictionary Example:
Students Table
30
MICROSOFT ACCESS
31
STARTING MICROSOFT ACCESS
32
STARTING MICROSOFT
ACCESS
1. Search
2. Type ACCESS / or click
33
DATABASE WINDOW
34
CREATING DATABASE
1. Type Database Filename [StudentInfoDatabase]
Filename
37
CREATING TABLES
38
CREATING DATABASE
3. Type the relevant Fields
Field Name
39
CREATING DATABASE
3. Type at least 5 records in the
Datasheet View
Datasheet
View
40
CREATING TABLES
42
TABLE DATASHEET VIEW
43
DATABASE WINDOW
The Database Window organizes all of the
objects in the database. The default tables
listing provides links for creating tables and
will list all of the tables in the database when
they have been added.
44
PARTS OF THE MS ACCESS
WINDOW
Database Window Menu bar – Located
directly under the title bar. Contains different
menu pads such as the file, edit, View, Insert,
Tools, Window, and Help where options appear.
These options are available at is customized and
on the type of mode is currently in.
45
PARTS OF THE MS ACCESS
WINDOW
46
PARTS OF THE MS ACCESS
WINDOW
47
DIFFERENT DATABASE OBJECTS
OBJECT
48
DIFFERENT DATABASE OBJECTS
Table - storage of data about a
particular subject.
49
DIFFERENT DATABASE OBJECTS
50
DIFFERENT WAYS DESCRIPTION
TO CREATE TABLE
51
Table Template
52
TABLE DESIGN VIEW
Design View customizes the
fields in the database so that
data can be entered.
53
TABLE DESIGN VIEW PARTS
Field Name
- variables that represents data up to 255
characters including spaces.
Data Type
- kinds of data to be stored in a field
Ex. Text, Number, Date/Time
Field Description
- a remarks that will help to describe the
field name.
54
Field Properties
- use to customized how a field’s
data is stored, handled, or displayed.
55
DATA TYPES
Text
- can store numbers, letters, symbols,
and special characters.
- a text field can contain up to 255 char.
Example:
names
address
course
position
56
DATA TYPES
Memo
- contains the same type of
information as text fields, but can be as
many as 32, 000 character long.
Example:
Reminder
Notes
Job Description
57
DATA TYPES
Number
- numeric data
- perform calculation (computation )
Example:
Employee Number
Transaction Number
Invoice number
Item Code
58
DATA TYPES
Date/Time
- can contains any valid date or
time for the year 100 through
9999.
Example:
Birthdate
Date Hired
Delivery Date
59
DATA TYPES
Currency
- contains number only. Number
are automatically preceded by a
currency symbol (₱).
Currency fields are similar to number fields but
provide greater accuracy for performing
calculations.
EXAMPLES:
Salary
Total Amount Due
Rental Rate 60
DATA TYPES
AUTONUMBER
- contains numbers, which
automatically increase when a new
record is added to a table.
Example:
Transaction Number
61
DATA TYPES
Yes/No
- contains only yes/no,
true/false, or on/off values.
Example:
Regular
Graduating
62
DATA TYPES
OLE Objects
- contains object linking and
embedding objects, such as graphics,
created in other windows applications.
Example:
Employee Picture
Product Image
63
RENAMING COLUMN
To rename them with more descriptive titles
that reflect the content of the fields, select
Format|Rename Column from the menu bar
or highlight the column, right-click on it with the
mouse, and select Rename Column from the
shortcut menu.
SAVING TABLE
Enter data into the cells and click the Save
button. You will be prompted to add a
primary key field.
64
RESIZING COLUMN and ROW
65
FREEZING COLUMNS
Similar to freezing panes in Excel, columns on
an Access table can be frozen. This is helpful if
the datasheet has many columns and relevant
data would otherwise not appear on the screen
at the same time. Freeze a column by placing
the cursor in any record in the column and
select Format|Freeze Columns from the
menu bar. Select the same option to unfreeze a
single column or select Format|Unfreeze All
Columns.
66
ADD NEW RECORDS
67
VIEW RECORDS
69
DELETE RECORDS
70
Database Management
71
FIELD PROPERTIES
72
FIELD PROPERTIES
\ adds characters to
@\! Hello Hello!
the end
@;"No Data
Hello Hello
Entered"
@;"No Data
(blank) No Data Entered
Entered"
77
FIELD PROPERTIES
78
FIELD PROPERTIES
Byte
0 to 255 ( no fraction )
Integer
-32,768 to 32,767 ( no fraction )
Long Integer
-2,147,483,648 to 2,147,483,647 ( no fraction )
79
FIELD PROPERTIES
Single
store number with six digits of precision
-3.402823E38 to 3.402823E38
Double
store number with ten digits of precision
-1.79769313486232E308 to
1.79769313486232E308
80
FIELD PROPERTIES
81
VALIDATION RULE AND TEXT
Validation rules specify requirements for
field data entry and prevent the entry of
invalid data.
82
VALIDATION RULE AND TEXT
You can use the ValidationRule property to
specify requirements for data entered into a
record, field, or control.
84
VALIDATION RULE AND TEXT
You can set the ValidationRule and
ValidationText properties by using:
86
VALIDATION RULE AND TEXT
87
VALIDATION RULE AND TEXT
ValidationRule property ValidationText property
88