DB programming Flashcards

1
Q

WHat does programming with a database require

A

-A database server and its connection information
-A programming language writing code to query the database
-A library or driver for connecting to the particular database system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

General process for programming with a database

A

1) Load the database access library
2) Create a connection to the database
3) Execute a SQL command
4) Retrieve database results produced by the command
5) Close the database connection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Java interface

A

Abstract class consisting of a set of methods with no implementation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to create a JDBC driver

A

DBMS vendor must implement the interfaces by defining their own classes and writing the code for the methods in the interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The main interfaces in the JDBC API are:

A

Driver - The main class of the entire driver
Connection - For connecting to the DB using the driver
Statement - For executing a query using a connection
ResultSet - For storing and manipulating results returned by a Statement.
DatabaseMetaData - For retrieving metadata (schema) information from a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly