Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a project to develop an inventory system for a medical shop. Till date, I confronted simple requirements which were fulfilled with XML as the backend db. My interaction knowledge with XML is pretty-good and I can make almost anything with XML using LINQ-TO-XML.

Since, this is an inventory system, I am bit confused as to which database should I use. Can i stick with XML or proceed with SQL Server 2008. In case I use SQL Server, will I need to install the SQL Server on Client Machine as well. This is important information because SQL Server is a commercial product, hence i need to include this in my project estimation cost.

share|improve this question
1  
Note that SQL Server 2008 Express Edition is free, with a few size limitations (10GB database, 1GB memory), but you probably shouldn't go past these on a desktop application anyway. –  Paul Stovell Sep 10 '11 at 13:36
    
Thanks Paul for letting me know the size limitations. This was unknown to me –  Pankaj Upadhyay Sep 10 '11 at 13:53
add comment

2 Answers

up vote 7 down vote accepted

You don't need SQL Server. You can use any number of open source databases such as MySQL and PostgreSQL. There are others such as MongoDB, CouchDB, neo4j, etc, but you're not really in need of NoSQL solution (and imho, they have a little more of a learning curve as they aren't ORM friendly and still relatively new).

Depending on the size of the application, I might also recommend SQLite, which is a file-based database ;) However, I'd only recommend SQLite if you don't have a large number of concurrent users or a very large dataset. See this document for further reasons as to why to and not to use SQLite.

I would highly suggest not using XML for your back end solution as it isn't scalable and much more error prone than using a proper database solution.

Take a look at http://sqlite.phxsoftware.com/ for a managed wrapper for SQLite.

Side note: I haven't used C# in a number of years, so I may be missing something in terms of managed support outside of SQLite.

share|improve this answer
    
I have downloaded a free software from HERE and curious to know which database type it uses. I can't find anything in it's installation or AppData/Local folder –  Pankaj Upadhyay Sep 10 '11 at 7:23
    
Can't help you there (don't have a Windows machine at home and I don't have wine installed atm). Why don't you ask them through their tech support? –  Demian Brecht Sep 10 '11 at 7:29
    
hmm....will give it a shot, if they are willing to tell....thanks –  Pankaj Upadhyay Sep 10 '11 at 7:31
    
No problem. I'd be willing to bet that if there's no server setup on your machine (I don't know of a way of automating a server setup through an installer) during the installation, it's either using MS Access or SQLite. –  Demian Brecht Sep 10 '11 at 7:37
add comment

While your requirements are not very clear, here are some points you need to consider:

1-XML has no indexing mechanism, if you want to search by several criteria or join different data you can't

2-XML data is mainly plain text, it can be tampered with easier than a database

3-XML does not provide aggregate functions like SQL - So you will need to code aggregate functions, etc.

4-XML has no concurrency management, you work with a file not a row

5-User security and user rights need to be secured - This is usually handled via database or Windows integrated security

6-Most report generators require a data source that is either csv or a database (of course you can build a datatable or similar using XML and pass that to the report generator as an object, this depends on your selected tool)

7-Databases offer simple and generally quick backup.

8-You can add/remove columns from database with relative ease

9-Database offer consistency checks and constraints as well as transcriptional processing allowing you to rollback in case of errors.

10-Databases offer stored procedure that allows you to encapsulation server logic within them

11-Using a database, you can allow your user to enter dynamic sql queries instead of programming every possible report

As "Demian Brecht" suggested, you can use SQLLite, MySQL, SqlServer/SqlServer Express, SybaseAnyWhere, and the new "SQL Server Denali". This link may also help you: http://stackoverflow.com/questions/3630/sqlite-vs-mysql and XML vs SQL for small projects?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.