Java Databases Flashcards
How do you connect with a database with Java?
Need to have a JAR file that would connect with the specific database.
What is one important thing to do once you have done what you need to do with the database?
Need to close the connection with the database
What is the first step to add items to a database?
Need to create a statement and then define the statement
What is needed to work with a database in Java?
1- Java Application 2 JDBC API 3 Vendor Driver Software 4 Connection 5 Database / SQL
Where do you get the driver to connect to a database?
You would get it from the vendor and download the JAR file that is needed to make the connection. And need to install on your machine. Need to add the jar file into the application to connect to the database
What is one way to see your database?
Through an IDE to see the data
Why do you use the throw exception?
You want to throw the exception because then it will still run the program.
What is the JDBC API used for
1- Create, read, update, and delete data in a relational database using the java programming language.
What is a CLOB?
Legal Document, Resume or other Document
What is a BLOB?
Image, Video, Crytographic info
What is connection pooling?
The cost to create a new jdbc connection can be expensive in time and performance. And cost to close connection. It is an existing connection that is already in order and then it is connected to the pool which is connected to the database. It is a caching mechanism. It is a container system.
What is a JDBC transaction?
A transaction is a set of actions to be carried out as a single, atomic action. Either all of the actions are carried out, or none of them are
what is a jdbc rowset?
A RowSet is an object that encapsulates a set of rows from either java Database Connectivity (JDBC) result sets or tabular data sources. RowSets support component-based development models like JavaBeans, with a standard set of properties and an event notification mechanism.
What is a DAO?
responsible for interfacing with the database using JDBC code
Common Design Pattern Data Accessor Object
What is a JDBC driver?
A JDBC driver is a software component enabling a Java application to interact with a database.[1] JDBC drivers are analogous to ODBC drivers, ADO.NET data providers, and OLE DB providers.
To connect with individual databases, JDBC (the Java Database Connectivity API) requires drivers for each database. The JDBC driver gives out the connection to the database and implements the protocol for transferring the query and result between client and database.
JDBC technology drivers fit into one of four categories.[2]
JDBC-ODBC bridge
Native-API driver
Network-Protocol driver (Middleware driver)
Database-Protocol driver (Pure Java driver) or thin driver.
ava Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access any kind of tabular data, especially relational database. It is part of Java Standard Edition platform, from Oracle Corporation. It acts as a middle layer interface between java applications and database.
The JDBC classes are contained in the Java Package java.sql and javax.sql.
JDBC helps you to write Java applications that manage these three programming activities:
Connect to a data source, like a database.
Send queries and update statements to the database
Retrieve and process the results received from the database in answer to your query