Want Help In Connecting DB To Java

free web hosting
Free Web Hosting > Computers & Tech > Databases

Want Help In Connecting DB To Java

amit nigam
Actually i know how to create an independent database and how to update it manually.

But i just want to know that how can i make that update thing automatically. Like suppose if i give somekind of username and password to members of my site and i wish to have them updated , like addition , deletion or changes in password, to be automatic how can i do that.

i have a rough idea that it can be done with the help of Java and jdbc but i don't know exactly. I m good at programming languages C and Java.

Reply

yordan
QUOTE
I m good at programming languages C and Java.

Yes, C language is the best way, the most performing if you have a lot of users. However, are you familiar with the embedded C for your database ?
By the way, which database manager are you using ? Is it a mysql database ?
I guess that most of people here use mysql with php, so they will suggest you to use php. Maybe the most efficient thing is look aroung this forum or make a google search for php sample scripts, understand the examples and adapt them to your own purposes.
Regards
Yordan

Reply

snutz411
QUOTE(amit nigam @ May 1 2006, 03:24 PM) *

Actually i know how to create an independent database and how to update it manually.

But i just want to know that how can i make that update thing automatically. Like suppose if i give somekind of username and password to members of my site and i wish to have them updated , like addition , deletion or changes in password, to be automatic how can i do that.

i have a rough idea that it can be done with the help of Java and jdbc but i don't know exactly. I m good at programming languages C and Java.



Check out this site for examples on how to set up the ODBC/JDBC connection. It's pretty simple to do with the help of examples.

http://javaalmanac.com/egs/java.sql/pkg.html

 

 

 


Reply

vhortex
QUOTE(amit nigam @ May 2 2006, 03:24 AM) *

Actually i know how to create an independent database and how to update it manually.

But i just want to know that how can i make that update thing automatically. Like suppose if i give somekind of username and password to members of my site and i wish to have them updated , like addition , deletion or changes in password, to be automatic how can i do that.

i have a rough idea that it can be done with the help of Java and jdbc but i don't know exactly. I m good at programming languages C and Java.


I dont know exactly if i got your question right.. It is kind of not very clear..

for automation, here is what i do..

--

this is on assumption that you have a host with mySQL 5 in it or that you can upgrade the mySQL server on the site/host.

I create all needed database tables and coloumns then I write a stored procedure to be inserted to the mySQL server [Oracle style]. Then when I need to do some updates, I just call the stored procedure, the function of the stored procedure is base on your likings.

My best setup is also to set a trigger command in the mySQL like a trigger of database read. On a read command [SELECT command for the database], i will just call a stored procedure found also inside the database that will update the read count column for the database I am using.

eg.
table data
id INT
data varchar
readcount int

trigger SELECT

stored procedure sub updatecount[.....]
{....}


when a user use SELECT command here to the data , my read triiger will fire off
then the trigger will call this stored procedure updatecount and the readcount will be updated.

Reply

yordan
QUOTE

Thanks for the link : their topic is really complete (including how to download the drivers), clear and easy with the examples.

Reply

Ola Daniel
It sounds to me like you need to do some homework on how you want to get this done. There are many many ways to get this done. I would resommend using Java, its the easiest of them all.

Using Java you have several options.

1. Use JDBC - very very simple especially if you are used to SQL queries and so on.

2. Use Persistence Objects - Advanced stuff. For Example EJBs, Hibernate e.t.c

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Similar Topics

Keywords : connecting db java

  1. Connecting To A Remote Database - (9)



Looking for connecting, db, java






*SIMILAR VIDEOS*
Searching Video's for connecting, db, java
advertisement




Want Help In Connecting DB To Java