Sunday, February 4, 2018

Types of supported JDBC Operations In Spring

On a RDBMS, we can perform various types of operations, among which while working with JDBC, we will most work on Data Manipulate and Data Query Language statements rather the other two. Let us detail which type of operations we perform in the below section.

1) Data Definition Language (DDL) – DDL statements are used for creating new schema or tables in a schema, this indicates these statements are used
for setting up the database and its tables required for storing the data of your application. When we use JDBC, we try to access the existing
data in a database rather creating a new database from Java Language, so we don’t need to experiment on DDL.

2) Data Manipulation Language (DML) – These are the statements that supports inserting/manipulating/removing the data from the existing database
tables. Here we might insert a single record/a set of records (bulk operations) into the database, spring jdbc supports both the types of
operations.

3) Data Query Language (DQL) – This is used for querying information from a database table. There are different types of query operations we can
perform on a table as below.
a. Aggregate operations (COUNT, AVG, SUM etc.)
         b. Select a column in a row
         c. Select a row as object
         d. Select list of values/objects
4) Data Control Language (DCL) – Data Control Language is used for granting or revoking the access to various database objects in a database. This would be generally done by a Database administrator, so it would not be appropriate to perform these operations through JDBC.

So based on above described database operations that can be done on JDBC we would try to perform these operations using JdbcTemplate, NamedParameterJdbcTemplate and with all other approaches as well in the following sections.

Thanks for reading. If you like this post please follow us for more updates about technology related updates.

No comments: