Anda di halaman 1dari 23

INTRODUCTION

What is DATA?
Data is distinct pieces of information, usually formatted in a special way. All software is
divided into two general categories: data and programs. Programs are collections of
instructions for manipulating data.
Data can exist in a variety of forms- as numbers or text on pieces of paper, as bits and bytes
stored in electronic memory, or as facts stored in a persons mind.
Strictly speaking, data is the plural or datum, a single piece of information. In practice,
however, people use data as both the singular and plural form of the word.
The term data is often used to distinguish binary machine- readable information from textual
human- readable information. For example, some applications make a distinction between
data files (files that contain binary data) and text files (files that contain ASCII data).
In database management systems, data files are the files that store the database information,
whereas other files, such as index files and data dictionaries, store administrative information,
known as metadata.
For example: life insurance companies use certain data, such as sex, age and health to make
their insurance rates applicable to each individual.
What is INFORMATION?
It is the answer to a question of some kind. It is also that from which Data and knowledge can
be derived, as data represents values attributed to parameters, and knowledge signifies
understanding of real things or abstract concepts. As it regards data, the information's
existence is not necessarily coupled to an observer while in the case of knowledge, the
information requires a cognitive observer.
At its most fundamental, information is any propagation of cause and effect within a system.
Information is conveyed either as the content of a message or through direct or
indirect observation of something. That which is perceived can be construed as a message in
its own right, and in that sense, information is always conveyed as the content of a message.
Information can be encoded into various forms for transmission and interpretation. It can also
be encrypted for safe storage and communication.

What is DATABASE?
A database is an organized collection of data. It is the collection of schemas, tables, queries,
reports, views and other objects. Databases are sometimes classified according to their
organizational approach. The most prevalent approach is the relational database, a tabular
database in which data is defined so that it can be reorganized and accessed in a number of
1

different ways. A distributed database is one that can be dispersed or replicated among
different points in a network. An object-oriented programming database is one that is
congruent with the data defined in object classes and subclasses.
What is Database Management System (DBMS)?
A database management system (DBMS) is system software for creating and managing
databases. The DBMS provides users and programmers with a systematic way to create,
retrieve, update and manage data. A DBMS makes it possible for end users to create, read,
update and delete data in a database. The DBMS essentially serves as an interface between
the database and end users or application programs, ensuring that data is consistently
organized and remains easily accessible. A DBMS always provides data independence. Any
change in storage mechanism and formats are performed without modifying the entire
application.
Types of Database Management System (DBMS)

What is Normalization?
Database normalization is the process of organizing the columns (attributes)
and tables (relations) of a relational database to minimize data redundancy.
Normalization involves decomposing a table into less redundant tables without losing
information; defining foreign keys in the old table referencing the primary keys of the new
ones. The objective is to isolate data so that additions, deletions, and modifications of an
attribute can be made in just one table and then propagated through the rest of the database
using the defined foreign keys.
There are four forms of Normalization:
First Normal Form: As per First Normal Form, no two Rows of data must contain
repeating group of information i.e. each set of column must have a unique value, such
that multiple columns cannot be used to fetch the same row. Each table should be
organized into rows, and each row should have a primary key that distinguishes it as
unique.
The Primary key is usually a single column, but sometimes more than one column can
be combined to create a single primary key. For example consider a table which is not
in First normal form.

Student Table:
Student

Age

Subject

Sapna

15

Biology, Maths

Paras

14

Maths

Sahil

17

Maths

In First Normal Form, any row must not have a column in which more than one value is
saved, like separated with commas. Rather than that, we must separate such data into multiple
rows.

Student Table following 1NF will be:


Student

Age

Subject

Sapna

15

Biology

Sapna

15

Maths

Paras

14

Maths

Sahil

17

Maths

Using the First Normal Form, data redundancy increases, as there will be many
columns with same data in multiple rows but each row as a whole will be unique.
Second Normal Form: As per the Second Normal Form there must not be any partial
dependency of any column on primary key. It means that for a table that has
concatenated primary key, each column in the table that is not part of the primary key
must depend upon the entire concatenated key for its existence. If any column
depends only on one part of the concatenated key, then the table fails Second normal
form.
In example of First Normal Form there are two rows for Anshula, to include multiple
subjects that he has opted for. While this is searchable, and follows First normal form,
it is an inefficient use of space. Also in the above Table in First Normal Form, while
the candidate key is {Student, Subject}, Age of Student only depends on Student
column, which is incorrect as per Second Normal Form. To achieve second normal
form, it would be helpful to split out the subjects into an independent table, and match
them up using the student names as foreign keys.
New Student Table following 2NF will be:
Student

Age

Sapna

15

Paras

14

Sahil

17

In Student Table the candidate key will be Student column, because all other column
i.e. Age is dependent on it.
New Subject Table introduced for 2NF will be:
Student

Subject

Sapna

Biology

Sapna

Maths

Paras

Maths

Sahil

Maths
In Subject Table the candidate key will be {Student, Subject} column. Now, both the
above tables qualifies for Second Normal Form and will never suffer from Update
Anomalies. Although there are a few complex cases in which table in Second Normal
Form suffers Update Anomalies, and to handle those scenarios Third Normal Form is
there.

Third Normal Form: Third Normal form applies that every non-prime attribute of
table must be dependent on primary key, or we can say that, there should not be the
case that a non-prime attribute is determined by another non-prime attribute. So
this transitive functional dependency should be removed from the table and also the
table must be in Second Normal form. For example, consider a table with following
fields.
Student Detail Table:
Student ID

Student Name

DOB

Street

City

State

Pin

In this table Student id is Primary key, but street, city and state depends upon Zip. The
dependency between zip and other fields is called transitive dependency. Hence to
5

apply 3NF, we need to move the street, city and state to new table, with Pin as
primary key.
New Student Detail Table:
Student ID

Student Name

DOB

Pin

Address Table:
Pin

Street

City

State

The advantage of removing transitive dependency is,

Amount of data duplication is reduced.

Data integrity achieved.

Boyce and Codd Normal Form: Boyce and Codd Normal Form is a higher version
of the Third Normal form. This form deals with certain type of anamoly that is not
handled by 3NF. A 3NF table which does not have multiple overlapping candidate
keys is said to be in BCNF. For a table to be in BCNF, following conditions must be
satisfied:

R must be in 3rd Normal Form

and, for each functional dependency ( X -> Y ), X should be a super Key.

Types of Keys in Database


Keys are very important part of Relational database. They are used to establish and
identify relation between tables. They also ensure that each record within a table can be
uniquely identified by combination of one or more fields within a table.
Following are the different types of keys:
Super Key An attribute or a combination of attribute that is used to identify the
records uniquely is known as Super Key. A table can have many Super Keys.
E.g. of Super Key
1 ID
6

2 ID, Name
3 ID, Address
4 ID, Department ID
5 ID, Salary
6 Name, Address
7 Name, Address, Department ID
So on as any combination which can identify the records uniquely will be a Super
Key.

Candidate Key It can be defined as minimal Super Key or irreducible Super Key.
In other words an attribute or a combination of attribute that identifies the record
uniquely but none of its proper subsets can identify the records uniquely.
E.g. of Candidate Key
1 ID
2 Name, Address
For above table we have only two Candidate Keys used to identify the records from
the table uniquely. ID Key can identify the record uniquely and similarly combination
of Name and Address can identify the record uniquely, but neither Name nor Address
can be used to identify the records uniquely as it might be possible that we have two
employees with similar name or two employees from the same house.
Primary Key A Candidate Key that is used by the database designer for unique
identification of each row in a table is known as Primary Key. A Primary Key can
consist of one or more attributes of a table.
E.g. of Primary Key - Database designer can use one of the Candidate Key as a
Primary Key. In this case we have ID and Name, Address as Candidate Key, we
will consider ID Key as a Primary Key as the other key is the combination of more
than one attribute.
Foreign Key A foreign key is an attribute or combination of attribute in one base
table that points to the candidate key (generally it is the primary key) of another table.
The purpose of the foreign key is to ensure referential integrity of the data i.e. only
values that are supposed to appear in the database are permitted.
E.g. of Foreign Key Let consider we have another table i.e. Department Table with
Attributes Department ID, Department Name, Manager ID, Location ID with
Department ID as an Primary Key. Now the Department ID attribute of Employee
Table can be defined as the Foreign Key as it can reference to the Department ID
attribute of the Departments table, a Foreign Key value must match an existing value
in the parent table or be NULL.

Composite Key If we use multiple attributes to create a Primary Key then that
Primary Key is called Composite Key (also called a Compound Key or Concatenated
Key).
E.g. of Composite Key, if we have used Name, Address as a Primary Key then it
will be our Composite Key.
Alternate Key Alternate Key can be any of the Candidate Keys except for the
Primary Key.
E.g. of Alternate Key is Name, Address as it is the only other Candidate Key which
is not a Primary Key.
Secondary Key The attributes that are not even the Super Key but can be still used
for identification of records (not unique) are known as Secondary Key.
E.g. of Secondary Key can be Name, Address, Salary, Department ID etc. as they can
identify the records but they might not be unique.
Introduction to Microsoft Access
Microsoft Access is an application that stores and maintains data in a database. Access is an
example of a database management system (DBMS) used to manage a small database on a
personal computer.
Microsoft Access-One of the applications included in Microsoft Office and used to manage a
database. Use it to create and edit database tables and to build forms and reports that use the
tables.
A database is a collection of information that's related.
Database management system-Software that stores and updates data in a database. A smallscale DBMS manages a database on a personal computer, and a large-scale DBMS manages a
database on a mainframe computer with many personal computers updating that data. Access
is an example of a small-scale DBMS. SQL Server by Microsoft and Oracle by Oracle
Corporation are examples of a large-scale DBMS.
Access allows you to manage your information in one database file. Within Access there
are four major areas: Tables, Queries, Forms and Reports.
Tables store your data in your database.
Queries ask questions about information stored in your tables.
Forms allow you to view data stored in your tables.
Reports allow you to print data based on queries/tables that you have created.
Creating a Database
Start Access

Select Blank Database.


In the File Name field enter a name for the database.
Click Create.
Microsoft Access automatically creates a new table in the database called Table1. This is
a temporary name until the table is saved.

Understanding the Views


There are 2 basic views when you work in a table: Design View and Datasheet View.
Design View is used to set the data types, insert or delete fields, and set the Primary key.
Datasheet View is used to enter the data for the records. By default, Access places you in
Datasheet View.
To Switch to Design view
Click the View button on the Home Ribbon.
Type a name for the table.
Click OK.

To Enter Fields in a Table


Type a name for the first field in the table.
Press Enter.
Select a data type.
Press Enter.
Type a description for the field.
Press Enter.
Continue this until all necessary fields have been entered into the table.
Note: The order that you enter the field names is the order the fields will appear in
the table and on a form.

To View the Datasheet


Click the View button on the Ribbon.
Click on data sheet view.
Then click on yes to save the table.

10

To Switch Back to Datasheet View to Enter your Records


Click the View button on the Ribbon.
Entering Data in a Table
Once you have entered the fields and set the data types it is now time to enter the
records in a table.
To Enter Data in a Table
Make sure you are in Datasheet View.
Enter the data into the table by pressing the tab key to move from one cell to another.
When you have completed the record (row), press Enter.

Table 1

11

Table 2

12

Table 3

13

Creating Relationships
In Access, you store data in multiple tables and then use relationships to join the tables. After
you have created relationships, you can use data from all of the related tables in a query,
form, or report. A primary key is a field or combination of fields that uniquely identify each
record in a table. A foreign key is a value in one table that must match the primary key in

14

another table. You use primary keys and foreign keys to join tables togetherin other words,
you use primary keys and foreign keys to create relationships.
There are two valid types of relationships: one-to-one and one-to-many. In a one-to-one
relationship, for every occurrence of a value in table A, there can only be one matching
occurrence of that value in table B, and for every occurrence of a value in table B, there can
only be one matching occurrence of that value in table A. One-to-one relationships are rare
because if there is a one-to-one relationship, the data is usually stored in a single table.
However, a one-to-one relationship can occur when you want to store the information in a
separate table for security reasons, when tables have a large number of fields, or for other
reasons. In a one-to-many relationship, for every occurrence of a value in table A, there can
be zero or more matching occurrences in table B, and for every one occurrence in table B,
there can only be one matching occurrence in table A.
When tables have a one-to-many relationship, the table with the one value is called the
primary table and the table with the many values is called the related table. Referential
integrity ensures that the validity of the relationship between two tables remains intact. It
prohibits changes to the primary table that would invalidate an entry in the related table. For
example, a school has students. Each student can make several payments, but each payment
can only be from one student. The Students table is the primary table and the Payments table
is the related table.

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 and reports.
To Create a Query
15

Click the Create tab on the Ribbon.


Click Query design icon.
Double-click Create Query in Design View.
Select the table that you would like to base your Query on.
Click Add.
Close the Show Table window.
The table(s) will now be displayed in the upper part of the Query Design Screen by
boxes containing the tables fields.
Double click on the field names in the field list window which you
would like to include in the Query.
Defining Criteria in the Query
In order to control which records are displayed, you must define criteria in a
Query. The most common type of Query is the Select Records Query.
To Define Criteria for your Query
Position your cursor in the criteria row in the field for which you
wish to define the criteria for.
Enter the criteria.
the results of the query will appear on the screen.
The result of a query is called a record set. A record set can be sorted, printed or filtered
in the same manner as a table.
To Save the Query
Click the Save Icon.
Enter a name for the Query.
Click OK.
Note: When saving a select Query, you are saving the question that you are asking, not
the results that you see when you run the query.
Creating Microsoft Access Queries
You can use a query to view a subset of your data or to answer questions about your data. For
example, if you want to view a list of student names and email addresses, but you do not want
to see addresses and other data, you can create a query that displays the students first name,
last name, and email address only. Alternatively, if you want to know which students live in
DE, you can restrict your list to those students.

16

Open Tables or Queries in Query Design View


17

A query can be based on tables or on other queries. To create a query, you open the tables or
queries on which you are going to base your query in Query Design view, and then use the
options in Design view to create your query. You then click the Run button to display the
results. You can save queries for later use.
Query Design

18

Creating a Form Using the Forms Design


19

A form is a database object that is used to enter or display data in a database.


To Create a Form Using the Design
Navigate to the table you want to base the form on.
Click Create on the Ribbon.
Click Form design.
You are able to navigate using the navigation arrows at the bottom of the form.
Note: The form feeds the table. If you edit a record on the form, or create a new
record, that data will be passed to the table it is associated with.
To Enter a Record on the Form
Click the View button on the Ribbon to switch from Layout View to Form View.
Enter the data for each field in the record, pressing the Enter key to move to
the next field.
Press Enter after you have entered data for the last field.
This will send the record to the table.

Results in Form View


20

Reports
Reports can be based on tables or queries and can be made with the Report Wizard.
To Create a Report Using the Report Wizard

Click the Create tab on the Ribbon.


Click the Report Wizard icon.
Select the table or query upon which the report will be based.
Select the fields that you want to include on the report by double clicking on them.
Click Next.
If you would like to add grouping to your report, select the field you wish to group by
double clicking on it. (Example: City)
Click Next.
Select a style for the report.
Click Next.
Type a title for the report.
Click Finish.

21

To Print a Report
Open the report by double clicking on the object in the Navigation Pane.
By default, the report opens in Print Preview.
To Adjust the Orientation
Click the portrait or landscape icon on the Print Preview Ribbon.
To Adjust the Margins
Click them Margins icon on the Print Preview Ribbon.
Select a margin size.
To Print the Report
Click the Print Icon on the Print Preview Ribbon.
Select the Printer.
Click OK.

22

Conclusion:
Thus, microsoft Access application stores and maintains data in a database. Access is an
example of a database management system (DBMS) used to manage a small database on a
personal computer. Use it to create and edit database tables and to build forms and reports
that use the tables. A database is a collection of information that's related.Access is an
example of a small-scale DBMS. SQL Server by Microsoft and Oracle by Oracle Corporation
are examples of a large-scale DBMS. It allows you to manage your information in one
database file. Within Access there are four major areas: Tables, Queries, Forms and Reports.

23

Anda mungkin juga menyukai