We help IT Professionals succeed at work.

Access vs. XML

Ray Turner
Ray Turner asked
on
125 Views
Last Modified: 2017-03-26
I have an ASP .NET website that queries an xml file using LINQ to construct some pages. I'm considering using Access to do this since some of the queries are becoming quite complex.

a. Will Access give me the performance boost I'm seeking?
b. Will it make code easier to maintain?
c. Are there any caveats to watch out for?
Comment
Watch Question

John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
It reckon it will be faster if you "transfer" the XMLs to standard Ms Access Tables/Queries....if i understood you correctly...
Can you give a small sample?
ste5anSenior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Ray TurnerSenior Consultant

Author

Commented:
Thanks to you all.  That makes a lot of sense.  XML is a flat file.  Indices are not being used when a queried.  

All queries start at the top of the file and read every record all the way to the end of the file. :(
Also, doing join queries are a nightmare in XML.

I think I will definitely explore Access.  It has to be a better solution than XML.

BTW - Construct is just another word for 'build '
ste5anSenior Developer
CERTIFIED EXPERT

Commented:
Then the performance of querying does not really matter, cause writing files to disk is much slower.
Ray TurnerSenior Consultant

Author

Commented:
Ste5an,

Thanks for the comment.  I have one last comment.
True, writing to disk can be slow.  To be more specific; writing to a database is much slower than writing to XML because database updates require update to indexes, etc. which can make lengthen the updating process depending of the number of rows and columns to be updated.  XML; on the other hand is pretty straightforward, just append the data to the file.  However, in my situation it does not matter.

a. The data, for the general user, will be read only .  Admin will be the only user updating the data.
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
writing to disk can be slow.

In general, that is not the case. Writing a plain file is pretty fast.

All queries start at the top of the file and read every record all the way to the end of the file. :(
Also, doing join queries are a nightmare in XML.

That is exactly the point. And that is what the database engine solves by indexing the data and caching the data for multiple reads.

/gustav
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
That seems to cover it.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions