Java Tutorial – 8 | Edureka

Java Tutorial – 8 | Edureka

FavoriteLoadingAdd to favorites

Take instructor-led Live class on Java Tutorial at :

Java468x60

The following topics were covered in this Java Tutorial:

Sql Basics, Databas, JDBC Connection, Insert query, Update query, Delete Query and Sql functions.

Database:
Database is a collection of data in an organized way so that we can update, modify data present in database easily. You can update it, modify it, insert rows, delete rows in your database and you can manage your database easily. Data stored in database is permanent until you delete the database. Oracle, MySQL, MS-Access, DB2, Sybase are the different databases available.

Why do we need database? – Database is used to store and whenever required it will retrieve data from database and use it in your application.

How to store data in database?
Data will be stored in “Tables” in database in the form of “Records”. One by one you will add rows to the table. Each row is called a record. Table is a collection of relational data in 2D i.e in the form of rows and columns. i.e first we create a database and then create a table in that, later store data in the table.
SQL ( Structure Query Language):
SQL is a language used to access and modify the data stored in database. It uses statements to access the database. All the things like insert data into database, retrieving data from database, updating and deleting can be done using SQL statements. SQL Statements can be divided into two types: DDL, DML
DDL (Data Definition language):
DDL statements are used for creation or deletion of database. The commands present in DDL are: Create, Alter, Drop.

DML (Data Manipulation Language):
These statements are used for managing the data in database. The commands present in DDL are: Insert — to insert the values in the table of database. We use “insert” keyword for this.
Update-to update the record or column in the table by specifying the condition so that the database knows where to update. We use “update” keyword for this.
Delete – to delete the record(one or many) in the table by specifying the condition so that the database knows which record to be deleted. We use “delete” keyword for this
Select — to retrieve the records from the table. You can retrieve either all the columns or specific columns of the table. You can apply conditions while retrieving records. We use “select” keyword for this

How to write a program in jdbc?
Register the Driver i.e connecting to DSN that you have actually created.
Connecting to database i.e we use an object of connection interface and establish connection
Create SQL statement in java i.e create statements and prepared statement
Execute SQL statements i.e writing queries for inserting , deleting, updating, retrieving
Retrieve Result i.e store the retrieved values from ResultSet.
Close Connection i.e close the connection after the task is completed.

Please write back to us at support@edureka.in or call us at +91-8880862004 for more information.

Visit –

source

By |2020-02-28T01:59:44+00:00February 28th, 2020|Java Video Tutorials|6 Comments

6 Comments

  1. Srikanth RB February 28, 2020 at 1:59 am - Reply

    I created "system DSN" and after that i see that "C:WindowsSysWOW64adbcad32.exe" path is missing. Also no suitable driver found exception error is thrown

    Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:odbc:srikanth
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at database.dbconnection.main(dbconnection.java:11)

  2. faiyaz meghreji February 28, 2020 at 1:59 am - Reply

    hello vineet sir i would like to join your class for android…and advance java..!

  3. faiyaz meghreji February 28, 2020 at 1:59 am - Reply

    suppperb …i learnt a lott from it..without any cost and my oops funda have cleared ..thanks a lottttttt…sir..

  4. aman chourasiya February 28, 2020 at 1:59 am - Reply

    They helped me a lot

  5. Kenneth chibuike Ochiabuto February 28, 2020 at 1:59 am - Reply

    i have been following your tutorial from 1-8 ,it has been very helpful to me ,i would like to say very big thank you for the resource.

  6. Warrio W February 28, 2020 at 1:59 am - Reply

    You really need to make an effort in naming your variables. They have to be explicit from the first sight. abc or vineet is not explicit even if it is only an example.

Leave A Comment

*