|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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- |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > storing data in files (no database) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|