Re: XML Database Best Practices
- From: "Yehia A.Salam" <yehiaeg@xxxxxxxxxxx>
- Date: Thu, 31 May 2007 00:56:05 +0300
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@xxxxxxxxxxxxxxxxHello,
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
- Follow-Ups:
- Re: XML Database Best Practices
- From: John Timney \(MVP\)
- Re: XML Database Best Practices
- References:
- Re: XML Database Best Practices
- From: John Timney \(MVP\)
- Re: XML Database Best Practices
- Prev by Date: *.aspx = 404
- Next by Date: Re: *.aspx = 404
- Previous by thread: Re: XML Database Best Practices
- Next by thread: Re: XML Database Best Practices
- Index(es):
Relevant Pages
|