views:

132

answers:

4

I am looking at creating an application to record gym workout(set,reps, etc) and I was wondering what framework and database backend to use. I am currently thinking C# .Net 3.5 for the framework because I am familiar with it but I'm unsure about how to store the data. Originally I was thinking of xml files and parsing through them but that seems like more work then is needed. If I was to use SQL would I be able to run that from my own machine (Windows 7) and what would be the best method to connect? ODBC, LINQ etc.

Thanks in advance

+8  A: 

Linq-to-SQL is a very easy to learn, easy to use and straightforward way to map database tables 1:1 onto domain objects in C#. You can install the free SQL Server Express editions on your machine locally, and use Linq-to-SQL against those.

It has a great set of features, visual designers, and using LINQ queries against SQL Server tables is really quite powerful to use and nice to write.

So unless you have any specific requirements (like supporting backends other than SQL Server or such), I would definitely recommend going with Linq-to-SQL first.

Tutorials:

  • Scott Guthrie has an outstanding blog post series on Linq-to-SQL and how to use it - highly recommended
  • The NerdDinner ASP.NET MVC demo app also contains Linq-to-SQL and you can learn a lot from it - great 100+ page intro tutorial as PDF or in HTML format
  • a bit more advanced: Hooked On LINQ has tons of articles, demos, how-to's and so forth - for LINQ in general and Linq-to-SQL specifically
marc_s
+1. True. Castle Active Record is a nice alternative to Linq-to-SQL. I recently used it on an Oracle project, and was up and running in a very short space of time (probably due to having used Linq to SQL previously.)
RichardOD
Hi marc_s, any good links on a sample project where this gets used?, thanks
VoodooChild
+2  A: 

Hi there.

I would use SQL Server 2008 R2 Express for the backend. It's free and powerful enough for most smaller apps.

Cheers. Jas.

Jason Evans
+1  A: 

Not quite there yet, but this looks like a great place for SQL CE 4.0. Check out ScottGu's post about it: http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx

Dustin Laine
+1  A: 

Since it seems to be a small utility kind of application and the database wouldn't be very large I'd suggest to use the SqlCE database. It makes sense to have the database embedded in your app rather than have a server based database. That way you could easily just copy/share your app without having to bother about the database setup.

alwayslearning