GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

JDBC

Simran Khinvasara JFST Englisch 15 Karten

Karten in diesem Stapel (15)

  1. 1JDBC1.Java API used to interact with databases
    2. Works with multiple drivers to connect with multiple databases
  2. 2Connection PoolingReuse database connection
    Better Performance
  3. 3Batch Process1.Combine the queries as a batch(block) and send the complete batch to database instead of sending single query
    2. Faster in execution
    3. addBatch() method
  4. 4JDBC Architecturejava program
    |
    jdbc api
    |
    jdbc Driver manager
    |
    jdbc Driver
    |
    Database
  5. 52 main package1. java.sql
    2. javax.sql
  6. 6Classes and Interfaces1. CLASS -- DriverManager
    2. INTERFACES -- i.Driver
    ii. Connection
    iii. Statement
    iv. ResultSet
  7. 77 Steps in Using JDBC1. Load the driver -- database specific
    2. Define a connection URL
    3. Establish the connection -- create an obj
    4. Create a Statement Object
    5. Execute a query
    6. Process the resultSet
    7. Close the connection
  8. 8Types of statements in JDBC1. Statement
    2. Prepared Statement
    3. Callable Statement
  9. 9What is Statement1. Interface representing Static SQL
    2.General purpose SQL statements
    3. created using createStatement() object
  10. 10What is Prepared Statement1. It extends Statement Interface
    2. Precompiled SQL statements which can be executed multiple times -- better performance
    3. Parameterized Query with 0/more paras (only INPUT)
    4. Reuses same Execution plan
  11. 11Prepared Statement prevents which attackIt prevents SQL injection Attack
  12. 12What is Callable Statement1. Execute Stored Procedures
    2. uses prepareCall() method of connection Interface
    3. Can have input/output/both parameters
    4. Execution only with execute() method
  13. 133 types of Execute methods1. execute() -- DDL statements , returns boolean value, getResultSet() give the results
    2. executeQuery() -- only select statement, returns tabular data. used only for reading the contents of a database
    3. executeUpdate() -- insert/update/delete stmts, returns int value i.e. no of rows affected. Only NON-SELECT statements
  14. 14Types of JDBC Drivers1. Type 1/JDBC ODBC -- used for development & testing of the application
    2. Type 2/Native API -- used when type3/4 is unavailable
    3. Type 3/Network Protocol Driver -- used when accessing multiple types of DB at same time
    4. Type 4/Thin Driver -- used when accessing only single database such as ORACLE, MySQL, SQL Server.
  15. 15Type 1 ODBC-JDBC Driver Bridge

Informationen

Beschreibung
JFST Karteikarten am JDBC, erstellt von Simran Khinvasara am 03/10/2020.
Erstellt von
Simran Khinvasara
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck