Operate Database Application
Introduction to the Module
A Database is information that is set up for
easy access, management and updating.
Computer databases typically store
aggregations of data records or files that
contain information, such as sales
transactions, customer data, financials and
product information. Databases are used
for storing, maintaining and accessing any
sort of data.
What is database?
A database is an organized collectio
n of data, so that it can be easily acc
essed and managed.
Database is the collection of organiz
ed data that is structured and stored
electronically on a computer system.
Databases can store data in the for
m of tables depending upon the type
of database.
The database's primary goal is to st
ore a huge amount of data.
Database Design Principle
Database design is the organization
of data according to a database mod
el.
The designer determines what data
must be stored and how the data ele
ments interrelate.
With this information, they can begin
to fit the data to the database model.
Database management system
manages the data accordingly.
•Database design involves classifying
data and identifying interrelationships
A Database Management System (DBMS)
is software to store, manage, retrieve, and
manipulate data effectively. It contains
several functions and features to ensure
data accuracy, availability, and
accessibility.
Basic principle of database
• Usability
• Extensibility
• Integrity
• Entity Integrity
• Domain Integrity
• Referential Integrity
• User defined integrity
• Performance
• security
Open & Design Database Applicati
on
A database is a way of storing large
amounts of information.
The data can be retrieved and we ca
n even ask questions of the data and
get answers.
For example: You may want to know h
ow many Students enrolled in every oc
cupational level.
MS Access (MS Office Access ) is
a database management tool that en
ables one to store relevant data.
This also has the capabilities to retri
eve, sort, summarize report and resu
lt immediately and effectively.
It can combine data from various file
s (tables) through creating relationsh
ips and can make data entry more ef
ficient and accurate through the use
of forms.
It enables to manage all important
information from a single database file,
Within the file can use the different obj
ects/items:
Design process
Determine the purpose of your datab
ase.
Find and organize the information re
quired
Divide the information into tables
Turn information items into columns.
Decide what information you want to
store in each table
Specify primary keys
Set up the table relationships
Refine your design.
Apply the normalization rules
Type of Database objects
Metadata – is a “data about data” or sy
nonymously called table structure that
defines what type of data your data is.
Tables - A table is a collection of data
about a specific topic
Defined as a container or a workshe
et-like container where the collection
of data has been stored.
Basic Component of a Table:
Meta Data– Database Structure
Field – Column – Data
Fieldname
Record - Row – Information
Queries –used to view, change, and a
nalyze data in different ways.
You can also use them as a source of
records for forms, reports.
Forms - primarily used to enter or displ
ay data in a database.
Reports - A report is an effective way t
o present your data in a printed format
Create Data base Objects
Designing table involves
Entering unique names of the columns
of the table in the “field name” column
of the design view.
Names of fields and objects in Microso
ft Access can be up to 64 characters lo
ng.
They can include any combination of le
tters, numbers, spaces, and special ch
aracters except a period (.), an exclam
ation point (!), an accent grave (`), and
brackets ([ ]).
They also can't begin with leading spa
ces
Data types in Microsoft Access
Text: allows for the storage of any kind
of data, characters, digits and special c
haracters.
Memo: is used for texts of more than 2
55 characters such as comments or ex
planations.
Number: for numerical data used in ma
thematical calculations.
Date/Time
: for the introduction of date and time fr
om the year 100 to 9999.
Currency: For monetary/economic valu
es and numerical data used in mathem
atical calculations in which the data inv
olved contains between one and four d
ecimals.
Autonumber: a unique sequential num
ber (increasing one by one), or a numb
er that Access assigns every time it ad
ds a new record to a table.
Data types in Microsoft Access………
Yes/No:Yes and No values, and fields
that contain one of two values (Yes/
No, True/False or Activated/
Deactivated).
OLE Object: an object such as a Micro
soft Excel spreadsheet, a Microsoft
Word document, graphics, images, so
unds, or other binaries.
•Used to embed or link to documents fr
om other programs like Excel and Wor
d.
Hyperlink: text or a combination of text
and numbers stored as text and used
as a hyperlink address.
Attachment: Used to store files in an A
ccess database.
The attachment data type lets you stor
e one or more files per record.
Lookupwizard: A lookup wizard field let
s the user choose from a predefined s
et of options, like a "male" or "female"
selection or a "country" selection
Normalization
Normalization is the process of organizing
data in a database.
Goal of Normalization process
Eliminating redundant data (for example,
storing the same data in more than one table)
Ensuring data dependencies make sense (only
storing related data in a table).
Both used to reduce the amount of space a
database consumes and ensure that data is
logically stored.
Data base Relationships
Are associations between tables that are
created using join statements to retrieve data.
Each primary key value relates to none or only
one record in the related table.
Allow you to describe the connections
between different database tables in powerful
ways.
Once you've described the relationships
between your tables, you can later leverage
that information to perform powerful cross-
table queries, known as joins.
Is a logical connection between two tables.
One of the huge advantages of a relational
database is that, once you have your data held
in clearly defined, compact tables, you can
connect or relate the data held in different
tables.
Types of keys
*Keys are fields that are part of a table
relationship.
*There are two kinds of keys
Primary key
A primary key is used to identify each record
that you store in the table.
A table can have only one primary key.
Primary Key is the unique identification of one
record.
Foreign Key
A table can also have one or more foreign key.
A foreign key contains values that
correspondent to values in the primary key of
another table use table relationship to
combine data from related table.
Customer c-phone
c-id c-address
c-name
c-age Employee
c-sex e- id
e- name
e- age
e- sex
e- address
e- salary
c-id
Types of Database Relationships
One-to-one relationships: occur when each
entry in the first table has one, and only one,
counterpart in the second table.
One-to-many relationships: Is the most
common type of database relationship.
Many-to-many relationships: occur when
each record in the first table corresponds to
one or more records in the second table and
each record in the second table corresponds
to one or more records in the first table
ER Diagram (Entity Relationship Diagram)
ERD is a visual representation of different data
using conventions that describe how these
data are related to each other.
For example, the elements writer, novel, and
consumer may be described using ER
diagrams this way:
Elements In ER Diagram
Entity
➤ An entity can be a person, place, event, or
object that is relevant to a given system.
➤For example, a school system may include
students, teachers, major courses, subjects,
fees, and other items.
➤Entities are represented in ER diagrams by a
rectangle and named using singular nouns.
Attribute
➤ An attribute is a property, trait, or
characteristic of an entity, relationship, or
another attribute.
➤ An entity can have as many attributes as
necessary.
attributes can also have their own specific
attributes.
For example, the attribute "customer
address" can have the attributes number,
street, city, and state.
These are called composite attributes.
Attributes are represented by oval shapes.
Relationship
➤Describes how entities interact.
➤For example, the entity "carpenter" may be
related to the entity "table" by the
relationship "builds" or "makes".
➤Relationships are represented by diamond
shapes and are labeled using verbs.
➤There are more elements which are based
on the main elements. These are:
Weak Entity
➤Depends on the existence of another entity.
➤Cannot be identified by its own attributes.
➤ It uses a foreign key combined with its
attributed to form the primary key.
Order. Order Item
A multi-valued attribute is an attribute that
can hold multiple values for a single entity,
while an attribute with its own attributes is a
composite attribute. In the example of a
teacher entity, the "Subjects" attribute would
be multi-valued if a teacher can teach multiple
subjects. For example, a teacher could teach
"Math", "Science", and "History"
simultaneously.
Derived Attribute
An attribute based on another attribute.
is found rarely in ER diagrams.
*For example for a circle the area can be
derived from the radius.
Understanding data entry symbols
Symbol Meaning
This is the current record; the record has been
saved as it appears. The current record is
indicated by a change in color in the record
selector.
You are editing this record; changes to the
record aren't yet saved. Boo
This record is locked by another user; you
can't edit it.
This is a new record in which you can enter
information.
This is the primary key field and contains a
value that uniquely identifies the record.