
It is linked with the actual location of the database. JDBC or Java Database Connectivity, as it is called, is an Application Programming Interface (API), which makes it possible for Java programs to connect to any database, retrieve the data/information from the database and utilize this data for themselves.ĭSN or Daja Source Name, as it is called, is the unique name given to the database in order to identify it in a Java program.

At the time of creating the trigger, it is defined to be executed when a specific type of data modification such as Insert/Update/Delete is made against a specific table/column. The trigger is a special type of stored procedure that cannot be called directly by the user. Triggers can be used to extend the referential integrity checks also, but wherever possible, constraints should be used for this purpose instead of triggers since constraints are much faster.īring out the difference between a stored procedure and a trigger. They get triggered automatically as mentioned already. Triggers are a special kind of stored procedure that gets executed automatically when an INSERT/UPDATE/DELETE operation takes place on a table. What do you mean by triggers? How do you invoke a trigger on demand?
#JAVA 8 JDBC ODBC BRIDGE ALTERNATIVE CODE#
Reduce the network traffic by sending the call to the stored procedure, instead of sending hundreds of T-SQL lines of code that are embedded in the stored procedure.Faster execution since they are pre-compiled.The main advantages of using stored procedures are:. These are similar to procedures in any other programming language and whence, can accept input parameters, return output parameters, and can even return status values to the calling procedure or batch to indicate success/failure along with the reason for failure, if any. What do you understand by a stored procedure? What are its advantages?Ī stored procedure is a set of precompiled T-SQL statements, which can be executed whenever required. Also, the primary key doesn’t permit NULL value while the unique key permits NULL value, but only one. But, by default, the primary key creates a clustered index on the column whereas the unique key creates a non-clustered index by default. Many-to-many relationships can be implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.īring out the difference between a primary key and a unique key.īoth primary key and unique key enforce the uniqueness of the column on which they are defined. The one-to-many relationship can be implemented by splitting the data into two tables with primary and foreign key relationships.

The one-to-one relationship can be implemented as a single table and very rarely as two tables with primary and foreign key relationships. How do you implement one-to-one, one-to-many, and many-to-many relationships while designing tables?

Multiple application programs can read/write data to the same database.
#JAVA 8 JDBC ODBC BRIDGE ALTERNATIVE SOFTWARE#
A database contains the data structure or ‘schema’ – description of data - as well as the data.Ī database management system (DBMS) is the software for managing access to a database. Self-description is what sets a database apart from ordinary files. Java J2EE Interview Questions on Databases & JdbcĪ database is a permanent, self-descriptive store of data that is contained in one or more files. We have compiled most frequently asked Java J2EE Interview Questions which will help you with different expertise levels.
