PRACTICAL FILE OF DATABASE
ADMINISTRATOR
SUBMITTED TO: SUBMITTED BY:
PUNJAB TECHNICAL UNIVERSITY HARJIT KAUR
INDEX Sr. no
CONTENTS pages
1. Database Administration
2. Responsibilities of DBA
3. Database Administration Tools
4. ORACLE
a) Introduction
b) SQL Commands
c) Installation of oracle 10g
5. MY SQL
a) Introduction
b) Installation
6. Backup
7. Restore
8. SQL Server
a) Introduction
b) Installation
9. Php My Admin
a) Introduction
b) Installation
10. Export & Import
11. Database Migration
a) Introduction
b) Installation
12. Privileges
13. Workbench
Teacher’s signature
DATABASE ADMINISTRATOR
A database administrator (DBA) is a person responsible for installation,
the
configuration, upgrade, administration, monitoring and maintenance o
f databases in an organization.
In the other words Centralized control of the database is exerted by a
person or group of persons under the supervision of a high-level
administrator. This person or group is referred to as the database
administrator (DBA). They are the users who are most familiar with the
database and are responsible for creating, modifying, and maintaining its
three levels.
Database Administrator is responsible to manage the DBMS’s use
and ensure that the database is functioning properly. DBA is also
responsible for granting permission to the users of the database and
stores the profile of each user in the database.
The role includes the development and design of database strategies,
system monitoring and improving database performance and
capacity and planning for future expansion requirements. They may also
plan, co-ordinate and implement measures to safeguard the database.
The Other primary roles will include:
• Implementation of data models
• Database design
• Database accessibility
• Performance issues
• Capacity issues
• Data replication
• Table Maintainance
Responsibilities of DBA
• Deciding the information content of the database
It is the DBA’s job to decide exactly what information is to be held in
the database - in other words, to identify the entities of interest to the
enterprise and to identify the information to be recorded about those
entities. Having done this, the DBA must then define the content of
the database by writing the conceptual schema.
• Deciding the storage structure and access strategy
The DBA must also decide how the data is to be represented in the
database, and must specify the representation by writing the storage
structure definition. In addition, the associated mapping between
storage structure definition and the conceptual schema must also be
specified.
• Liaising with the users
It is the business of the DBA to liaise with users, to ensure that the
data they require is available, and to write the necessary external
schemas. In addition, the mapping between any given external
schema and the conceptual schema must also be specified. In practice
the external DDL will probably include the means for specifying the
mapping, but the schema and the mapping should be clearly
distinguishable.
• Defining authorization checks and validation
procedures
Authorization checks and validation procedures may be considered as
logical extensions of the conceptual schema. The conceptual DDL
will include facilities for specifying such checks and procedures.
• Defining a strategy for backup and recovery
Once an enterprise is committed to a database, it become critically
dependent on the successful operation of that system. In the event of
damage to any portion of the database – caused by human error, say,
or a failure in the hardware or supporting operating system – it is
essential to be able to repair the data concerned with a minimum of
delay and with as little effect as possible on the rest of the system.
• Monitoring performance and responsibilities to
changes in requirements
The DBA is responsible for so organizing the system as to get the
performance that is “best for the enterprise” and for making the
appropriate adjustments change. Any change to details of storage and
access must be accompanied by a corresponding change to the
definition of the mapping to storage, so that the conceptual schema
may remain constant.
DATABASE ADMINISTRATOR TOOLS
DBA works with two tools:
• Server Tools
• Client Tools
Server Tools
It includes the followings:
• Oracle Server
• MySql Enterprise
• Sql Server
Client Tools
It includes the followings:
• phpmyadmin
• MySql command shell
• MySql workbench
• MySql webmin module
• Emma
INRODUCTION OF ORACLE
An Oracle database is a collection of data treated as a unit. The purpose
of a database is to store and retrieve related information. A database
server is the key to solving the problems of information management. In
general, a server reliably manages a large amount of data in a multiuser
environment so that many users can concurrently access the same data.
All this is accomplished while delivering high performance. A database
server also prevents unauthorized access and provides efficient solutions
for failure recovery.
Oracle Database is the first database designed for enterprise grid
computing, the most flexible and cost effective way to manage
information and applications. Enterprise grid computing creates large
pools of industry-standard, modular storage and servers. With this
architecture, each new system can be rapidly provisioned from the pool
of components. There is no need for peak workloads, because capacity
can be easily added or reallocated from the resource pools as needed.
A DBMS must also be secure from unauthorized access and provide
efficient solutions for failure recovery. The ORACLE Server provides
efficient and effective solutions for the major database features.
ORACLE consists of many tools that allow you to create an application
with ease and flexibility. You must determine how to implement your
requirements using the features available in ORACLE, along with its
tools.
The features and tools that you choose to use to implement your
application can significantly affect the performance of your application.
Several of the more useful features available to ORACLE application
developers are integrity constraints, stored procedures and packages,
database triggers, cost-based optimizer, shared SQL, locking and
sequences.
STRUCTURED QUERY LANGUAGE
COMMANDS
• DATA DEFINITION LANGUAGE ( DDL )
Data Definition Language (DDL) statements are used to define the
database structure or schema. Some examples:
• CREATE : It is used to create objects in the database.
• ALTER : It is used to alters the structure of the database.
DROP : It is used to delete objects from the database.
Syntax -- DROP INDEX table_name.index_name
ROLLBACK:
GRANT:
Installation of Oracle 10g
Steps to install oracle
• Preparing to Install.
• WELCOME WINDOW OPEN, CLICK ON NEXT TO PROCESSED
• ACCECPT LICENSE AGREEMENT
• CHOOSE DESTINATION LOCATION
• CLICK INSTALL TO COMPLTETE INSTALLATION
• NOW SETUP STATUS WINDOW OPEN AND INSTALL ALL FILES
• CLICK FINISH TO COMPLETE THE INSTALLATION
•
Log into Express Engine with a Username-System and Password-root.
Select SQL Commands for query browser.
Open SQL Commands for query browser.
INTRODUCTION OF MYSQL Administrator
MySQL is the world's most widely used open-source relational database
management system (RDBMS) that runs as a server providing multi-
user access to a number of databases, though SQLite probably has more
total embedded deployments. The SQL phrase stands for Structured
Query Language
MySQL Administrator is a program for performing administrative
operations, such as configuring, monitoring and starting and stopping a
MySQL server, managing users and connections, performing backups,
and a number of other administrative tasks. Most tasks can be performed
using a command-line client such as mysqladmin, or mysql, but MySQL
Administrator has the following advantages:
• Its graphical user interface makes it more intuitive.
• It provides a better overview of the settings that are crucial for the
performance, reliability, and security of your MySQL servers.
• It displays performance indicators graphically, thus making it easier to
determine and tune server settings.
MySQL Administrator is designed to work with MySQL versions 4.0
and higher. MySQL Administrator is, to a large extent, the result of
feedback received from many users over a period of several years. There
are so many features of mysql some of them are:
• Cross-platform support
• Triggers
• Cursors
• Updatable views
• Information schema
• Independent storage engines
• Replication support
INSTALLATION OF MYSQL ENTERPRISE
Steps to install MySql
• Welcome window is open click next to install
• Now select the program maintainance
• Now click on install to modify the program.
• Click on finish to complete the installation.
BACKUP In information technology, a backup, or the process of backing
up, refers to the copying and archiving of computer data so it
may be used to restore the original after a data loss event.
Backups have two distinct purposes. The primary purpose is to
recover data after its loss, be it by data deletion or corruption.
Data loss can be a common experience of computer users. The
secondary purpose of backups is to recover data from an earlier
time, according to a user-defined data retention policy,
typically configured within a backup application for how long
copies of data are required. Though backups popularly
represent a simple form of disaster recovery, Since a backup
system contains at least one copy of all data worth saving, the
data storage requirements can be significant. Organizing this
storage space and managing the backup process can be a
complicated undertaking. A data repository model can be used
to provide structure to the storage. Nowadays, there are many
different types of data storage devices that are useful for
making backups. There are also many different ways in which
these devices can be arranged to provide geographic
redundancy, data security, and portability.
Step 1:
Step 2:
Step 3:
Step 4:
-
Step 5:
Step 6:
RESTORE
In data management, restore is a process that involves copying
backup files from secondary storage (tape, zip disk or other
backup media) to hard disk. A restore is performed in order to
return data to its original condition if files have become
damaged, or to copy or move data to a new location. One should
backup one's wiki regularly, even if one never needs to restore
it: backups provide peace of mind. However, a backup is useless
if one cannot restore, and practice restoring a backup prevents
later anguish. Data Restore is the process of salvaging and
handling the data through the data from damaged, failed,
corrupted, or inaccessible secondary storage media when it
cannot be accessed normally. Often the data are being salvaged
from storage media such as internal or external hard disk drives,
solid-state drives (SSD), USB flash drive, storage tapes, CDs,
DVDs, RAID, and other electronics. Recovery may be required
due to physical damage to the storage device or logical damage
to the file system that prevents it from being mounted by the
host operating system (OS).
The most common data recovery scenario involves an operating
system failure, accidental damage etc. (typically on a single-
disk, single-partition, single-OS system), in which case the goal
is simply to copy all wanted files to another disk
Step 1:
Step 2:
Step 3:
INTRODUCTION OF SQL SERVER
SQL Server is Microsoft's relational database management system
(RDBMS). It is a full-featured databse primarily designed to compete
against competitors Oracle Database (DB) and MySQL.
Like all major RBDMS, SQL Server supports ANSI SQL, the
standard SQL language. However, SQL Server also contains T-SQL, its
own SQL implemention. SQL Server Management Studio (SSMS)
(previously known as Enterprise Manager) is SQL Server’s main
interface tool, and it supports 32-bit and 64-bit environments.
SQL Server is sometimes referred to as MSSQL and Microsoft
SQL Server. SQL Server is offered in several editions with different
feature set and pricing options to meet a variety of user needs, including
the following:
Enterprise: Designed for large enterprises with complex data
requirements, data warehousing and Web-enabled databases. Has all the
features of SQL Server, and its license pricing is the most expensive.
Standard: Targeted toward small and medium organizations. Also
supports e-commerce and data warehousing.
Workgroup: For small organizations. No size or user limits and may be
used as the backend database for small Web servers or branch offices.
Express: Free for distribution. Has the fewest number of features and
limits database size and users. May be used as a replacement for an
Access database.
INSTALLATION OF MYSQL SERVER
• Welcome window will open click next to install.
Enter the computer name where you want to install.
•
• Now select the one option for installation.
• Now fill the user information.
• Then accept the Lincense agreement.
• Select one of the insatllation defination.
• Put a instance name.
• Select the type of setup.
• Set the serves accounts.
• Choose the authentication mode
• Copying files window open click next to proceesed.
• Choose the lincense mode.
INTRODUCTION OF PHPMYADMIN
PhpMyAdmin is a free and open source tool written in PHP intended to
handle the administration of MySQL with the use of a web browser. It
can perform various tasks such as creating, modifying or deleting
databases, tables, fields or rows; executing SQL statements; or managing
users and permissions.
FEATURES OF PHPMYADMIN
• Web interface
• MySQL database management
• Import data from CSV and SQL
• Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC
26300 – Open Document Text and Spreadsheet, Word, Excel,
LaTeX and others
• Administering multiple servers
• Creating PDF graphics of the database layout
• Creating complex queries using Query-by-Example (QBE)
• Searching globally in a database or a subset of it
• Transforming stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link.
• Live charts to monitor MySQL server activity like connections,
processes, CPU/Memory usage, etc.
INSTALLATION OF PHPMYADMIN
Steps to install phpmyadmin
• Welcome window shown click next to install.
• Click on I agree to accept the license agreement.
• Now choose the location where you want to install.
• Now select the components and click next to processed.
• Now fill the information of apache HTTP server and click on next.
• Now
configure the mysql server by enter the password root and then click on install.
• Installation is absorbed.
• After Installation
Create Database
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Step 6:
Step 7:
Step 8:
Step 9:
EXPORT AND IMPORT
You can import data that you get from other applications into your web
office database and export data from the database into other applications.
Importing copies existing data from a text file to your database;
exporting copies information from your database to a text file.
Importing existing data saves you the trouble of typing it in by hand.
You may need to import data only once, right before people start to use
the database. For example, if you create a Customer Relationship
Management (CRM) database, you could import existing customer
information into it. You may also need to regularly import data, for
example, from a weekly sales report.
Exporting data allows you to use information from your database in
another application outside your web office. For example, you may want
to export data so that you can open it in Microsoft Excel® for charting
or further analysis. Exporting is also an easy way to create a local
backup of the data in your database.
Import and Export file formats
The Database application imports data from and exports data to text
files, using the two most common text file formats:
Comma
separated
values (CSV)
In this format, commas separate the field
values. The names of CSV files usually end
with the extension .CSV. Many software
applications, like Microsoft Excel®, open
and save .CSV files.
Tab delimited In this format, tabs separate the field values.
The names of tab-delimited files usually end
with the extension .TXT. Many software
applications, like Excel and Microsoft.
1.
2.
3.
4.
5.
6.
Database Migration
Data migration is the process of transferring data between
storage types, formats, or computer systems. It is a key
consideration for any system implementation, upgrade, or
consolidation. Data migration is usually performed
programmatically to achieve an automated migration, freeing up
human resources from tedious tasks. Data migration occurs for a
variety of reasons, including: Server or storage equipment
replacements or upgrades; Website consolidation; Server
maintenance; and Data center relocation.
To achieve an effective data migration procedure, data on the
old system is mapped to the new system providing a design for
data extraction and data loading. The design relates old data
formats to the new system's formats and requirements.
Programmatic data migration may involve many phases but it
minimally includes data extraction where data is read from the
old system and data loading where data is written to the new
system.
Categories
Data is stored on various media in files or databases, and is
generated and consumed by software applications which in turn
support business processes. The need to transfer and convert
data can be driven by multiple business requirements and the
approach taken to the migration depends on those requirements.
Four major migration categories are proposed on this basis.
Storage migration
A business may choose to rationalize the physical media to take
advantage of more efficient storage technologies. This will
result in having to move physical blocks of data from one tape
or disk to another, often using virtualization techniques. The
data format and content itself will not usually be changed in the
process and can normally be achieved with minimal or no
impact to the layers above.
Database migration
Similarly, it may be necessary to move from one database
vendor to another, or to upgrade the version of database
software being used. The latter case is less likely to require a
physical data migration, but this can happen with major
upgrades. In these cases a physical transformation process may
be required since the underlying data format can change
significantly.
Application migration
Changing application vendor – for instance a new CRM or ERP
platform – will inevitably involve substantial transformation as
almost every application or suite operates on its own specific
data model. Further, to allow the application to be sold to the
widest possible market, commercial off-the-shelf packages are
generally configured for each customer using metadata.
Application programming interfaces (APIs) are supplied to
protect the integrity of the data they have to handle.
Business process migration
Business processes operate through a combination of human and
application systems actions, often orchestrated by business
process management tools. When these change they can require
the movement of data from one store, database or application to
another to reflect the changes to the organization and
information about customers, products and operations. Examples
of such migration drivers are mergers and acquisitions, business
optimization and reorganization to attack new markets or
respond to competitive threat.
Installation of Migration
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
PRIVILEGES A privilege is a right to execute a particular type of SQL
statement or to access another user's object. Some examples of
privileges include the right to:
• Connect to the database (create a session)
• Create a table
• Select rows from another user's table
• Execute another user's stored procedure
You grant privileges to users so these users can accomplish tasks
required for their job. You should grant a privilege only to a user
who absolutely requires the privilege to accomplish necessary
work. Excessive granting of unnecessary privileges can
compromise security. A user can receive a privilege in two
different ways:
Because roles allow for easier and better management of
privileges, you should normally grant privileges to roles and not
to specific users.
There are two distinct categories of privileges:
• System privileges
• Schema object privileges
1.
2.
3.
WORKBENCH
MySQL Workbench is a visual database design tool that integrates SQL development, administration, database design, creation and maintenance into a single integrated development environment for MySQL database system.
MySQL Workbench 5.0 and 5.1 are specialized visual database design tools for the MySQL database. While MySQL Workbench 5.0 was a MS Windows only product cross-platform support was added to MySQL Workbench
Starting with MySQL Workbench 5.2 the application has evolved to a general database GUI application. Apart from physical database modeling it features a SQL Editor, database migration tools, a database server administration interface, replacing the old MySQL GUI.
Features of workbench
• Database Connection & Instance Management
• Schema object browsing, inspection, and search
• Data modeling
• Reverse engineering from SQL Scripts and live database
• Forward engineering to SQL Scripts and live database
Schema synchronization
Printing of models
• Database administration
• Start and stop of database instances
• Instance configuration
• Database account management
• Instance variables browsing
• Performance monitoring
• Performance Schema metrics
Installation of workbench
Step 1:
Step 2:
Step 3:
Step 4:
Step 5: