Module2 Database Management Systems
Module2 Database Management Systems
Unit 2
Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
Introduction
Sample Introduction MAAM ARlen
Learning Objectives
Define the different terminologies in Data Manipulation Using
Database Management System Graphical User
Relate the different terms and basic concept in Unit 1 when it comes to
Graphical User Interface
Identifying the rules in giving Data Names and definitions
Differentiate the different classifications of attributes
1._______________________________________________________
_______________________________________________________
2._______________________________________________________
_______________________________________________________
3._______________________________________________________
_______________________________________________________
1
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
Presentation of Contents
TERMINOLOGY
Database: A database can be one, stand-alone table that can contain many
fields of information. This is the simplest, yet least powerful type of
databasand is often referred to as a “flat” database.
Relational Databases: Many tables that are linked through common fields
and can ensure greater accuracy and less input of data. Relational
databases increase flexibility of data and allow ease of collecting and
maintaining historical data.
Table (Entity Type) - A table contains or holds the data. Tables can limit the
types of data in fields and can assist in integrity and accuracy of data.
Generally, tables do not perform calculations and are simply data
collectors for input or other means of acquiring data. Fields comprise
the records, records comprise the tables, and tables comprise the
database.
RECORD - A record is a collection of fields for an item you are tracking. For
example, a record consists of all the fields for a person if you are
tracking associates in a company. In addition, a record is a single row
which consists of multiple fields.
2
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
data some of the fields you would want to include would be First
Name, Last Name, Social Security Number, and so on.
3
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
Here the age (attribute) of student (entity) cannot further be divided. In this
example age is atomic attribute.
Multi-Valued Attribute: An attribute that can have multiple values for an entity is
known as multi-valued attribute. For example, the Phone no (attribute) of
student (entity) can have multiple value because a student may have many
phone numbers. Here, Phone no is multi valued attribute.
Derived Attribute: An attribute that can be derived from another attribute is known
as derived attribute. For example, age can be derived from birth date of
student.
Null Valued Attribute: An attribute which has not any value for an entity is known
as null valued attribute. For example, there may be chance when a student
has no phone no. In that case, phone no is called null valued attributes.
Key Attribute: An attribute that has unique value of each entity is known as key
attribute. For example, every student has unique student no. Here, student no.
is key attribute.
Application
4
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
1. Employee_ID __________________
2. Receipt_Number __________________
3. Skill __________________
4. Marital_Status __________________
5. Permanent_Address __________________
6. Eligibility __________________
7. Date_hired __________________
8. Middle_Name __________________
9. Company_Address __________________
10. Years_in_Service __________________
Feedback
True or False. Write True if the statement is true and underline the word that
makes the statement false and write correct word in the space provided.
______1. Access is the best application for large databases.
______2. Relational databases increase flexibility of data and allow ease of
collecting and maintaining historical data.
______3. A Table is a single row which consists of multiple fields.
______4. Tables can limit the types of data in fields and can assist in integrity
and accuracy of data.
______5. Tables can limit the types of data in fields and can assist in integrity
and accuracy of data.
______6. Generally, tables do not perform calculations and are simply data
collectors for input or other means of acquiring data.
______7. An attribute that can be divided into smaller independent attribute is
known as atomic attribute.
______8. An attribute that cannot be divided into smaller independent attribute is
known as composite attribute
______9. An attribute that can be derived from another attribute is known as stored
attribute.
5
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
______10.An attribute that has unique value of each entity is known as key attribute
Learning Objectives
MAAM ARLEN
Presentation of Contents
INTRODUCTION TO MS ACCESS
DATABASE FILE
TABLE
FIELD
DATA TYPE
TYPE
VALUE/RECORD
6
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
*Is a column on a datasheet and defines the data type for a set
of values in a table.
4. Data types - are the properties of each field. A field only has one
data type.
Examples:
Field: LastName
Data type: Text
7
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
Queries - You use queries to retrieve specific data from your database
and to answer questions about your data. For example, you can use a
query to find the names of the employees in your database who live in
a particular state.
Forms - Forms give you the ability to choose the format and
arrangement of fields. You can use a form to enter, edit, and display
data.
Macros - Macros give you the ability to automate tasks. You can use a
macro to add functionality to a form, report, or control.
Modules - Like macros, modules give you the ability to automate tasks
and add functionality to a form, report, or control. Macros are created
by choosing from a list of macro actions, whereas modules are written
in Visual Basic for Applications.
In Access, tables are used to store data, queries to retrieve data, forms
to enter data, and reports to display data.
Notes:
What is a Datasheet?
8
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
Understanding Tables
Note: When you view a blank database for the first time in Datasheet
view, you see a column named ID. This column is by default the
primary key field.
Views are different ways of looking at the same object. Tables have
four views:
Data Types
9
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
10
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
A Sample Table using the different data types and field properties in Microsoft Access 2007
Field Name Data type Field size Format Input MaskValidation Rule Validation Text
PersonnelID Autonumber
LastName Text 25 >
FirstName Text 20 >
Social Security # Text 15 000-00-0000
Street address Text 25
City Text 20
State Text 2 >
Zip Text 5
Gender Text 1
Favorite Number Number 0 and <1000 Favorite Number must be between 1 and 999.
11
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
Application
Write the correct Data type in the given attribute
TBLSTUDENT
Field Name Data Type
Student_ID
Last_Name
First_name
Birthdate
Gender
Year
Section
Downpayment
CP_Number
CAT_Taker
Feedback
Multiple Choice. Choose the best answer and write it in the space provided.
___1. How can you prevent the user in entering null or blank value in a field?
A. Set the field size property C. Set the required property
B. Set the input mask property D. Set the format property
____2. Which of the following is not an example of an Table
A. Patients B. Student ID C. Customers D. Employees
____3. MS Access database stores data in:
A. Tables B. Forms C. Macros D. Modules
_____4.The following are all access objects EXCEPT:
A. Forms B. Field C. Reports D. Macros
_____5.Which of the following access objects is used to retrieve data from the
database?
A. Macros B. Tables C. Queries D. Modules
_____6.Which of the following data type is most appropriate for a customer
ID field?
A. Text B. Memo/Longtext C. Auto Number D. Number
_____7. Which of the following is an example of a primary key?
A. Birth Date C. Receipt Number
B. Billing Address D. Year Level
12
Unit 2: Manipulation of Data Using the
Database Management System (DBMS) Graphical User (GUI)
_____8. Which of the following views should you use to change the data type
of a field?
A. Datasheet view B. Design viewC. Home view D. Pivot view
_____9.Which of the following data types should you use to automatically
insert a unique sequential or random numbers in your record?
A. AutoNumber B. Number C. Text D. Random Number
_____10.Liza is entering records in her table. Which view is she using?
A. Editing view B. Design view C. Datasheet view D. Home view
13