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

DB2

Database 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DB2

Database 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DB2

What is Relational Database?


A relational database is based on the principle of relation and relation can be anything.
For example, there can be a relation between rows and columns or there can be a relation
between tables.
Relational database follows the principle of RDBMS. RDBMS is a relational database
management system.
DB2 also follows this particular principle:
DB2 is a product of IBM and most of the time it runs on IBM mainframes. we use this in
assembly language that is AS400 Or runs in Linux environment. The Developer of DB2 is
IBM. It was released in 1983 initially and it is a type of RDBMS.
What is IBM Db2?
IBM Db2 is the cloud-native database built to power low-latency transactions, real-
time analytics and AI applications at scale. Built on decades of innovation in data security,
governance, scalability and availability, it provides a single engine for database
administrators, enterprise architects and developers to:

- Build the next generation of mission-critical applications across any cloud, with
continuous availability and zero downtime when migrating to hybrid deployments.
- Simplify development with support for all modern data types, workloads and
programming languages.
- Enable faster decisions with support for open formats such as Apache Iceberg to
securely share data and metadata across teams.
- Deploy AI at scale with built-in machine learning (ML) capabilities and IBM
watsonx™ integration for generative artificial intelligence (AI).
IBM Db2 helps you quickly build and deploy mission-critical applications in your
organization. It supports both operational and analytic workloads. The in-memory computing
of DB2 is a good feature for high performance and scalability to meet complex business
requirements.

Types of SQL operation in db2:-


There are four types of SQL operations In DB2:-
DDL in DB2:-
We have three types of DDL statements in DB2
i) Create Statement – We use this statement to create a table or view or synonyms or alias.
ii) Alter Statement – This DDL statements in DB2 changes the property of the table, along
with Alter we can use ALTER TABLE, ALTER VIEW, ALTER SYNONYM, and ALTER
ALIAS.
iii) Drop Statement – This statement drop the table, along with Drop we can use DROP THE
TABLE, DROP THE VIEW and DROP THE SYNONYMS.
When we use DROP, the drop statement completely drops the table from the database. While
DELETE is just a logical delete and it is a DML operation.

DML in DB2:-
DML is data manipulation language. In DML we have four types of statement.
i) INSERT– We can insert the records into the table.
ii) UPDATE– we can update a particular record based on particular condition and these
conditions are all optional.
iii) DELETE– It is just a logical delete and it is a DML operation.
iv) SELECT– It is used to select a particular column or group of a column in a table.
DCL Operations in DB2:-

It is a Data Control Language. Mostly DBA uses GRANT REVOKE DCL, to give
access to a particular area or table or public or particular group of users. You can also revoke
the axis that is you can take back the access from a particular user or from the public using
REVOKE.
TCL Operations in DB2:-

It is a TRANSACTION CONTROL LANGUAGE. and it is not used directly in DB2,


rather it is used in COBOL DB2 program inside the application program. Once you have
created the COBOL DB2 program inside the program we can use DCL operation.
In TCL we have two statements:
i) COMMIT– It is used in an application program to commit the changes. For Example, if
you want to COMMIT changes at a particular point, you can just give COMMIT in the
program.
ii) ROLLBACK– It is used in the application program to roll back the changes.
ROLLBACK has used to blackout the changes.

You might also like