• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

options to store data other than .txt and database

Hi All,

I have to store few simple file names and other strings in hierarchal order. Something like There is a room(Frame) (lets say room no. 1) there are 10 posters in the room ( panels). Each poster can have any number of items ( components).

I have several of these rooms. User can create new room, remove/add posters and add/remove items on the poster. I want to store these information to make this app work.

I do not want to use database as this seems to be really simple to use a database. I was wondering if there are any alternatives to using text files. Or may be some tricks and suggestions to make reading and writing in files more organized.

0
hipal
Asked:
hipal
3 Solutions
 
a_bCommented:
You can use serialization.
=> Create a Tree structure of the the data
=> Serialize it into a file
=> Deserialize when you need the data again
0
 
a_bCommented:
You can use serialization.
=> Create a Tree structure of the the data
=> Serialize it into a file
=> Deserialize when you need the data again
0
 
hipalAuthor Commented:
Thanks fr reply  a_b

I also want same application on remote machine to access this data .. in that care ?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
a_bCommented:
That will also work. Serialization is meant for transmitting objects/data to remote machines.
0
 
hipalAuthor Commented:
can you please have a look at this related post of mine .. which says more about what I am trying to do

http://www.experts-exchange.com/Programming/Languages/Java/Q_26598230.html

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
while you could use file indeed, i would rather use a db for this
0
 
jaffogCommented:
I agree with angellll. You can always decide to use caching combined with an XML (or other type, like serialization as a_b mentioned) layer to make sure your database doesn't get queried on every single request.

Layered, it looks like this:
- Client
- Cached XML (or other type)
- Dynamic script generating the XML, once every X [requests|minutes|hours|whatever]
- Database containing the data

Something like that?
0
 
CEHJCommented:
>>I do not want to use database as this seems to be really simple to use a database.

The simplicity of your entity relationships is not really related to the issue of whether to use a database. Much more important is how you provide the functionality of what is required from your storage solution. There are various options:

1. A relational database
2. Object-relational techniques
3. An object database
4. Reinventing a database

By far the worst option in your case is the last one - it should be avoided
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now