Concepts of J2EE and MySQL

Sep 28 • Notes • 2673 Views • No Comments on Concepts of J2EE and MySQL

J2EE is the most used language for web-programming. In this post we will discuss about concepts of J2EE and MySQL. In J2EE we will discuss about JDBC, Java Server Pages(JSP) and MySQL. JDBC stands for Java Database Connectivity which is widely use to connect the applications of Java with the database server. This helps to retrieve the data, modify and restore the data into the database server. It acts like a bridge between Java programming language and the database management system. Java Server Page is a technology to develop any web page. It supports the dynamic contents which help the developers to insert the java code into the HTML pages which starts with <% and end with %>. MySQL is the most important open source relational SQL database management system.  It is one of the best RDBMS being used for developing web based software applications.

1.     What is JDBC API?

Ans:- The JDBC API normally based on a set of interfaces, not classes. It is up to the manufactures of the driver to implement with their own set of classes. An example of a concrete class in JDBC API is DriverManager.

2.     Define different types of clients in JDBC.

Java Data Base Connectivity

Java Data Base Connectivity(JDBC)

Ans:-  Normally there are two types of clients available in JDBC. These are application and applet. Both run on Java virtual machine (JVM) but applet runs in a browser. Application has a main() method but applet has not. Because of these distinctions, it is useful to consider applications and applets as two different types of clients. On the other hands many types of clients are available as

  1. Application
  2. Applet
  3. J2EE
  4. Servlet

3.     Define JDBC driver.

Ans:- To connect a java application to a database using JDBC, JDBC drivers are normally used. This driver normally acts as an intermediary between the application and the database. There are normally four types of JDBC drivers which are used to connect the application with the database. These are as follows:

  1. Type 1: JDBC bridge drive
  2. Type 2: Native API part java driver
  3. Type 3: Network protocol Pure Java driver
  4. Type 4: Native protocol Pure java driver

4.     Derive Oracle JDBC driver.

Ans:- Oracle provides types 2 and type 4 drivers for both client and server side use. Client side refers to the use of the driver in an application, applet or servlet. Server side refers to the use of driver inside the database. The type of oracle JDBC driver is as follows:

  1. JDBC OCI driver
  2. JDBC Thin driver
  3. JDBC internal driver
  4. JDBC server side thin server

5.     Why JSP is used to develop a webpage?

Java Server Pages(JSP)

Java Server Pages(JSP)

Ans:- There are certain features of JSP for which it is used to develop a web page.

  1. JSP allows embedding dynamic elements in HTML pages.
  2. JSP always complied before it is processed by server side.
  3. JSP are built up on top of Java Servlet API.
  4. JSP pages can be used in combination with servlets that handle business logic.

6.     What are the advantages of JSP?

Ans:- JSP has different advantages. These are listed below.

  1. The dynamic part is written in Java. It is more powerful and easy to use.
  2. It is portable.
  3. It is more convenient to write and modify.
  4. JSP are used to create the database connection between client and server.

7. What do you mean by JSP life cycle?

Ans:- JSP life cycle can be defined as the entire process from its creation till the destruction. The paths followed by JSP are as follows:

  1. Compilation
  2. Initialization
  3. Execution
  4. Cleanup

8.     Why MySQL becomes the most popular RDBMS technology?

MySQL

MySQL

Ans:- MSQL becomes much popular because of the following reasons.

  1. MySQL is an open source license.
  2. It handles a large subset of functionality of the most powerful database package.
  3. It uses standard form of SQL language.
  4. It works on many operating systems and many languages.
  5. It works very quickly.
  6. It supports large database.
  7. It is customizable.

9.     What are the RPMs available in Linux System for MySQL?

Ans:- For installation for MySQL on a Linux operating system, following RPMs are available for download.

  1. MySQL
  2. MySQL-client
  3. MySQL-level
  4. MySQL-shared
  5. MySQL-bench

10.  Define the numeric data types used in MySQL.

Ans:- The following list shows the numeric data types used in MySQL.

  1. Int
  2. Tinyint
  3. Smallint
  4. Mediumint
  5. Bigint
  6. Float(m,d)
  7. Double(m,d)
  8. Decimal (m,d)

You may also like to visit:

  1. Structured Query Language
  2. Important Questions on SQL
  3. SQL Questions

Tell us Your Queries, Suggestions and Feedback

Your email address will not be published.

« »