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

Database Languages

Uploaded by

balwant kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Database Languages

Uploaded by

balwant kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Database Languages in DBMS

o A DBMS has appropriate languages and interfaces to express database queries and
updates.

o Database languages can be used to read, store and update the data in the database.

Types of Database Languages

1. Data Definition Language (DDL)

o DDL stands for Data Definition Language. It is used to define database structure or
pattern.

o It is used to create schema, tables, indexes, constraints, etc. in the database.

o Using the DDL statements, you can create the skeleton of the database.

o Data definition language is used to store the information of metadata like the number
of tables and schemas, their names, indexes, columns in each table, constraints, etc.

Here are some tasks that come under DDL:

o Create: It is used to create objects in the database.

o Alter: It is used to alter the structure of the database.

o Drop: It is used to delete objects from the database.


o Truncate: It is used to remove all records from a table.

o Rename: It is used to rename an object.

o Comment: It is used to comment on the data dictionary.

These commands are used to update the database schema that's why they come under Data
definition language.

2. Data Manipulation Language (DML)

DML stands for Data Manipulation Language. It is used for accessing and manipulating data
in a database. It handles user requests.

Here are some tasks that come under DML:

o Select: It is used to retrieve data from a database.

o Insert: It is used to insert data into a table.

o Update: It is used to update existing data within a table.

o Delete: It is used to delete all records from a table.

o Merge: It performs UPSERT operation, i.e., insert or update operations.

o Call: It is used to call a structured query language or a Java subprogram.

o Explain Plan: It has the parameter of explaining data.

o Lock Table: It controls concurrency.

3. Data Control Language (DCL)

o DCL stands for Data Control Language. It is used to retrieve the stored or saved data.

o The DCL execution is transactional. It also has rollback parameters.

(But in Oracle database, the execution of data control language does not have the feature of
rolling back.)

Here are some tasks that come under DCL:

o Grant: It is used to give user access privileges to a database.


o Revoke: It is used to take back permissions from the user.

There are the following operations which have the authorization of Revoke:

CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.

4. Transaction Control Language (TCL)

TCL is used to run the changes made by the DML statement. TCL can be grouped into a
logical transaction.

Here are some tasks that come under TCL:

o Commit: It is used to save the transaction on the database.

o Rollback: It is used to restore the database to original since the last Commit.

OR
Different types of DBMS languages

Once data is stored or filled it requires manipulation like insertion, deletion, updating, and
modification of data. For these operations a set of languages are provided by the database
management system (DBMS). So, the database languages are used to read, update and store
data in the database.

The different types of DBMS languages are as follows −

 Data Definition Language (DDL) − Create, Drop, Truncate, Rename.

 Data Manipulation language (DML) − Select, Insert, Delete, Update.

 Data Control Language (DCL) − Revoke, Grant.

 Transaction Control Language (TCL) − Rollback, Commit.


The DBMS languages are pictorially represented as follows −

Data Definition Language (DDL)

It is a language that allows the user to define the data and their relationship to other types of
data. The DDL commands are: Create, Alter, Rename, Drop, Truncate.

Data Manipulation Language (DML)

It is a language that provides a set of operations to support the basic data manipulation
operation on data held in the database. The DML commands are: Insert, delete, update, select,
merge, call.

Data Control Language (DCL)

DCL is used to access the stored data. It is mainly used for revoke and grant the user access
to a database. The DCL commands are: Grant, Revoke.

Transaction Control Language (TCL)


TCL is a language which manages the transactions within the database. It is used to execute
the changes made by the data manipulation language statements. The TCL commands are:
Commit, Rollback.

OR

DBMS must provide appropriate languages and interfaces for each category of users to
express database queries and updates. Database Languages are used to create and maintain
database on computer. There are large numbers of database languages like Oracle, MySQL,
MS Access, dBase, FoxPro etc. SQL statements commonly used in Oracle and MS Access
can be categorized as data definition language (DDL), data control language (DCL) and data
manipulation language (DML).

We’ll be covering the following topics in this tutorial:

 Data Definition Language (DDL)

 Data Manipulation Language (DML)

 Data Control Language (DCL)

Data Definition Language (DDL)

It is a language that allows the users to define data and their relationship to other types of
data. It is mainly used to create files, databases, data dictionary and tables within databases.

It is also used to specify the structure of each table, set of associated values with each
attribute, integrity constraints, security and authorization information for each table and
physical storage structure of each table on disk.

The following table gives an overview about usage of DDL statements in SQL
Data Manipulation Language (DML)

It is a language that provides a set of operations to support the basic data manipulation
operations on the data held in the databases. It allows users to insert, update, delete and
retrieve data from the database. The part of DML that involves data retrieval is called a query
language.

The following table gives an overview about the usage of DML statements in SQL:

Data Control Language (DCL)

DCL statements control access to data and the database using statements such as GRANT and
REVOKE. A privilege can either be granted to a User with the help of GRANT statement.
The privileges assigned can be SELECT, ALTER, DELETE, EXECUTE, INSERT, INDEX
etc. In addition to granting of privileges, you can also revoke (taken back) it by using
REVOKE command.

The following table gives an overview about the usage of DCL statements in SQL:

In practice, the data definition and data manipulation languages are not two separate
languages. Instead they simply form parts of a single database language such as Structured
Query Language (SQL). SQL represents combination of DDL and DML, as well as
statements for constraints specification and schema evaluation.
What Does Database Administration Mean?

Database administration refers to the whole set of activities performed by a database


administrator to ensure that a database is always available as needed. Other closely related
tasks and roles are database security, database monitoring and troubleshooting, and planning
for future growth.

A database administrator, or DBA, is responsible for maintaining, securing, and operating


databases and also ensures that data is correctly stored and retrieved.

Database Administration

The database administrator (DBA) is usually a dedicated role in the IT department for large
organizations. However, many smaller companies that cannot afford a full-time DBA usually
outsource or contract the role to a specialized vendor, or merge the role with another in the
ICT department so that both are performed by one person.

The primary role of database administration is to ensure maximum up time for the database
so that it is always available when needed. This will typically involve proactive periodic
monitoring and troubleshooting. This in turn entails some technical skills on the part of the
DBA. In addition to in-depth knowledge of the database in question, the DBA will also need
knowledge and perhaps training in the platform (database engine and operating system) on
which the database runs.

A DBA is typically also responsible for other secondary, but still critically important, tasks
and roles. Some of these include:

 Database Security: Ensuring that only authorized users have access to the database
and fortifying it against any external, unauthorized access.

 Database Tuning: Tweaking any of several parameters to optimize performance, such


as server memory allocation, file fragmentation and disk usage.

 Backup and Recovery: It is a DBA’s role to ensure that the database has adequate
backup and recovery procedures in place to recover from any accidental or deliberate
loss of data.
 Producing Reports from Queries: DBAs are frequently called upon to generate reports
by writing queries, which are then run against the database.

It is clear from all the above that the database administration function requires technical
training and years of experience. Some companies that offer commercial database products,
such as Oracle DB and Microsoft’s SQL Server, also offer certifications for their specific
products. These industry certifications, such as Oracle Certified Professional (OCP) and
Microsoft Certified Database Administrator (MCDBA), go a long way toward assuring
organizations that a DBA is indeed thoroughly trained on the product in question. Because
most relational database products today use the SQL language, knowledge of SQL commands
and syntax is also a valuable asset for today’s DBAs.

In addition, DBAs often work with developers to design and implement new features and
troubleshoot any issues. A DBA must have a strong understanding of both technical and
business needs.

The role of DBA is becoming increasingly important in today’s information-driven business


environment. Thoroughout the world, more and more organizations depend on data to
discover analytical insights on market conditions, new business models, and cost-cutting
measures. The global cloud computing market is also expected to expand as companies move
their business operations to the cloud. Consequently, the need for qualified DBAs will only
continue to grow.

Different types of DBAs

There are several types of database administrators, each with specific duties and
responsibilities. The most common types of DBAs include system administrators, database
architects, database analysts, data modelers, application DBAs, task-oriented DBAs,
performance analysts, data warehouse administrators, and cloud DBAs.

 System administrators are responsible for the overall management and upkeep of a
computer system, including installing and configuring software, applying security
patches, and monitoring system performance.

 Database architects design databases to meet the specific needs of an organization.


 Database analysts collect and analyze data to help improve database performance.
They may also be responsible for developing reports and providing recommendations
to database administrators.

 Data modelers create and maintain data models that depict the relationship between
data elements. Data modeling is a critical component of effective database design.

 Application DBAs are responsible for administrating databases that support


applications. Specific tasks include installing and configuring applications, ensuring
that data is synchronized correctly between databases, and troubleshooting
application-related issues.

 Task-oriented DBAs focus on a particular area of database administration, such as


backup and recovery, security, or performance tuning. They typically have in-depth
knowledge of a specific database management system (DBMS).

 Performance analysts monitor database performance and identify areas where


improvement is needed. They may also be responsible for creating performance
reports and providing recommendations to database administrators.

 Data warehouse administrators manage databases that store data for business
intelligence or decision-support applications. They are responsible for extracting data
correctly, transforming the data, and loading it into the data warehouse.

 Cloud DBAs are responsible for administrating databases hosted in a cloud computing
environment, provisioning and managing database instances, setting up replication
and high availability, and monitoring database performance.

What is Database Administration?

Database administration refers to the set of activities that are performed by a database
administrator ensuring a 24*7 availability of databases to be used as and when required. The
primary database administration is to maintain and manage the database management system
software. Mainstream databases like Oracle, IBM DB2, Microsoft SQL Server require
consistent and ongoing management. This brings up a lot of career opportunities for IT
professionals called DBAs or database administrators.
Our SQL Server DBA Online Course is meticulously designed for beginners and
professionals who wanted to start/empower their skillset on SQL Server Database
Administration

Roles of Database Administrator in DBMS

The roles of a database administrator is quite a crucial one. From managing and maintaining
databases to ensuring zero data loss, there are several roles that a database administrator
fulfills. Some of the primary roles include:

1. Designing, implementing, and maintaining

The first and foremost role that a database administrator plays in designing, implementing,
and side by side maintaining the complete database to fit the needs of the organization.

This role includes setting up compatible IT infrastructure for the upcoming database and
related applications, installing the database management system, etc.

2. Policy establishing role

Establishing procedures and policies is quite crucial to ensuring an efficient database


management system. The majority of policies must be established keeping in mind security,
management, maintenance, and other important aspects of DBMS.

3. Training and development

The database administrator or the DBA group is also responsible to conduct enterprise-wide
training and development sessions on the newly designed database. The purpose is to
introduce and instruct employees on how to use the new infrastructure.

4. Conflict resolution

Since a database administrator knows about the database in and out, it becomes his or her
responsibility to resolve any conflicts that may arise out of any situation with users. This role
includes troubleshooting, conducting root cause analysis, and taking all and any measures to
ensure maximum optimization of the available resources to bring about the highest
performance and efficiency.

5. Database backup

Another important role of a database administrator is to ensure that the data is always backed
up and allows fast recovery of data in case a failure happens. Also, it is the prime
responsibility of a database administrator to secure and protect the data from any failures or
intrusion.

Types of Database Administration

There are a large number of DBAs that exist in the system and can be customized as per
specific organizational needs. However, there are 8 broad categories that apply generally to
all organizations. These are:

#1. System DBA

This is a more technical role that focuses on the technical aspect of the database. A system
DBA is proficient in handling queries related to implementation, installation, tuning, and
settling, and storage-related issues.

#2. Database architect

The DBA that focuses more on the design and implementation aspect of the database is a
database architect.

#3. Database analyst

Database analyst is commonly used for junior professionals of the database. Also, many
companies prefer calling a database architect a database analyst.

#4. Application DBA

Application DBAs are the troubleshooters of the current database. They are proficient in
handling all the queries relating to SQL bugs etc.

#5. Task-oriented DBAs

Task-oriented refers to specializing in a particular domain, these DBAs are more skilled in a
given domain and are experts of it.

#6. Performance analysts

The database administrator who focuses on monitoring the performance and improving it by
taking desired measures is a performance analyst. This role can also be covered under task-
oriented DBAs also. The most important skill these DBAs possess is exceptional SQL
coding.

#7. Data warehouse administrator

Though this DBA is well-equipped with the desired skills and knowledge base, he or she is
more capable of handling the warehouse queries.

#8. Cloud DBA

A cloud DBA has grown popular with the increasing number of people migrating to the
cloud. He or she is a general-purpose DBA with knowledge of cloud services

Read these latest SQL Server DBA Interview Questions that helps you grab high-paying
jobs!

Database Administrator Responsibilities

Some of the major responsibilities of a database administrator are:

1. Creating and administering databases by identifying user needs

2. Ensuring efficient, effective, and error-free operation of the database

3. Consistently testing the database for adding any new modifications that may be required
as per user needs

4. Regular maintenance of database and permissions related to updating

5. Consolidating multiple databases into a refreshed and larger one

6. Ensure data restoration and 24*7 back up to avoid any data loss

Skills required to become Database Administrator

To become a DBA, having a bachelor’s degree in computer science or information science


from an accredited university is a plus point. Having hands-on industry experience with on-
job training on a database product will give you extra credits and support. However, if you
have relevant and extensive industry experience, having a bachelor’s degree will no longer be
a mandate. You are expected to have experience across leading DBMS products like:

 IBM DB2

 Oracle
 Microsoft SQL server

 MongoDB

 PostgreSQL

 MySQL

And possess knowledge across technologies like:

 SAP

 Linux

 z/OS

Career & Job opportunities of Database Administrators

Database administration is a highly rewarding role that is wanted by a majority of


organizations. Several roles can be taken up like

 computer and information systems managers

 computer programmers

 computer network architects

 financial analysts

 computer system analysts

 market research analysts

You might also like