JDBC architecture - simple questions !

Hi

I need to know the JDBC architecure for an applet that comnnect to MiniSQL:

Please correct me if I am wrong. I think it looks like this:


cleint                            server
applet  -> JDBC   -> Driver   -> Database engine
call JDBC lib,   load driver,   driver talks to the MiniSQL
Is this correct? if you have better architecture please show me.


-at the client:
we have the applet only. Right ?

at the server:
we have JDBC
JDBC driver (msql JDBC)
MSQL server

Is this correct ?
I am using type 4, no CORBA, no middleware.

-Is this a 2-tier scenario ?

-What is meant by "database-system native" as mentioned in type 4 driver ?
Can you explain please ?

Thanks
aja101498Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aja101498Author Commented:
Edited text of question.
0
aja101498Author Commented:
Edited text of question.
0
heyhey_Commented:
client: applet or application
server: MiniSQL

client talks to server using JDBC (MiniSQL JDBC driver)

this is two-tier architecture.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

vishoneCommented:
Hi aja
      The Thin JDBC driver can be  used
      in a number of configurations.

      Usual configuration is -
      The Java applet and Thin JDBC are
      downloaded into the browser (from
      webserver) after the user opens a
      URL. The Thin JDBC communicates
      directly with the database server.

      If you consider applet and JDBC
      residing in one more webserver, it
      is "3 Tier Architecure".

      JDBC drivers are ususlly provided
      by the database vendors, it lacks
      "Open DB Connectivity",  probably
      hence the  term  "database-system
      native."
 - Vish
0
g_senthilkumarCommented:
Hi,
  What you are telling is a Two-Tier architecture.
Type 4 driver:(Native-protocol all java driver)
---------------
It is pure java driver, in that the JDBC calls will be converted into native database calls and will be sent to the database engine directly,no middleware.And it requires no native code in the client machine.
Jdbc
driver-calls converted to
       properitary database calls-Database.

Type 3 driver:(Net protocal java driver)
---------------
  In this the jdbc calls converted into database independent calls and sent it to middleware software and there it will get converted into specific database protocol calls and then sent it to specific database.

   In your case it is two-tier architecture.Type 4 driver you are using so in the applet whatever jdbc calls you made will be converted into native or specific database protocol calls and will be sent to the database.



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aja101498Author Commented:
g_senthilkumar :-

-database-system native: JDBC calls will be converted into
 native database calls and will be sent to the database engine.
You mean converted to SQL calls (SELECT, etc..) right ?

-"And it requires no native code in the client machine."

I did not understand the above statment.

Can you show me a simple JDBC architecture in 2-tier application.

Thanks alot
0
JodCommented:
There are two ways to use the architecture you have.

1)

You open the web page, the applet on the web page is downloaded from the server. The applet then runs and downloads the JDBC driver (Type 4).

This driver then connects to the database when you request and sends messages to it directly - there is no middleware and you need a direct connection from the client to the database.

This is two tier.

Using native database calls means that it is not using a generic message format (such as SELECT * from table;) but using a format of message that only the database that the driver is for will understand. The driver talks to the databse in a proprietary format for that database.

2)

You open the web page, the applet on the web page is downloaded from the server.

The applet then connects to a Java process (application for example) on the server. This process on the server loads the JDBC driver and connects to the database.

To get data from the database you then send a message to the server process. This process gets the data from the database and returns it to youas a reply.

This is three tier. There are a number of variations on this sort of middleware.

Solution 1 you can use on small networks and intranets but not good over the internet.

Solution 2 is better over the internet and also works on any network. It also does not have to download the JDBC driver and does not care about what type of JDBC driver you are using.


Finally,

-"And it requires no native code in the client machine."

means that all your code on the client is running in Java which means you have no runtime or security issues (except getting the Java to work in your browser). You connect to a web page and the web page can directly download all the relevant Java code neccessary to connect to the database. Updates also download automatically.

On the other hand, if you use an ODBC type connection from the client then you need to specifically install the relevant application code onto each client that will make a connection to the database. This code is not Java so cannot be downloaded by Java and installed onto the client.

Or for example, using a connection to an Oracle database via an OCI JDBC driver. for this to work you have to go to the client and install the relevant Oracle support libraries (SQLNet for example) before the Oracle JDBC driver can work.

Does this help?
0
aja101498Author Commented:
g_senthilkumar :-

-database-system native: JDBC calls will be converted into
 native database calls and will be sent to the database engine.
You mean converted to SQL calls (SELECT, etc..) right ?

-"And it requires no native code in the client machine."

I did not understand the above statment.

Can you show me a simple JDBC architecture in 2-tier application.

Thanks alot
0
aja101498Author Commented:
Just one more thing please.
Are these steps correct:

1-applet  -> JDBC  
   at the client applet call JDBC library.


2-JDBC   -> Driver
   The JDBC loads driver form the server

3-Driver   -> Database engine
Then the driver  talks to the MiniSQL

Thanks alot.

aja
0
JodCommented:
No, the JDBC is your driver. There are only two steps here.

The Java Virtual Machine loads your applet which is a class when you open your web page. The applet then requests to load the JDBC driver which is also a class.

The JDBC and the driver are the same thing - a Java class.

The driver then talks to your relevant database.

0
heyhey_Commented:
JDBC is 'standard'
JDBC driver is Java class.
your client application (or applet) uses the JDBC driver to 'talk' with the DB server.
0
Ravindra76Commented:

Hi aja,

 i think you took two months time to ask this question...

 :) :) :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.