What is difference between Database and DBMS?
Database is a collection of interrelated data. Database Management system is a software which can be use manage the data by sorting it on the database.How could be executed when we send a query to Database?
Database engine take the following step- Query Tokenization
- Query Passing
- Query Optimization
- Query Execution
What is JDBC drivers?
JDBC drivers are processes of interaction with database and java application.
How many types of JDBC drivers?
There are
- JDBC-ODBC Driver
- Native Driver
- Middel-ware Driver
- Pure Java Driver
What is JDBC and what are the step write JDBC application?
The process of interacting with database from a java application is called JDBC.To interacting with database from java application we use following steps..
- Load and register driver
- Establish connection between a java application and the database
- Prepare either statement object or prepare statement or callable statement object as per the application requirement.
- Write and execute sql queries.
- Terminate the connection which we have established.
How to execute SQL Queries from a java application?
To execute the sql queries we will use the following methods from Statement object.
- st.executeQuery(....)
- st.executeUpadte(....)
- st.execute(.....)
What are the difference between executeQuery(), executeUpdate() and execute() methods?
execute() :- When we use selection group sql with the execute() then we will get Resultset object at heap memory with the fetched data.public boolean execute(String sql Query)
executeUpdate() :- Where executeUpdate() can be used to execute group of sql query to update the database.
public int executeUpdate(String sql query)
executeQuey():- where executequery() can be used to execute selection group sql queries to fetch the data from database.
public ResultSet executeQuery(sql statement)
No comments:
Post a Comment