filmov
tv
Java Tutorial - 8 | Edureka
Показать описание
Take instructor-led Live class on Java Tutorial at :
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.
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.
Комментарии