Operate Database Application Power Ponit

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

OPERATE DATABASE APPLICATION

LO 1: create database objects


DATABASE

• A database can best be described as a way of storing


large amounts of information. The data can be retrieved
(saved) and we can even ask questions of the data and get
answers. For example: you may want to know how many
students e registered in every occupational level.
MS ACCESS

is a database management tool that enables one


to store relevant data. This also has the
capabilities to retrieve, sort, summarize and report
results immediately and effectively. It can combine
data from various files (tables) through creating
relationships, and can make data entry more
efficient and accurate through the use of forms.
e.g SQL, ORACAL
Microsoft access (MS access) enables one to manage all important information from a
single database file. Within the file, one can use the different objects:
• Tables - A table is a collection of data about a specific topic, such as products or
suppliers. Using a separate table for each topic means that you store that data only once.
This results in a more efficient database and fewer data-entry errors.
• Queries - you use queries to view, change, and analyze data in different ways. You can
also use them as a source of records for forms, reports, and data access pages.
• Forms - a form is a type of a database object that is primarily used to enter or display
data in a database. You can also use a form as a switchboard that opens other forms and
reports in the database, or as a custom dialog box that accepts user input and carries out
an action based on the input.
• Reports - a report is an effective way to present your data in a printed format.
Because you have control over the size and appearance of everything on a
report, you can display the information the way you want to see it
• Modules - A module is essentially a collection of declarations, statements, and
procedures stored together as one named unit to organize your microsoft visual
basic code. Microsoft access has two types of modules: standard modules and
class modules.
• Data access pages - a data access page is a special type of web page
designed for viewing and working with data from the internet or an intranet—
data that is stored in a Microsoft access database or a Microsoft SQL server
database. The data access page may also include data from other sources, such
as Microsoft excel.
Establishment of ms access database
• All ms access databases files are saved with extension .Mdb. A database should
have a separate table for every major subject, such as students records, students
grades, etc..
• Production data or treatment information. Data should not be duplicated in
multiple tables . microsoft access provides three methods to create a database
• Database wizard (though easy, the wizard offers limited options to customize the
database)
• Using a template (this method works best if one can find and use a template that
closely matches the specific requirements)
• Creating a database directly (this is the most flexible method, but it requires
one to define each database element separately).
• Basic database concept: in studying MS access, it is but necessary to understand
some basic elements of a database before proceeding to it.
Database elements:
a) Data are raw facts. It tells the truth about something; a person, a place, an
object, etc.
b) Information is a collection of data (raw facts) which is contained in 1 file (table in access)
• Naming convention is manner of naming files and variables. Having a
poor naming convention can only add confusion, here are the three things
to consider in establishing a naming convention:
1. Does my convention make sense to me?
• Is must be simple and understandable to you.

2. Will my convention make sense to other people?


• Time will come that other people will look into your database program, so they must
able to understand it.

3. Can i be consistent in implementing and enforcing my convention?


• All throughout my database work, your naming convention must not change.
SELF - CHECK 1

1. In ms access, a way of storing large amounts of information was called a?


(1 points)
2. Enumerate and the different ms access objects. (2 points)
3. Ms access database file was saved with what extension name? (1 point)
4. What are the 3 methods to create a database in ms access? (3 points)
5. A collection of related data is called (1 point)
6. what are the three things to consider in establishing a naming convention?
(3 points)
• Creating DB Tables
Before we proceed to creating your first table, we need to know first the basic
components of a table:
• Meta Data – Database Structure
• Field – Column – Data
• Fieldname
• Record - Row - Information
• Metadata – is a “data about data” or synonymously called table structure that
defines what type of data your data is?
• Given these data:
(1) “Meseret” which is a firstname, we can say that it composes of texts, so we
define the firstname to accept text only thus it accepts the value “Meseret”
(2) Supposed that “21” is the Age of Meseret, then we will define Age as a number,
specifically an Integer so it will only accept a value which is an integer.
• Field – Every column in a table represents a field by which data has
been stored.
• Field name – This refers to the name of every field.
• Records – Every row in a table represents a record, which is a
collection of meaningful data.

Data Types
• Text: allows for the storage of any kind of data, characters, digits and
special characters. It has a defect length of 50 characters with a
maximum length of 255.
• Memo: is used for texts of more than 255 characters such as
comments or explanations. It has a maximum length of 65.536
characters.
• Number: for numerical data used in mathematical calculations
• Date/time: for the introduction of date and time from the year 100 to
9999.
• Auto number: a unique sequential number (increasing one by one), or
an aleatory number that access assigns every time it adds a new record to
a table. Auto number fields cannot be updated.
• Yes/no: yes and no values, and fields that contain one of two values
(yes/no, true/false or acivated/disactivated).
• Currency: Monetary values.
• OLE Object: an object such as a Microsoft Excel spreadsheet, a
Microsoft Word document, graphics, images, sounds, or other binaries.
• Hyperlink: text or a combination of text and numbers stored as text and
used as a hyperlink address. A hyperlink is a text or graphic that you
click to go to a file, a location in a file, a web page on the internet, or a
web page on an intranet.
Tables may be created by either:
Table wizard
Design view
• Primary key is the unique identification of one record. It will
not allow a duplication of the primary key thus make it unique.
• Foreign key is a key used to link two tables together.
• A foreign key is a field (or collection of fields) in one table
that refers to the PRIMARY KEY in another table.

• There are 3 types of relationships in database design.
1. ONE-TO-ONE
2. ONE-TO-MANY (OR MANY-TO-ONE)
3. MANY-TO-MANY
1. ONE-TO-ONE
• A row in table A can have only one matching row in table B, and vice
versa.

Example of a one-to-one relationship


2. ONE-TO-MANY (OR MANY-TO-ONE)

• This is the most common relationship type. In this type of


relationship, a row in table A can have many matching rows
in table B, but a row in table B can have only one matching
row in table A.
• MANY-TO-MANY
• In a many-to-many relationship, a row in table A can have
many matching rows in table B, and vice versa.

You might also like