• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Can applet access database directly?

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a question from IBM certification pre-assessment site. The cert is about IBM software Visual Age for Java. But I have a problem with an applet-related question. I personally don't have too much experience with applets, so I am counting on you applet gurus to explain it to me. Thanks!
Which of the following are true with respect to configurations of Java solutions that allow many individual clients to access a database on a centralized host computer:
(b,c)?

a) an Applet must go through a Servlet to gain access to a database.
b) a web browser can utilize a Servlet which in turn can access the database through a database driver.
c) a web browser can run an Applet which in turn can access the database through a database driver.
d) a Servlet should use the Java Native Interface (JNI) to gain access to a database.

Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Caroline,
B & C are correct as I think according to my previous applications..
when using an applet, it is just a few lines of code to establish a JDBC connection to the database and specify the required driver.
not all the drivers can access a remote database.
Regards,
MAC.

[This message has been edited by Jimi Rock (edited July 30, 2001).]
 
Saloon Keeper
Posts: 22483
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
** concurrence **
A is false - you CAN go through a servlet, but you don't HAVE to
D is false - you CAN use JNI to access a database (e.g. invoke MS SQL Server via a JNI class wrapping ADO), but it's not a good idea - JDBC is much more portable, ergo, you SHOULD *NOT* use JNI (as opposed to CAN not or MUST not!).
 
Caroline Iux
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic