Database and Database Management System
Database and Database Management System
INTRODUCTION
Many observers of trends in business or government activity believe that any organization that
will excel in the 21st century must be able to manage information as a major resource and
structure it as efficiency as they do for other resources, since information can only be an asset
only if it is accurate and available when needed. Many people who will tell you they have a
database, in fact only have files. In reality, many of these files are probably databases. As such
the term ‘database’ is perhaps the most overused term in today’s business environment.
DATABASE
A Database is a collection of data files which are integrated or cross-reference and organized (i.e.
structural data) so as to provide a single comprehensive file system that can be accessed by
different people for different purposes. A database is a collection of data that is stored in a
computer system. Database can further be defined as, it:
Databases allow the users to enter, access, and analyze data quickly and easily. They’re such a
useful tool that you see them all the time. Ever waited while a doctor’s receptionist entered your
personal information into a computer, or watched a store employee use a computer to see
whether an item was in stock? Then you’ve seen a database in action.
The easiest way to understand a database is to think of it as a collection of lists. Think about one
of the databases mentioned above: the database of patient information at a doctor’s office. What
lists are contained in a database like this? Well, to start with, there’s a list of patient names. Then
there’s a list of past appointments, a list with medical history for each patient, a list of contact
information, and so on.
1|Page
DATABASE (ACCESS)
WHY USE A DATABASE?
If a database is essentially a collection of lists stored in tables and you can build tables in Excel,
why do you need a real database in the first place? While Excel is great at storing and organizing
numbers, Access is far stronger at handling non-numerical data, like names and descriptions.
Non-numerical data plays a significant role in almost any database, and it's important to be able
to sort and analyze it.
However, the thing that really sets databases apart from any other way of storing data is
connectivity. The Access database is the ones you’ll work with and it is call a relational database.
A relational database is able to understand how lists and the objects within them relate to one
another.
1. Common data for all users to share: Each user will have access to the same data i.e.
provides a comprehensive file of data for a number of different users.
2. Avoiding the entire effort of keeping duplicate files in different departments
a) Data should be shared: different users should be able to access the same data in the
database for their own processing applications at the same time if required
b) The integrity of the database must be preserved: this mean that one user should not be
allowed to alter the data on files so as to spoil the database records for other users.
c) The database system should provide for the needs of different users.
d) The database should be capable of evolving both in slant/long terms i.e. kept updated and
able to meet the future data processing need.
2|Page
DATABASE (ACCESS)
Disadvantages
Privacy issues
Security issues
Cost issues
Database Concepts
Access is structured in terms of tables that have rows and columns and look a lot like an Excel
worksheet. Columns in the table, which are called fields, identify the types of data that are stored
in the table – Last Name, First Name, Middle Initial, Street, City, and State in the example
shown below. Each row in the table, which is called a record, is a set of information about a
particular item in the database – a particular person in the example shown below.
F I E L D S
The data elements of a database at the intersection of a row (record) and a column (field) are
called values. For example, the value of the First Name field for the second record in the table
shown above is “Snoweezy.”
One of the fields, called the primary key, in a table uniquely identifies each of the records. In the
example shown above, the primary key is the ID. No two rows in a table can have the same value
in a primary key field.
Access is a relational database management system (RDBMS) that generally uses more than one
table to store information. Each table holds data that are logically inter-related. For example, a
college student database might have one table of personal information about students and another
showing the classes they are taking. Within Access there are four
major areas: Tables, Queries, Forms and Reports
3|Page
DATABASE (ACCESS)
• Reports allow you to print data based on queries/tables that you have created
Creating a Database
1) Start Access
2) Select Blank Database
3) In the File Name field enter a name for the database
4) Click Create
KEYS
Key is a field that uniquely identifies the records, tables or data.
In the relational data model there are many keys. Some of these keys are:
• Primary key
• Foreign key
• Unique key
• Super key
• Candidate key
Primary Key: A primary key is one or more column(s) in a table used to uniquely identify each
row in the table.
Example:
Student
Roll No Name Address
Unique Key: Unique key is one or more column(s) in a table used to uniquely identify each row
in the table. It can contain NULL value.
Student
Roll No Name Address
4|Page
DATABASE (ACCESS)
Differentiate primary key and Unique key
• Unique key may contain NULL value but primary key can never contain NULL value.
Super Key: A super key is a set of one or more attributes that, taken collectively, allow us to
identify uniquely a tuple in the relation.
e.g., {Roll-No}, {Roll-No, Name}, {Roll-No, Address}, {Roll-No, Name, Address} all these
sets are super key.
Candidate Key: If a relational schema has more than one key, each is called a candidate key.
• All the keys which satisfy the condition of primary key can be candidate key.
e.g.
Student
Roll_No Name Address Phone_No
{Roll-No} and {Phone-No} are two candidate key. Because we can consider anyone of these as
a primary key
Item Table
I_ID DESCRIPTION UNIT PRICE (#) QUANTITY S_ID
SW111 Souvenir 250 1500 SP101
SW112 Toner 4000 50 SP102
SW113 Ink 2000 20 SP101
SW114 Litho 200 10 SP101 (FK)
PK: Primary Key
FK: Foreign Key
5|Page
DATABASE (ACCESS)
Advantages of DBMS
1. Controlling the data redundancy: The data redundancy, storing the same data multiple times
leads to several problems.
First, storage space is wasted when the same data is stored repeatedly.
Second, files that represent the same data may become inconsistent. This may happen because an
update is applied to some of the files but not to others. Most DBMS provide facilities for
controlling the data redundancy using normalization and keys concepts.
2. Restricting unauthorized access: When multiple users access a database therefore some
users will not be authorized to access all information in the database.
A DBMS should provide a security and authorization subsystem, which the Data Base
Administor (DBA) specify the restrictions. The DBMS should then enforce these restrictions
automatically. For example, the Banking data are often considered confidential, and hence only
authorized persons are allowed to access such data.
3. Providing backup and Recovery: A DBMS must provide facilities for recovering from
hardware or software. The backup and recovery subsystem of DBMS is responsible for recovery.
For example, if the computer system fails in the middle of a complex update program, the
6|Page
DATABASE (ACCESS)
recovery subsystem is responsible and makes sure that the database is restored to the state it was
in before the program started executing. Alternatively, the recovery subsystem ensures that the
program is resumed from the point at which it was interrupted so that its full effect is recorded in
the database.
4. Providing Multiple user Interfaces: Because many types of users with varying levels of
technical knowledge use a database, a DBMS should provide a variety of user interfaces. These
include query languages for casual users. Programming language interfaces for application
programmers, forms and command codes for parametric users and graphical user interfaces for
stand-alone users.
5. Enforcing Integrity constraints: Data integrity means that the data contained in the database
is both accurate and consistent. Integrity means constraints, which are consistency rules that the
database system should not violate. Most database applications have certain integrity constraints
that must hold for the data. A DBMS should provide capabilities for deforming and enforcing
these constraints. The simplest type of integrity constraint specifying a data type for each data
item
6. Efficient data access: DBMS utilizes a variety of sophisticated techniques to store and
retrieve data efficiently. This feature is especially important if the data is stored on external
storage devices.
7. Improved the data sharing: Since, database system is a centralised repository of data
belonging to the entire organization, it can be shared by all authorized users. Existing application
program can share the data in the database. Furthermore, new application programs can be
developed on the existing data in the database to share the same data and add only that data that
is not currently stored. Therefore, more users and applications can share more of the data.
8. Improved security: Database security is the protection of database from unauthorized users.
The database administrator (DBA) ensures that proper access procedure is followed, including
proper authentication schemes for access to the DBMS and additional checks before permitting
access to sensitive data. A DBA can define user names and passwords to identify people
authorized to use the database.
9. Improved data consistency: If the redundancy is removed or controlled, chances of having
inconsistence data is also removed and controlled. In database system, such inconsistencies are
avoided to some extent by making them know to DBMS. DBMS ensures that any change made
to either of the two entries in the database is automatically applied to the other one as well. This
process is known as propagating updates.
Disadvantages of DBMS
There are the following disadvantages of DBMS.
1. Complexity of Backup and Recovery: For a centralised shared database to be accurate and
available all times, a comprehensive procedure is required to be developed and used for
providing backup copies of data and for restoring a database when damage occurs. A modern
DBMS normally automates many more of the backup and recovery tasks than a file oriented
system.
7|Page
DATABASE (ACCESS)
2. Increased installation and management cost: The large and complex DBMS software has a
high initial cost. It requires trained manpower to install and operate and also has substantial
annual maintenance and support cost. Additional database software may be needed to provide
security and to ensure proper concurrent updating of shared data.
3. Additional hardware cost: The cost of DBMS installation varies significantly, depending on
the environment and functionality, size of the hardware and the recurring annual maintenance
cost of hardware and software.
4. Requirement of new and specialized manpower: Because of rapid changes in database
technology and organization's business needs, the organization's need to hire, retrain its
manpower on regular basis to design and implement databases, provide database administration
services and manage a staff of new people. Therefore, an organization needs to maintain
specialized skilled manpower.
5. Increased complexity: A multi-user DBMS becomes an extremely complex piece of software
due to expected functionality from it. It becomes necessary for database designers, developers,
database administrators and end-users to understand this functionality to full advantage of it.
6. Problems associated with centralization: Centralization means that the data is accessible
from a single source called database.
7. Large size of DBMS: The large complexity and wide functionality makes the DBMS an
extremely large piece of software. It occupies many gigabytes of storage disk space and requires
substantial amounts of main memory to run efficiently.
Database Administrator
A person who has central control of both the data and the programs that access those data over
the system is called a database administrator. The effective use of a database within an
organization requires a great deal of cooperation and coordination. Someone needs to manage
and control all these activities related to the database.
A Database Administrator (A person who coordinates all related activities and needs for a
corporation’s database undertakes this function. A DBA is responsible for looking after the
structural physical storage and security of the data in the best interest of all users. Other
functions include;
Maintaining the database, which include the addition of new data and ensuring there is no
duplication
Maintaining a dictionary describing the data items
Maintaining users’ manuals for describing how to use the facilities of the database
Overseeing the security of the database and ensuring that individual privacy is not
encroached.
8|Page