Sources of Data

I am new to programming and I'm starting to put together programs.  I however lack the experience to know where to use an XML file for certian types of storage or and SQL database setup (or even an Access database file for that matter).  Is there a tutorial or general guidelines as to how much data can and should be stored in each of these data storage files?  I am clear one thing though, the SQL database file can and does hold a ton of data.  How about the other formats?

Any guidance would be very much appreciated.

Thanks.
LVL 1
GordanMAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
1) A light-weight system has few moving parts, and only provides basic support functions.  If you read and write XML files as a DataSet, you can still access the data, and do some rudimentary things, like filtering and sorting with a DataView, but you can't specify indexes and other such important database functions.

2) A medium-weight system would be something like MSDE, Access, SQL Server Express

3) Sometimes, when I need something quick and easy, and I don't want to have to mess with setting up databases and all that stuff, I just create XML pages and read/write like a database, cuz it's simple to implement.  But, this is only for a narrow range of applications.

Bob
0
 
jonorossiCommented:
Most people tend not to use XML to store data unless it is a small amount or is only going to be accessed by one person at a time like a data format for a general program (*.docx the new *.doc is XML) and config files (App.Config and Web.Config). If you are building a web site and expect only a small amount of traffic then you could get away with using XML and caching it, XML tends to be a little heavier than a database when updating or inserting data because you need to load the whole XML document into memory to work with it. Microsoft Access databases are good for a small amount of data when you want to allow several people to access and modify it at the same time but SQL Server is your application when you need it to scale. You can started with SQL Server Express (which is free even for commerial use) and then when your application needs to scale or gets larger than the 4GB limit you can use SQL Server without any changes to the database. However everything I have is all just an opinion and your application might work with either of the storage products well but one should stick out as the more appropirate.

Jono
0
 
Bob LearnedCommented:
1) While most people don't like to use XML to store data, it is pretty simple to use, so if you are looking for a light-weight system, you could create XML files, and read/write with DataSets, using the DataSet.ReadXml/WriteXml methods

2) Using SQL Server or Access requires the MDAC be installed to the client machine.

3) There are a lot of different reasons for picking a full-blown DBMS over a XML file-based database.  If you are looking to implement something for yourself, and you don't want to mess with an outside database system, then XML would be a perfectly good direction to go.

Bob
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
GordanMAuthor Commented:
Bob,

How would you define a light-weight system?  What would you consider a medium-weight system?

I know that the heavy weight is the SQL server solution.

Thanks.
0
 
MasterThaiCommented:
light-weight would be something containing less then at most a hundred or so items
personally i'd rather deal with a datbase then have to look at a XML file
0
 
jonorossiCommented:
Most people will also find querying a database using SQL and designing a database easier then using XPath and making a xml schema. Your deployment environment will make a big impact on which storage method you choose like Bob was saying.
0
 
GordanMAuthor Commented:
Thanks for your response Bob.  I have a better idea of the direction where to go.  Once you get to know the fundamentals of programming, there are many "forks in the road" where if you take the wrong turn it could be a huge waste of time.  That is exactly what I want to avoid.

;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.