XML vs. SQL Database

I am developing a home project to be later released as an online 
application.

I am currently using XML to store game data, user/member data, and other.

Assuming a user base of 10,000 active users, is there a conflict if one 
user is updating information and another user is creating data on the 
same xml file?

For example:
	User 1: update inventory that exists in the XML file
	User 2: new user adding their inventory data in the XML file

Thanks for your help.

Michael
0
1/8/2005 6:46:49 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
890 Views

Similar Articles

[PageSpeed] 40

"Michael Jesse" <michaeljesse1973@sbcglobal.net> wrote in message news:tUVDd.13357$iC4.7938@newssvr30.news.prodigy.com...
> I am currently using XML to store game data, user/member data, and other.
>
> Assuming a user base of 10,000 active users, is there a conflict if one
> user is updating information and another user is creating data on the
> same xml file?

Yes.  Files can't handle concurrent writers very well, this is why there
are databases.

> User 1: update inventory that exists in the XML file

This causes a problem if the 'inventory' contains a different number
of characters than it did before.

<characters>
    <character id="frodo">
    </character>
    <character id="samwise">
        <inventory>
            <item>Elven Rope</item>
        </inventory>
    </character>
</characters>

Now, assume you edit that item to be "Elven Rope 50m" in a text
file, now it's corrupted.

<characters>
    <character id="frodo">
    </character>
    <character id="samwise">
        <inventory>
            <item>Elven Rope 50mem>
        </inventory>
    </character>
</characters>

> User 2: new user adding their inventory data in the XML file

If Frodo adds the One Ring to his inventory, this is one possible
outcome,

<characters>
    <character id="frodo">
        <inventory>
            <item>The One Ring</item>
        </inventory>
    </character>e</item>
        </inventory>
    </character>
</characters>

Windows tries to prevent this from happening by granting the writer an
exclusive write lock (which you have to request) and giving everyone else
who requests that write lock nothing.  However, any changes to the file
would need to be reloaded by all readers, or writes they may commit
would corrupt the file as illustrated above.


Derek Harmon


0
loresayer (274)
1/10/2005 6:34:35 AM
Reply:

Similar Artilces:

XML Header
Hi, I have some XML doc loaded in a C# Web Service. XmlDocument doc = new XmlDocument(); doc.LoadXml(myDoc); Code Missing to manipulate header (I would like to replace or manupulate all these XXXXX): <mso-XXXXXX productversion="XXXXXX"> <mso-application progid="XXXXX"?> doc.Save(myNewDoc); Any idea on how to access and manipulate data within the doc header? Thanks vbdev vb6dev2003 wrote: > I have some XML doc loaded in a C# Web Service. > XmlDocument doc = new XmlDocument(); > doc.LoadXml(myDoc); > > Code Missing to manipulate header ...

Fresh SQL Server 2008 install
I've installed SQL Server 2008 SP1 (developer) on my machine (Windows XP) and am having some issues with SSIS and SSRS - which is a pisser, cause that's why I bought it. MS will connect to databases and Analysis Services (whatever that is) just fine, however, I get the following errors in SSIS & SSRS: Reporting Services: TITLE: Connect to Server ------------------------------ Cannot connect to JAY\MSSQL2008. ------------------------------ ADDITIONAL INFORMATION: The username or password is not valid or you do not have permission to ac...

Writing data from excel to sql-server
I would like to write the values of A1 and B1 to a SQL-Server table every 10 seconds. How can I do this ? Best regards Svein Olav Steinmo There's only two ways I know of to do this. 1.) You have to create a link to the EXCEL sheet in question using MS SQL Enterprise Manager. Then create a scheduled job to run an SQL statement to update the SQL table. Note: Changes to the EXCEL file will update automatically through SQL link. 2.) Create an Access DB with links to the respective tables and worksheets. Create a PASS THROUGH query that updates the SQL table using the EXCEL data...

Read XHTML into XML
Hi all, I need to read/parse XHTML aspx pages and look for certain tokens and content. How can I use a XmlTextReader for this? If not, any other ideas? Thanks in advance, JA Reyes. Jose Antonio Reyes wrote: > I need to read/parse XHTML aspx pages and look for certain tokens and > content. How can I use a XmlTextReader for this? If not, any other ideas? If the pages are well-formed XHTML then it is possible to use XmlReader (in .NET 2.0/3.0) or XmlTextReader (in .NET 1.x) to parse the XHTML documents. You can also use the other XML APIs .NET provides so using XPathNavigator and/o...

How to store E-mail content in a database
Hello, Cant the e-mail content be store in a database like access from outlook e-mail. I already read articles 181426 How to store outlook message in access database, but that only imports who sent the e-mail not what was in the e-mail. We are taking a survey on the web and the answer comes via e- mail to us. We want to store the answers into a database. Because we don't host our own website we cannot create the form in front page to do this. Any help you can give me would be appreciated. Thanks, Maritza. ...

How to invoke the xml editor?
I installed vs2005 on a new xp pro machine, and installed everything except C++. When I click on a file with a ".xml" extension it is opened with IE. When I click file/Edit with XML Editor, it opens it with Notepad. If I click File/Open With and select XML Editor, it opens it with IE. So, where is the xml editor? Can it be invoked from withing VS? Where? Bill * billsahiker@yahoo.com wrote in microsoft.public.dotnet.xml: >I installed vs2005 on a new xp pro machine, and installed everything >except C++. When I click on a file with a ".xml" extension it is >opened ...

show XML schema and values
I have an XML document that looks like the following: <record> <Field1>value1</Field1> <Field2>value2</Field2> <Field3>value3</Field3> </record> What I'm aiming to do is to show the data in a report as in the following example: record: Field1 value1 Field2 value2 Field3 value3 The "Field1-3"-elements can have any name, so I'm trying to get a table that has in one result column the element name, and in the second colum...

SQL server does not exist or access denied
Hi, I am trying to install CRM 3.0 on a SBS2003 Premium Edition with SQL 2000sp4 running and during the system requirements check I get a message under SQL Server and SQL Server Reporting Services that: SQL server does not exist or access denied. I am sure that SQL server is running but during the setup CRM does not see it. I have also changed the authentication method to mixed but that didn't help. Any suggestions? Thanks. hi there, even i was having the same problem but got it fixed. it seems that you dont have the right service pack for sql, that is the reason the i...

Offline synch using XML web-services
This is a bit long-winded. Can somebody read thru these 2 use cases, and tell me if it is feasible ? :- Use Case : Replication before Offline Synch Scenario 1 : Oracle Server , MSDE client 1. User clicks on 'Go Offline'. System creates a MSDE SQL database in laptop (client), gets the schemas of the tables in Oracle, creates corresponding tables in client's MSDE SQL (mapping Oracle datatypes to SQL datatypes). 2. Offline replication program reads in the tables of the server into a typed datasets, converts the typed datasets into XML, and stores the XML in the client. (XML serial...

XML Serialization ... how to truncate <?xml...
While xml serializing object how can I truncate <?xml ...?> this line alone? I need to send the serialized xml data to a web method ... since SOAP already have <?xml tag there was some confusion Any help would be greatly appreciated Thank you Regards Raj Raj wrote: > While xml serializing object how can I truncate <?xml ...?> this line alone? Serialize to an XmlWriter created with XmlWriterSettings where you set OmitXmlDeclaration to true. -- Martin Honnen --- MVP XML http://msmvps.com/blogs/martin_honnen/ ...

SBS2003R2, SQL Wkgp 2005, Sharepoint MSDE,Cant create 2005 Instanc
We have an SBS 2003 SP2 server that had the SharePoint with MSDE (Ver 80). We installed the SQL Server 2005 Workgroup Edition from SBS Premium 2 DVD. Throughout the installation we were not prompted for authentication method or collation sequence however SQL installed without problem and we then installed Sp2 & SP3. We then created some empty databases but later realised they were created under the MSDE instance but we want them installed under SQL 2005 work-group which we installed. The databases are empty so we are happy to recreate them if need be. We tried uninstallin...

String to xml document
Hi there, I was hoping someone can help me with a little problem I can't seem to find any answers to. I've got a form wich will be posted. On receiving the post I would like to parse a formvar to a xml document. The contents of this formvar (string) will be a valid xhtml document. Can someone give me a startertip (or more :-)) on how to achieve this? tnx in advance, James van der Veen Sjeems wrote: > I was hoping someone can help me with a little problem I can't seem to find > any answers to. > > I've got a form wich will be posted. On receiving the p...

Beginner of XML
I am a beginner of XML. I want to group some files together with a xml file. (it includes a text file, and an image file and a video file) Can someone show me some guidelines? Please help. ...

New essay: Projects that build under VS.NET 2003/2005
It finally happened. Someone needs a project that builds under VS.NET 2005 (they want the ease of the 64-bit integration) and VS.NET 2003 (for all their old 32-bit developers). I wrangled with the problems for a bit, and came up with a kludge that actually works (clumsy though it is, alas). But to save anyone else the time taken to figure it out, the results of my experiment are documented on http://www.flounder.com/vs2325.htm joe Joseph M. Newcomer [MVP] email: newcomer@flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm ...

Valid xml to read from an xml file?
I'm using vb.net, i get an error at the reader line saying the remote server can't be found. Is the below even valid? dim reader as XmlTextReader reader = new XmlTextReader ("http://www.mysite.com/my.xml") do while (reader.Read()) 'do some action here response.write(reader) loop thanx chumley XmlTextReader uses System.Net.WebRequest under the covers -- see if you can figure out how to create a connection that way. Usually there's some proxy server information missing that you can enable if you use WebRequest directly, and then pass the result of GetResponse()...

Missing Tables: SQL
I ran hotfix for GP9 but I decided not anymore to continue with it because there were other requirements. Thus, I reinstalled the applicaiton GP9 and restored my backup dynamics & company database. There were tables that were lost when I restored it. I just want to know how to copy the tables to my current database. Most of the tables that were lost were from the Cashbook (i.e. CB900045, CB200001) and other tables such as SY00900, SY02200. I was informed that the lack of these tables will not greatly affect our operations (i hope so, please help) ...

Insert an item into the Outlook client offline database
Is this possible? If yes. Any pointers? Regards Martin Hi Martin. Hint, add it to replication on the server ;) Mike "Martin Croome" <nomartinsppl@socketnodotspcompl> wrote in message news:uPWgIHG3DHA.1264@TK2MSFTNGP11.phx.gbl... > Is this possible? If yes. Any pointers? > > Regards > > Martin > > ...

Example eConnect XML documents
MSDN says the following: Installing eConnect schema When you include the schemas component of the eConnect install, the installer places schema files in a schemas folder on your computer. The following schema resources are available: The install places the .xsd schema files in the directory c:\Program Files\Microsoft Great Plains\eConnect9\XML Schema\Incoming XSD Individual Schemas. The files in the directory contain the schema for each eConnect XML document. The install places a file named eConnect.xsd that contains the schema definition for all eConnect XML documents. The install typicall...

MS AntiSpyware Vs Exchange
Has anyone got any experience of running the MS Antispyware on the same box as Exchange (5.5 or 2003). I've been seeing some funnies of over the past coupel of weeks with the IMC hanging up on a 2000 server running Ex 5.5 which ash the Antispyware software installed. The hangs seem to have started when the Antispyware was installed. Just trying to rule out or in some possibilities. Andy On Wed, 27 Jul 2005 16:37:28 +0100, "Andy Cobley" <acobley@computing.dundee.ac.uk> wrote: >Has anyone got any experience of running the MS Antispyware on the same box >as...

ctrl+shift+enter vs enter
what is the difference btw confirming with enter and ctrl+shift+enter -- tkapla ----------------------------------------------------------------------- tkaplan's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2298 View this thread: http://www.excelforum.com/showthread.php?threadid=37455 The difference is that for a normal formula you use Enter, However there is a special kind of formula called an Array formula which can only be entered using Ctrl+Shit+Enter. When doing so it will enter special curly brackets to indicate it is an Array formula -- _________...

Data vs. forms & Unload/reload questions
A .mdb file seems to encompass both the database and all the 'code' (forms, modules, and logic) used to CRUD the data in the tables. 1) Is there any way to separate the database from the code into separate files, eg. the db is mydata.mdb and the 'code is in a separate file, eg. code.mdb? 2) Say you have v1.0 of an app and the tables and attributes are populated with data. You then go and build v2.0 of the app, adding tables and columns to what already existed in v1.0, and perhaps moving some of the v1.0 attributes into different tables. What is the recommended way to unload/reloa...

Cached Mode vs. Roaming Profiles
I am using roaming profiles on the network which I would like to keep. I have also changed the Sales staff over from PCs to laptops and I want to use Outlook 2003 in Cached Mode. My problem that when any of the Sales people log onto computers other than their laptops Outlook builds them an OST file on that computer. It would be very rare for someone with a laptop to have someone else log onto their laptop so I would like to force some setting or Group Policy that forces Outlook not to use Cached Mode on just that computer, but not affect the users setting on other computers. Is ther...

splitting a database into separate tables
I have imported a database into Access 2003, and the data is all in one large table. I now need to split the data into about 12 tables, before designing how the tables relate to each other. How do I split the database into separate tables, preferably without losing the relationships which exist in the current composite database? Create the new tables, then write Append Queries to take the individual values from the existing table and put them in the new tables. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "jon@thebear" <jonthe...

Saving DataSet as XML in ADO format using VB.NET
Hi, I am trying to convert a lot of web reports from ASP/VB to ASP.NET/VB.NET. I would like to save my dataset in XML and then use XSLT to transform the XML. The catch is I would like to have the XML in the format that ADO uses versus the default format in which ADO.NET uses. Currently, I am using ADO within .NET, but I am concerned about the performance and it might improve if I used the native data providers for .NET. I am not sure if I am missing something but how do I save the .NET DataSet to XML in the OLD ADO format? Thanks for you help in advance and it is most appreciated. In the ...

XML variable for description on receipt?
Hi, I would like to add a description (actually all of those 3 extended descriptions) to display on the printed receipt under the main description. What is the variable to do that? Entry.Item.Description Entry.Item.ExtendedDescription Entry.Item.SubDescription1 Entry.Item.SubDescription2 Entry.Item.SubDescription3 R. "Zorian" <Zorian@discussions.microsoft.com> wrote in message news:F4425EAC-62B6-46FE-826A-D8BA2AA75DBB@microsoft.com... > Hi, I would like to add a description (actually all of those 3 extended > descriptions) to display on the printed receipt un...