Solved

options to store data other than .txt and database

Posted on 2010-11-07
8
342 Views
Last Modified: 2012-05-10
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
Comment
Question by:hipal
8 Comments
 
LVL 20

Accepted Solution

by:
a_b earned 167 total points
ID: 34081575
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
 
LVL 20

Expert Comment

by:a_b
ID: 34081579
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
 

Author Comment

by:hipal
ID: 34081680
Thanks fr reply  a_b

I also want same application on remote machine to access this data .. in that care ?
0
 
LVL 20

Expert Comment

by:a_b
ID: 34081688
That will also work. Serialization is meant for transmitting objects/data to remote machines.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:hipal
ID: 34081707
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
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34082954
while you could use file indeed, i would rather use a db for this
0
 
LVL 3

Assisted Solution

by:jaffog
jaffog earned 167 total points
ID: 34083169
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
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 166 total points
ID: 34083348
>>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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now