Re: XML Database Best Practices



that's what I though but I have no other options as this is a university
project and I'm stuck with XML, you mean it's best to use one instance through the whole application lifetime?

"John Timney (MVP)" <x_john@xxxxxxxxxxxxxxxxxxxx> wrote in message news:-aWdnYHrquBec8DbRVnyjQA@xxxxxxxxxxxxxxxxx
Your best option is to use a database. XML is good for holding some data but its not a good option as a replacement for a database when your expecting read and write operations.

If you really need to use an XML file as a data store, get used to how asp.net uses caching and take advantage of it. If it doesn't change, then use the app object - if it does, use caching and expire it as required. My site uses RSS as the data feed for its content, and caches and expires the data hourly - but there's no write operations so thats OK.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog


"Yehia A.Salam" <yehiaeg@xxxxxxxxxxx> wrote in message news:C3E9ED1C-7F98-4D2D-87B3-DA7C152EB2F9@xxxxxxxxxxxxxxxx
Hello,

I am building an ASP.net website that connects to an XML database, and was wondering which is the best way to create the connection if I need frequent access to the database, I have one of the three options:

1. Use one instance of XmlDocument thought the whole Application by initializing the class in Global.asax in the Application_Start Event.
2. Use one instance per session using the Session_Start Event.
3. Create and initialse the XmlDocument as late as possible and close it as soon as possible, by creating a new instance and close each time per access.

I I know that if I were using SQL database I would go with option 3 because of the connection pooling and the security concerns, but this feature is not available for XmlDatabases AFAIK, should I depend on the caching features of ASP.net? , what is best design of the three to use?

Thanks
Yehia A.Salam


.



Relevant Pages

  • Re: XML Database Best Practices
    ... Your best option is to use a database. ... If you really need to use an XML file as a data store, ... use the app object - if it does, use caching and expire it as required. ... caching features of ASP.net? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DISCOVER_XML_METADATA
    ... expansion of ASSL XML returned by the server. ... You could do ExpandObject for the server in step 1. ... you could request ExpandObject for that database -- this is step ... all cubes and nothing else. ...
    (microsoft.public.sqlserver.olap)
  • Re: Preservation of namespace prefixes in XML datatype
    ... representation well beyond merely preserving the logical meaning. ... > Now the ANSI/ISO SQL-2003 standard makes it pretty clear that the XML ... all the guarantee the database gives you is that we preserve the ... >> makes changes in namespace prefixes, will I the user/developer have the ...
    (microsoft.public.sqlserver.xml)
  • Re: Wanted:MAIL.MAI structure definition
    ... a relational database is more flexible in the retrival of data. ... Perhaps this impact has been softened as hardware has gotten faster, but, overhead is overhead, and if you weren't using the advances in hardware for overhead, those designs that have less overhead would also gain from the faster hardware. ... RFC822 header because your XML parser wouldn't be able to understand new ...
    (comp.os.vms)
  • Re: Rework [Was: Static vs. Dynamic typing...]
    ... Agile projects have an extraordinarily low chance of a big change. ... Suppose you start with XML files, and by Iteration 6 the ... Switching to a database is now cheaper than morphing XML files into a ...
    (comp.programming)