I am pretty sure I need to use a database, but I wanted to verify. I am designing a small app so I can track my hours on the various freelance projects I do. I have come up with some tables to store company names, project names, and start/end times. I figure, because I will be storing information for at least 2 weeks, and sometimes over a couple months, I should store it in a database and just use C# for the form functionality, etc.
Yes, I am fairly new to programming in general, so this may be a no brainer but I had to make sure. thanks.
Store data in variables or a database?
Page 1 of 17 Replies - 285 Views - Last Post: 06 September 2011 - 06:03 PM
Replies To: Store data in variables or a database?
#2
Re: Store data in variables or a database?
Posted 06 September 2011 - 03:13 PM
Persistent storage vs in memory storage. Hope you aint doing any freelance work for me.
#3
Re: Store data in variables or a database?
Posted 06 September 2011 - 04:33 PM
No need to be an ass. I only do design freelance work, not programming because I'm obviously not ready. Thank you for the answer.
#4
Re: Store data in variables or a database?
Posted 06 September 2011 - 04:35 PM
You would want to choose some type of persistent storage, which variables are not. So database, flat file, XML file, anything that can be written to and viewed later.
Personally, I would use a database. That's actually what I did for the time entry app that I did for my work.
Personally, I would use a database. That's actually what I did for the time entry app that I did for my work.
#5
Re: Store data in variables or a database?
Posted 06 September 2011 - 05:02 PM
While I am impressed that you want to build your own application for doing this tracking... There is something to be said for not re-inventing the wheel.
ToDoList by AbstractSpoon is a wonderful, feature-rich and free tool built specifically for this. As the name implies it is built around the idea of making a todolist, but is hierarchical and you can start a timer for each element when you start working on it. You can attach files and link files to elements and so on. I've been using it for years and love it.
http://www.abstracts..._resources.html
And did I mention its FREE ?!
ToDoList by AbstractSpoon is a wonderful, feature-rich and free tool built specifically for this. As the name implies it is built around the idea of making a todolist, but is hierarchical and you can start a timer for each element when you start working on it. You can attach files and link files to elements and so on. I've been using it for years and love it.
http://www.abstracts..._resources.html
And did I mention its FREE ?!
#6
Re: Store data in variables or a database?
Posted 06 September 2011 - 05:04 PM
Variables are most certainly not persistent storage. They're around while the program is, and then they're gone, and they're not there when it starts again.
Databases can be a simple answer to persistence. Of course, so can an XML file. Depends on your needs. If you already have a DB server set up, it's a great way of doing it. If you don't, and don't want to set one up, look into Sql Server Compact. It's a "portable" database, in that it needs no server install. It's just a DLL that is added to your program. You can add one through the VS "Add" dialog.
Databases can be a simple answer to persistence. Of course, so can an XML file. Depends on your needs. If you already have a DB server set up, it's a great way of doing it. If you don't, and don't want to set one up, look into Sql Server Compact. It's a "portable" database, in that it needs no server install. It's just a DLL that is added to your program. You can add one through the VS "Add" dialog.
#7
Re: Store data in variables or a database?
Posted 06 September 2011 - 05:53 PM
tlhIn`toq - Thanks for the link. Sounds good, but I am doing this mainly to practice my C#.
Curtis - I have SQL Server 2008 R2 on my computer which seems overkill. I also have a SQL Server 2008 Express disc. Do you think I should uninstall R2 and instal one of the little guys? I will never need the power of a SQL Server full instal on my home computer.
Curtis - I have SQL Server 2008 R2 on my computer which seems overkill. I also have a SQL Server 2008 Express disc. Do you think I should uninstall R2 and instal one of the little guys? I will never need the power of a SQL Server full instal on my home computer.
#8
Re: Store data in variables or a database?
Posted 06 September 2011 - 06:03 PM
If you already have it, no need to get rid of it. Use that. Express isn't much smaller, it just contains less features, and is free. Also, if you wanted, there's R2 express out now.
But if you want to use an embedded database, you can give Compact a shot. It doesn't require an install at all.
But if you want to use an embedded database, you can give Compact a shot. It doesn't require an install at all.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|