Thursday, January 13, 2022

What is Host and Url in JDBC J2EE

What is Host 

Host is a platform on which all the applications can be executed.

Type of Host

There are two different types of host-present namely:-

  a)Local Host     b)Remote(Global) Host

a) Local Host:- In case of localhost, the application is limited to only a particular system.

                     Example: Standalone Application(Desktop Application-like file manager, Calculator ).

b) Remote Host:- In case of a remote host, the application is not restricted or limited to any system.

                    Example:- Any Real-time Application ( Youtube etc).

What is URL?

URL (Uniform Resource Locator)

It is the path or address using which, we can access the resources uniquely over the network.

Constraints of Url are:- Protocol, Host+PortNo, ResourceName.

  • In case of URL, Data refers to key and Value pair provided by the user. ( Servlet )
  • The protocol for the Web Applications:- HTTP(Hypertext Transfer Protocol) / HTTPS(Hypertext Transfer Protocol Secure)
  • The protocol of JDBC is JDBC:sub-protocol(Respective DB Server)

Syntax:- mainprotocol:sub-protocol://Host:PortNo/DB_NAME(Optional)


Local Host:-

                       Host Information              User Information 



Remote Host:-


Oracle(DB SERVER):-

Local Host:-



Remote Host:-


Implementation Classes == Driver Classes !!!!!

FQCN(Fully Qualified Class Name)

  •      Package Name.Class Name

Standard Way of creating a package structure:-

  • com/org.company_name.Application_name.

Different Driver Class provided by Respective db server or vendor:-

DB server                 FQCN

---------       --------------------------------------------

 Mysql       :-     com.mysql.jdbc.Driver

 Oracle      :-     oracle.jdbc.driver.OracleDriver

 Ms-sql      :-

 Derby       :-     org.apache.derby.jdbc.EmbeddedDriver

a) All the Driver classes which is a part of JDBC Driver are provided by the respective DB servers or vendors in the form of jar file.

b) All the Driver classes must mandatory implements java.sql.interfaces which is a part of jdbc API.


If you have any doubts,please let me know