Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 30th, 2004, 05:43 AM
vauneen vauneen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 vauneen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile storing data in files (no database)

hi,

i need to build a java application that doesnt use a database (for various obscure reasons that i have little control over).

i've never done this before and am not sure how one geos about it.

if for example i have the user profiles to store, do i list them in columns in a text file (the way a table would be in a database?) and then read them back in an array before selecting the one i want? or would i create one file per person?

i guess (being a database kind of person) i'm looking for the theory behind storing data in files before i start building the application?

does anyone know a good article/tutorial on this?

thanks,
vauneen

Reply With Quote
  #2  
Old June 30th, 2004, 06:42 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
I don't know of any tutorials and I'm not going to claim this is 'the' way but if I were doing this I'd treat files as tables and then come up with an appropriate file format to store the information. Something like CSV or similar will probably do fine for most things although you could use xml (Java has some excellent xml parsing support) or whatever else takes your fancy.

Hope this helps,

-KM-

Reply With Quote
  #3  
Old June 30th, 2004, 12:22 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
I'm with KM on this one... I'd definitely look into XML as an alternative. Although you could use flat files (ie: CSV), you'll run into performance issues once the file starts to grow.

Take a look at the XML/Java articles that were published here a few months back:

Java and XML Basics, Part 1
Java and XML Basics, Part 2
Java and XML Basics, Part 3

They're great reads and will help you on your way... Also, if you get stuck anywhere, feel free to post here... I've had my fair share of XML experience (both Java and .NET), as have others on the board.

HTH!
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #4  
Old July 6th, 2004, 04:51 AM
vauneen vauneen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 vauneen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Thanks for the help

thanks to both of you for the help, much appreciated.

i've been looking for an excuse to learn a bit of xml (i bought a book at the beginning of the year.)

you might just see a bit more of me here if i get stuck.

vauneen

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > storing data in files (no database)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway