0% found this document useful (0 votes)
10 views

Database Administration

Uploaded by

larymarklary
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Database Administration

Uploaded by

larymarklary
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 65

CODE

Database Administration
Engr. Njawe Edouard
Cloud engineer/Community Developer
Lecture 1: Welcome, and Introduction
[email protected]
Our Main Goal Today
To Define the Term Database Management
System
Can you name some examples of
DBMS?
Can you name some examples of
DBMS?
Relational Database Management System
MySQL, Oracle Database, Microsoft SQL Server, PostgreSQL
NoSQL Database Management Systems
MonogoDB, Cassandra, Radis
Other Database Management System
SQLite, Microsoft Access, IBM Db2

What is Database Management
System?
As the name suggests, the database
management system consists of two parts.
They are:
1. Database and
2. Management System
What is a Database?

• To find out what database is, we have to start


from data, which is the basic building block
of any DBMS
What is a Database?

Data: Facts, figures, statistics etc. having no particular


meaning (e.g. 1, ABC, 19 etc).
Record: Collection of related data items, e.g. in the
above example the three data items had no meaning. But
if we organize them in the following way, then they
collectively represent meaningful information
Table or Relation: Collection of related records

The columns of this relation are called Fields, Attributes or Domains. The rows
are called Tuples or Records.
What is Database?
Database is the collection, organisation and
storing of data for easily retrieval.

Collection of related relations. Consider the


following collection of tables:
We now have a collection of 4 tables. They can be called a “related collection”
because we can clearly find out
that there are some common attributes existing in a selected pair of tables.
Because of these common
attributes we may combine the data of two or more tables together to find out
the complete details of a
student. Questions like “Which hostel does the youngest student live in?” can be
answered now, although Age and Hostel attributes are in different tables
A database in a DBMS could be viewed by lots of different people with different
responsibilities .
Example

For example, within a company there are different departments, as well as customers, who
each need to see
different kinds of data. Each employee in the company will have different levels of access
to the database with
their own customized front-end application.
In a database, data is organized strictly in row and column format. The rows are called
Tuple or Record. The
data items within one row may belong to different data types. On the other hand, the
columns are often called
Domain or Attribute. All the data items within a single attribute are of the same data type
What is Management System?

Database Management system is a software that collect,


organise and store data for easily retrieval.
Database-management system (DBMS) is a collection of
interrelated data and a set of programs to access
those data.
DBMS is an integrated suit of data handling software that
controls and manages the organisation, storage and access of
data in a database.
Goal of DBMS?
The primary goal of a DBMS is to provide a
way to store and retrieve database information
that is both convenient and efficient. By data,
we mean known facts that can be recorded
and that have implicit meaning.
Why is DBMS Important
The management system is important because without the existence of
some kind of rules and regulations it is not possible to maintain the
database. We have to select the particular attributes which should be
included in a particular table; the common attributes to create
relationship between two tables; if a new record has to be inserted or
deleted then which tables should have to be handled etc. These issues
must be resolved by having some kind of rules to follow in order to
maintain the integrity of the database
Database systems are designed to manage large bodies of information. Management of
data involves both defining structures for storage of information and providing
mechanisms for the manipulation of information. In addition, the database system must
ensure the safety of the information stored, despite system crashes or attempts at
unauthorized access. If data are to be shared among several users, the system must avoid
possible anomalous results.
Because information is so important in most organizations, computer scientists have
developed a large body of concepts and techniques for managing data. These concepts and
technique form the focus of this course(Database Administration)
Features of DBMS
• Elimination of data redundancy: This
eliminates the need for data to be duplicated
in a database.
• Handling the security of the database: A
database administrator can use a DBMS to
set the access rights and privileges.
• Managing data integrity: It ensures that
relationships between data items are valid
and maintained.
• Facilitating centralised control: It
provides a DBMS with central control.
• A data dictionary: It describes the structure of the
database and its components. It can be used by the
database designer to plan changes in the database.
• Operating transaction control: A DBMS can
manage simultaneous access to the database by
multiple users.
• Applying data validation checks: Data
validation ensures that when data is input or
changed by users, the DBMS checks the
correctness of the changes and either reports
invalid data to the user or stores valid data.
• Facilitating querying: DBMS respond to user
request made in a database query language.
• Database backup: Many DBMS have facilities for the
automatic scheduled backup of data and data structures.
• Any software designed to create, maintain and interrogate
electronic databases is termed data handling software. It
enables the end-user to interact with the database.
Database Management System (DBMS)
and Its Applications:
A Database management system is a computerized record-
keeping system. It is a repository or a container for collection of
computerized data files. The overall purpose of DBMS is to
allow he users to define, store, retrieve and update the
information contained in the database on demand. Information
can be anything that is of significance to an individual or
organization.
Databases touch all aspects of our lives. Some of the
major areas of application are as follows:
1. Banking
2. Airlines
3. Universities
4. Manufacturing and selling
5. Human resources
Enterprise Information
• ◦ Sales: For customer, product, and purchase information.
◦ Accounting: For payments, receipts, account balances, assets and other accounting
information.
◦ Human resources: For information about employees, salaries, payroll taxes, and
benefits, and for generation of pay checks.
◦ Manufacturing: For management of the supply chain and for tracking production of
items in factories, inventories of items in warehouses and stores, and orders for items.
Online retailers: For sales data noted above plus online order tracking, generation of
recommendation lists, and maintenance of online product evaluations
Banking and Finance
◦ Banking: For customer information, accounts, loans, and banking transactions.
◦ Credit card transactions: For purchases on credit cards and generation of
monthly statements.
◦ Finance: For storing information about holdings, sales, and purchases of financial
instruments such as
stocks and bonds; also for storing real-time market data to enable online trading by
customers and
automated trading by the firm.
• Universities: For student information, course registrations,
and grades (in addition to standard enterprise
information such as human resources and accounting).
• Airlines: For reservations and schedule information.
Airlines were among the first to use databases in a
geographically distributed manner.
Telecommunication: For keeping records of calls
made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing
information about the communication networks
Purpose of Database Systems
Database systems arose in response to early methods of
computerized management of commercial data. As an
example of such methods, typical of the 1960s, consider part
of a university organization that, among other data, keeps
information about all instructors, students, departments, and
course offerings. One way to keep the information on a
computer is to store it in operating system files.
• To allow users to manipulate the information,
the system has a number of application programs that manipulate the files, including
programs to:
 Add new students, instructors, and courses
 Register students for courses and generate class rosters
 Assign grades to students, compute grade point averages (GPA), and generate
transcripts
• System programmers wrote these application programs to meet the needs
of the university
• New application programs are added to the system as the need
arises. For example, suppose that a university
decides to create a new major (say, computer science).As a
result, the university creates a new department
and creates new permanent files (or adds information to
existing files) to record information about all the
instructors in the department, students in that major, course
offerings, degree requirements, etc.
• The university may have to write new application
programs to deal with rules specific to the new
major. New application programs may also have to
be written to handle new rules in the university.
Thus, as time goes by, the system acquires more
files and more application programs.
• This typical file-processing system is supported by a conventional
operating system. The system stores permanent records in various
files, and it needs different application programs to extract records
from, and add records to, the appropriate files. Before database
management systems (DBMSs) were introduced, organizations
usually stored information in such systems.
• Keeping organizational information in a file
processing system has a number of major
disadvantages :
Data redundancy and
inconsistency.
• Since different programmers create the files and
application programs over a long period, the various
files are likely to have different structures and the
programs may be written in several programming
languages. Moreover, the same information may be
duplicated in several places (files).
• For example, if a student has a double major (say,
music and mathematics) the address and telephone
number of that student may appear in a file that
consists of student records of students in the Music
department and in a file that consists of student
records of students in the Mathematics department.
• This redundancy leads to higher storage and access
cost. In addition, it may lead to data inconsistency;
that is, the various copies of the same data may no
longer agree. For example, a changed student address
may be reflected in the Music department records but
not elsewhere in the system.
Difficulty in accessing data
• Suppose that one of the university clerks needs to find out the
names of all students who live within a particular postal-code
area. The clerk asks the data-processing department to generate
such a list. Because the designers of the original system did not
anticipate this request, there is no application program on hand
to meet it. There is, however, an application program to
generate the list of all
students
• The university clerk has now two choices: either obtain the list of
all students and extract the needed information manually or ask a
programmer to write the necessary application program. Both
alternatives are obviously unsatisfactory. Suppose that such a
program is written, and that, several days later, the same clerk
needs to trim that list to include only those students who have
taken at least 60 credit hours.
• As expected, a program to generate such a list does not
exist. Again, the clerk has the preceding two options,
neither of which is satisfactory. The point here is that
conventional file-processing environments do not allow
needed data to be retrieved in a convenient and efficient
manner. More responsive data-retrieval systems are
required for general use.
Data isolation
• Because data are scattered in various files,
and files may be in different formats,
writing new application programs to
retrieve the appropriate data is difficult
Integrity problems
• The data values stored in the database must
satisfy certain types of consistency
constraints.
• Suppose the university maintains an account for each department, and
records the balance amount in each account. Suppose also that the
university requires that the account balance of a department
may never fall below zero. Developers enforce these constraints in the
system by adding appropriate code in the various application
programs. However, when new constraints are added, it is difficult to
change the programs to enforce them. The problem is compounded
when constraints involve several data items from different files
Atomicity problems
• A computer system, like any other device, is
subject to failure. In many applications, it is
crucial that, if a failure occurs, the data be
restored to the consistent state that existed
prior to the failure
• Consider a program to transfer $500 from the account balance of
department A to the account balance of department B. If a system
failure occurs during the execution of the program, it is possible that
the $500 was removed from the balance of department A but was not
credited to the balance of department B, resulting in an inconsistent
database state. Clearly, it is essential to database consistency that
either both the credit and debit occur, or that neither occur
• That is, the funds transfer must be atomic—it
must happen in its entirety or not at all. It is
difficult to ensure atomicity in a conventional
file-processing system.
Concurrent-access anomalies.
• For the sake of overall performance of the system and
faster response, many systems allow multiple users to
update the data simultaneously. Indeed, today, the largest
Internet retailers may have millions of accesses per day to
their data by shoppers. In such an environment, interaction
of concurrent updates is possible and may result in
inconsistent data.
Security problems.
• Not every user of the database system should be able to
access all the data. For example, in a university, payroll
personnel need to see only that part of the database that
has financial information. They do not need access to
information about academic records. But, since application
programs are added to the file-processing system in an ad
hoc manner, enforcing such security constraints is difficult
• These difficulties, among others, prompted the
development of database systems. In what
follows, we shall see the concepts and
algorithms that enable database systems to solve
the problems with file-processing systems.
Advantages of DBMS:
Controlling of Redundancy:
• Data redundancy refers to the duplication of data (i.e
storing same data multiple times). In a database system, by
having a centralized database and centralized control of
data by the DBA the unnecessary duplication of data is
avoided. It also eliminates the extra time for processing the
large volume of data. It results in saving the storage space
Improved Data Sharing :
• DBMS allows a user to share the data in
any number of application programs.
Data Integrity :
• Integrity means that the data in the database is accurate.
Centralized control of the data helps in permitting the
administrator to define integrity constraints to the data in
the database. For example: in customer database we can
can enforce an integrity that it must accept the customer
only from Noida and Meerut city
Security :
• Having complete authority over the operational
data, enables the DBA in ensuring that the only
mean of access to the database is through proper
channels. The DBA can define authorization
checks to becarried out whenever access to
sensitive data is attempted
Data Consistency :
• By eliminating data redundancy, we greatly reduce the
opportunities for inconsistency. For example: is a customer
address is stored only once, we cannot have disagreement
on the stored values. Also updating data values is greatly
simplified when each value is stored in one place only.
Finally, we avoid the wasted storage that results from
redundant data storage.
Efficient Data Access :
• In a database system, the data is managed
by the DBMS and all access to the data is
through the DBMS providing a key to
effective data processing
Enforcements of Standards
• With the centralized of data, DBA can
establish and enforce the data standards
which may include the naming conventions,
data quality standards etc
Data Independence :
• In a database system, the database management system
provides the interface between the application programs and
the data. When changes are made to the data representation,
the meta data obtained by the DBMS is changed but the
DBMS is continues to provide the data to application
program in the previously used way. The DBMs handles the
task of transformation of data wherever necessary.
Reduced Application Development and
Maintenance Time :
• DBMS supports many important functions
that are common to many applications,
accessing data stored in the DBMS, which
facilitates the quick development of
application.
Disadvantages of DBMS
1) It is bit complex. Since it supports multiple
functionality to give the user the best, the underlying
software has become complex. The designers and
developers should have thorough knowledge about
the software to get the most out of it
2) Because of its complexity and
functionality, it uses large amount of memory.
It also needs large memory torun efficiently
3) DBMS system works on the centralized
system, i.e.; all the users from all over the
world access this database. Hence any failure
of the DBMS, will impact all the users
4) DBMS is generalized software, i.e.; it is
written work on the entire systems rather
specific one. Hence some of the application
will run slow.

You might also like