45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




java, jdbc, servlets

        

Reply
 
LinkBack Thread Tools Display Modes
Old 04-03-06, 01:05 AM   #1 (permalink)
Junior Member
 
Join Date: Feb 2006
Location: India
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 4 raghav has disabled reputation


1. WHAT IS CLONNEABLE INTERFACE IN JAVA.? Is it implemented by the ProtoType Design pattern.?


2. which drivers we are currently using in jdbc. and why.?


3.what are the references availble in java, How they work.?


reply plz..

__________________
M.Raghava Rao
raghav is offline Offline   Reply With Quote
Old 04-03-06, 07:46 AM   #2 (permalink)
Moderator
 
Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 sowmya571 has disabled reputation
hello







2. which drivers we are currently using in jdbc. and why.?







JDBC is a set of Java API
for executing SQL statements. This API consists of a set of classes and
interfaces to enable programs to write pure Java Database applications.





There are two types of
JDBC Driver Models and they are:


a) Two tier model and


b) Three tier model


Two
tier model:

In this model, Java applications interact directly with the
database.

A JDBC driver is required to communicate with the particular database
management system that is being accessed.


SQL statements are sent to the
database and the results are given to user.


This model is referred to as
client/server configuration where user is the client and the machine that has
the database is called as the server.


Three tier model: A middle tier is
introduced in this model. The functions of this model are:


a) Collection of SQL
statements from the client and handing it over to the database,


b) Receiving
results from database to the client and c) Maintaining control over accessing
and updating of the above.




a) JDBC-ODBC Bridge driver
b) Native API Partly-Java driver c) JDBC-Net Pure Java driver d)
Native-Protocol Pure Java driver

u use these driving depending on ur achitechture and application requirements




__________________
http://livetolead.blogspot.com/
all the best
Arise Awake N Stop Not Until Ur Goal Is Reached!
sowmya571 is offline Offline   Reply With Quote
Old 04-03-06, 10:49 AM   #3 (permalink)
Junior Member
 
Join Date: Feb 2006
Location: India
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 4 raghav has disabled reputation


Thank you very much sowmya..


one more doubt..plz clarify


In real time scenario which drivers you people are currently using..?


Is there any particular cause..?
__________________
M.Raghava Rao
raghav is offline Offline   Reply With Quote
Old 07-03-06, 09:14 AM   #4 (permalink)
Moderator
 
Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 sowmya571 has disabled reputation
hello



It dep[ends on the Application requirements ..



If u need a socket then Use last 2 type drivers



else we used JDBC-ODBC bridge driver for our application



bye



sowmya




__________________
http://livetolead.blogspot.com/
all the best
Arise Awake N Stop Not Until Ur Goal Is Reached!
sowmya571 is offline Offline   Reply With Quote
Old 10-03-06, 08:09 AM   #5 (permalink)
Junior Member
 
Join Date: Mar 2006
Location:
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 saivasu has disabled reputation
in real time applications we use type-4 driver
saivasu is offline Offline   Reply With Quote
Old 10-03-06, 08:30 AM   #6 (permalink)
Moderator
 
Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 sowmya571 has disabled reputation
hello



well that can be any one . In polaris we used JDBC-ODBC bridge one ya

donno ab others



can u please specify what are the major advantages and dis advantages



of using driviers depending on performance and stuff SAIVASU



waiting 4 ur reply sir



please do so



bye



sowmya




__________________
http://livetolead.blogspot.com/
all the best
Arise Awake N Stop Not Until Ur Goal Is Reached!
sowmya571 is offline Offline   Reply With Quote
Old 11-03-06, 12:10 AM   #7 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Posts: 2,379
Blog Entries: 4
Thanks: 118
Thanked 319 Times in 238 Posts
Rep Power: 60 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Type 4 dirvers are provided by the DB vendor and are customized by the Database vendor. There can be different drivers for different versions of Database. Because of the customization, the in performance wise they are better. And also independent of plaform ( still, vendor specific restrictions are applicable on DB).

Thanks,
Krishna

sk_kireeti is offline Offline   Reply With Quote
Old 11-03-06, 12:13 AM   #8 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Posts: 2,379
Blog Entries: 4
Thanks: 118
Thanked 319 Times in 238 Posts
Rep Power: 60 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Also, we make use of jdbc-odbc driver only when the development and production environments are windows based.

Also jdbc-odbc is a little slower version (but simple in structure). Because we are intruducing a new layer called odbc which keeps us much far from the DB in the application architecture.

Thanks,
Krishna

sk_kireeti is offline Offline   Reply With Quote
Old 11-03-06, 01:29 AM   #9 (permalink)
Moderator
 
Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 sowmya571 has disabled reputation
hello



can u please say ab the other drivers performance and where we use them ie i mean which scenarios we use them



bye



sowmya




__________________
http://livetolead.blogspot.com/
all the best
Arise Awake N Stop Not Until Ur Goal Is Reached!
sowmya571 is offline Offline   Reply With Quote
Old 11-03-06, 05:00 AM   #10 (permalink)
Junior Member
 
Join Date: Mar 2006
Location:
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 4 saivasu has disabled reputation








Hello,





JDBC Drivers: A comparative Study


To connect with individual databases, JDBC requires drivers for each database. The driver gives out the connection to the database and implements the protocol for transferring the query and result from clint to databse.

  • Type 1 Driver: JDBC-ODBC Driver

    • Translates query obtained by JDBC into corresponding ODBC query, which is then handled by the ODBC driver.
    • Sun provides a JDBC-ODBC Bridge driver. sun.jdbc.odbc. JdbcOdbcDriver. This driver is native code and not Java, and is closed source.
    • Client -> JDBC Driver -> ODBC Driver -> Database
    • There is some overhead associated with the translation work to go from JDBC to ODBC.
    • Advantages:

      • Almost any database for which ODBC driver is installed, can be accessed.
      • [/list]
      • Disadvantages:

        • Performance overhead since the calls have to go through the JDBC overhead bridge to the ODBC driver, then to the native db connectivity interface.
        • The ODBC driver needs to be installed on the client machine.
        • Considering the client-side software needed, this might not be suitable for applets.
        • [/list][/list][/list]

          • Type 2 Driver: Native-API Driver

            • This type of driver converts JDBC calls into calls to the client API for that database.
            • Client -> JDBC Driver -> Vendor Client DB Library -> Database
            • Advantage:

              • + Better performance than Type 1 since no jdbc to odbc translation is needed.
              • [/list]
              • Disadvantages:

                • The vendor client library needs to be installed on the client machine.
                • Cannot be used in internet due the client side software needed.
                • Not all databases sgive the client side library.
                • [/list][/list][/list]

                  • Type 3 driver: Open Net Protocol Driver

                    • Follows a three tier communication approach.
                    • Can interfere to multiple databases - Not vendor specific.
                    • The JDBC Client driver written in java, communicates with a middleware-net-server using a databse independent protocol, and then this net server translates this request into database commands for that database.
                    • Thus the client driver to middleware communication is database independent.
                    • Client -> JDBC Driver -> Middleware-Net Server -> Any Database
                    • Advantages:

                      • Since the communication between client and the middleware server is database independent, there is no need for the vendor db library on the client machine. Also the client to middlware need'nt be changed for a new database.
                      • The Middleware Server (Can be a full fledged J2EE Application server) can provide typical middleware services like caching (connections, query results, and so on), load balancing, logging, auditing etc..
                      • eg. for the above include jdbc driver features in Weblogic.
                      • [/list]
                      • Can be used in internet since there is no client side software needed.
                      • At client side a single driver can handle any database. (It works provided the middlware supports that database!!)
                      • Disadvantages:

                        • Requires database-specific coding to be done in the middle tier.
                        • An extra layer added may result in a time-bottleneck. But typically this is overcome by providing efficient middleware services described above.
                        • [/list][/list][/list]

                          • Type 4: Proprietary Net protocol driver

                            • Type 4 drivers are entirely written in Java that communicate directly with vendor's database through socket connection. Here no translation or middleware layer, are required which improves performance.
                            • The driver converts JDBC calls into the vendor-specific database protocol so that client applications can communicate directly with the database server.
                            • Completely implemented in Java to achieve platform independence.
                            • e.g include the widely used Oracle thin driver - oracle.jdbc.driver. OracleDriver which connect to jdbc:oracle:thin URL format.
                            • Client Machine -> Native protocol JDBC Driver -> Database server
                            • Advantages:

                              • These drivers don't translate the requests into db request to ODBC or pass it to client api for the db, nor do they need a middleware layer for request indirection. Thus the performance is considerably improved.
                              • [/list]
                              • Disadvantage:

                                • At client side, a separate driver is needed for each database.
                                • [/list][/list][/list]
                                  Thanks

                                  sai vasu.g
saivasu is offline Offline   Reply With Quote
The Following User Says Thank You to saivasu For This Useful Post:
nandhini_7 (03-05-07)
Old 11-03-06, 05:29 AM   #11 (permalink)
Moderator
 
Join Date: Feb 2006
Posts: 1,413
Thanks: 0
Thanked 17 Times in 14 Posts
Rep Power: 20 sowmya571 has disabled reputation
hello



Thanks u so much sai. Very gud info n clearly put



bye



sowmya




__________________
http://livetolead.blogspot.com/
all the best
Arise Awake N Stop Not Until Ur Goal Is Reached!
sowmya571 is offline Offline   Reply With Quote
Old 14-03-06, 09:59 AM   #12 (permalink)
Junior Member
 
Join Date: Mar 2006
Location: India
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 4 hariprasad has disabled reputation
HI,

Hoe to call EJB in struts frame work ? what are the ateps for service locator ? where we call to which class ?

__________________
Hari Prasad
hariprasad36@gmail.com
hariprasad is offline Offline   Reply With Quote
Reply

Tags
java , jdbc , servlets


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +6.5. The time now is 06:48 AM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0