Solved

XML database in disk file

Posted on 2004-03-22
3
239 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
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countAbc challenge 9 59
topping1 challenge 7 73
VB6 Compile Compatibility Issue 4 90
groovy example issue 10 90
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 is about my first experience with programming Arduino.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

920 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

11 Experts available now in Live!

Get 1:1 Help Now