Please enable JavaScript.
Coggle requires JavaScript to display documents.
C5 : JDBC (URL Syntax (subprotocol (the name of the driver), subname (to…
C5 : JDBC
URL Syntax
jdbc:subprotocol:subname
subprotocol
the name of the driver
subname
to identifies the database
SQL statement execution
boolean
execute
(String SQL)
will return true if ResultSet object can be retrieved
Create, Drop, Alter
int
executeUpdate
(String SQL)
return the number of row affected by the execution of SQL statements
Insert, Update, Delete
ResultSet executeQuery(String SQL)
to get a result set
Select statements
Classes and interface
Class
Driver
Support creation of new database connection and manages driver
Interfaces
Driver
Represent specific JDBC implementation
Connection
A session with specific database
Prepared Statement
Container for executing SQL statements
extend
Statement
interface
To provide the flexibility in supplying argument dynamically
Parameter marker -
?
Statement
Container for executing SQL statements
Callable Statement
Container for executing SQL statements
Use to execute call to database stored procedure
3 type of parameter
Out
A parameter whose value is supplied by the SQL statement it returns.
In
A parameter whose value is unknown when the SQL statement is created.
InOut
A parameter that provides both input and output values
Result set
Provide access to table of data