Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

XML database in disk file

Posted on 2004-03-22
3
Medium Priority
?
275 Views
Last Modified: 2010-05-18
Hi
i proposed to the client that we should not use the database like Access for out project. As in our application we have only one table i proposed to use a XML file.

Application will be developed in VB6.

Now what i want is that i want to use the DOM.  Problem is DOM reads the whole file in memory.  I do not want to read the whole XML file in memory instead i give a XPATH Query and DOM loads only selected nodes from disk to memory. Then i want to do operation like add a new record, modify and delete record and still i do not want to load the entire XML file in memory.

Here is what should be the XML database file format

<Database>
<Table Name = " ">
     <Record ID="1">
             <field1 value="">
             <field2 value="">
             <field3 value="">
      </Record>

     <Record ID="2">
             <field1 value="">
             <field2 value="">
             <field3 value="">
      </Record>

     <Record ID="3">                    i want only one record
             <field1 value="">            to be load in DOM
             <field2 value="">
             <field3 value="">            also i want to modify
      </Record>                             this record in the file

                                                  I ALso want to delete
                                                  this record from XML
                                                                                    ----------and so on-------------
</Table>

-----More tables in future here----------------
</Database>

I think file will grow 200K each month by added new records. So loading the entire file in memory will not be acceptable solution after say 1 year.

I will also conside if there is a samll XML database available on the internet. PLease suggest free tool

Thanks
Shahzad
0
Comment
Question by:shahzad73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 250 total points
ID: 10653990
I don't think you can use XPATH to pull just specific nodes without loading the XML into memory.

I could easily be wrong, but every example I can find starts with a Load command.  Eg:

   http://msdn.microsoft.com/library/en-us/xmlsdk/htm/dom_hdi_vb_2w8j.asp

One possibility would be to write a pre-processor that scanned through the file to locate specific items, then generate a new subset XML file and load it.

-- Dan
0
 
LVL 1

Author Comment

by:shahzad73
ID: 10656213
thanks for the advise...

lets see some body comes up with some other idea.


Shahzad
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Simple Linear Regression

704 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