Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

sql simulation with jsp/jdbc and flat files

Thread view: 
MyClue - 03 Jul 2006 20:21 GMT
Hi all,
   I'm trying to set up a solution to use a flat file as a database
and be able to run basic SQL queries on it in a Tomcat environment.
I'm thinking about getting JDBC set up and supposedly it has a built-in
driver to use flat files as the database.  Only problem is i have no
clue how to go about doing this.  Any suggestions?  Thanks
Oliver Wong - 03 Jul 2006 20:43 GMT
> Hi all,
>    I'm trying to set up a solution to use a flat file as a database
> and be able to run basic SQL queries on it in a Tomcat environment.
> I'm thinking about getting JDBC set up and supposedly it has a built-in
> driver to use flat files as the database.  Only problem is i have no
> clue how to go about doing this.  Any suggestions?  Thanks

   Do you HAVE to use a flatfile? If not, you might want to look into
Apache Derby (http://db.apache.org/derby/) or HSQLDB
(http://www.hsqldb.org/), which are lightweight DBs that you can embedded
into your Java programs.

   - Oliver
MyClue - 05 Jul 2006 15:05 GMT
i think i might.  the data is going to be exported to me as a flat file
so that's what I have to work with.  i found something called CSVJDBC
which is a driver to help JDBC work with comma separated value files
but I'm not sure if that's what i'm looking for.

> > Hi all,
> >    I'm trying to set up a solution to use a flat file as a database
[quoted text clipped - 9 lines]
>
>     - Oliver
Oliver Wong - 05 Jul 2006 15:22 GMT
[Post re-ordered]

>> > Hi all,
>> >    I'm trying to set up a solution to use a flat file as a database
[quoted text clipped - 12 lines]
> which is a driver to help JDBC work with comma separated value files
> but I'm not sure if that's what i'm looking for.

   You could take the flat file, load it into a transient RDB, and do all
your processing from there. Will you make changes to the data, and do these
changes need to be reflected in the file again?

   - Oliver
MyClue - 05 Jul 2006 19:57 GMT
most likely no changes will be required.  as far as i can see, all i
need to do is be able to access the data and display it.

> [Post re-ordered]
>
[quoted text clipped - 20 lines]
>
>     - Oliver
Oliver Wong - 05 Jul 2006 21:13 GMT
[Post re-ordered]

>> >> > Hi all,
>> >> >    I'm trying to set up a solution to use a flat file as a database
[quoted text clipped - 23 lines]
> most likely no changes will be required.  as far as i can see, all i
> need to do is be able to access the data and display it.

   Since you're going to be running SQL queries, I recommend you do as I
said above: Read in and parse the flat file, and do inserts into a transient
DB. Then, do all your queries against the DB. When the program ends, the DB
gets garbage collected and disappears.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.