Results 1 to 5 of 5

Thread: sql and java

  1. #1
    L19htn1n9 is offline Member
    Join Date
    Jul 2011
    Posts
    32
    Rep Power
    0

    Default sql and java

    I really have a simple question I believe.
    I want to connect to a sql database, like mysql. But instead of mysql, a light weight sql server.
    I need this, because i want to develop a java program for keeping up my administration.
    I saw something obout sqlite, but could not find any the needed program to start the sqlite server.
    What i really want is, that when i start my java program, the program also starts the sql server.
    Is there any way this can be done? And if so, can you guys help me with it.

    L19htning.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: sql and java

    It sounds like you might be looking for an embedded database...google the term and see if it applies (eg data is not directly shared between instances). If so, take a look at Derby
    Apache Derby

  3. #3
    L19htn1n9 is offline Member
    Join Date
    Jul 2011
    Posts
    32
    Rep Power
    0

    Default Re: sql and java

    Ok i imported all the plugins into the eclipse plugins folder and i added the derby nature to my project, but what do i do now? I saw some videos on people using the IJ(interactive sql) command line to create a table, but is it also possible to do it through java code, and how do i start the server if my project is packaged as a .jar file and on some other computer?
    Some example code would be great =)

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: sql and java

    The link I provided has a lot of documentation. Click on the Quick Start tab, and there should be code snippets and tutorials for running JDBC (see Activity 3 - Getting Started with Derby )

  5. #5
    L19htn1n9 is offline Member
    Join Date
    Jul 2011
    Posts
    32
    Rep Power
    0

    Default Re: sql and java

    thank you so much for your help =) it is wokring now :D

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •