views:

163

answers:

7

In a desktop application, I need to store a 'database' of patient names with simple information, which can later be searched through. I'd expect on average around 1,000 patients total. Each patient will have to be linked to test results as well, although these can/will be stored seperately from the patients themselves.

Is a database the best solution for this, or overkill? In general, we'll only be searching based on a patient's first/last name, or ID numbers. All data will be stored with the application, and not shared outside of it.

Any suggestions on the best method for keeping all such data organized? The method for storing the separate test data is what seems to stump me when not using databases, while keeping it linked to the patient.

Off the top of my head, given a List<Patient>, I can imagine several LINQ commands to make searching a breeze, although with a list of 1,000 - 10,000 patients, I'm unsure if there's any performance concerns.

+2  A: 

I think 1000 is to much to try to store in XML. I'd go with a simple db type, like access or Sqlite. Yes, as a matter of fact, I'd probably use Sqlite. Sql Server Express is probably overkill for it. http://sqlite.phxsoftware.com/ is the .net provider.

Darthg8r
I've been playing around with this lib on personal projects and it's fantastic.
CptSkippy
Yes, and even better, it works for the compact framework. SQL CE stinks!!!!
Darthg8r
+6  A: 

Use a database. Mainly because what you expect and what you get (especially over the long term) tend be two totally different things.

geofftnz
LOL, I think 3 of us hit "Submit Answer" at the same exact time... with the same answer
mc2thaH
Even if expectations for a 'typical' system are met, you want your app capable of handling a few exceptional customers as well.
Joel Coehoorn
+1  A: 

I would recommend a database. You can use SQL Server Express for something like that. Trying to use XML or something similar would probably get out of hand with that many rows.

For smaller databases/apps like this I've yet to notice any performance hits from using LINQ to SQL or Entity Framework.

mc2thaH
A: 

I would use SQL Server Express because it has the best tool support (IDE integration) from Microsoft. I don't see any reason to consider it overkill.

Here's an article on how to embed it directly in your application (no separate installation needed).

Eric J.
I wouldn't use SQL Express because of the additional overhead that comes with it. Remember, he's not looking to share data across the network, it's scoped to a local machine. SQL Express installs a service, plus you have to go and install the bulky management studio too. With Sqlite, there's nothing to install. It's a matter of simply referencing the DLL and connecting to the DB. No services running all of the time, taking up resources....
Darthg8r
There's no need to install the management tool for the runtime environment. This is really one of those "it depends" questions. SQL Server Express and SQLite are both legitimate solutions that offer pros and cons.
Eric J.
+3  A: 

This is completely unrelated to your question on a technical level, but are you doing this for a company in the United States? What kind of patient data are you storing?

Have you looked into HIPAA requirements and checked to see if you're a covered entity? Be sure that you're complying with all legal regulations and requirements!

scwagner
It's not a medical doctor.
Will Eddins
Also, checked the "covered entity" chart and it doesn't apply to this project. Thanks for the concern though.
Will Eddins
A: 

If you had read-only files provided by another party in some kind of standard format which were meant to be used by the application, then I would consider simply indexing them according to your use cases and running your searches and UI against that. But that's still some customized work.

Relational databases are great for storing data in tables, and for representing the relationships between tables. Typically there are also good tools for getting the data in and out.

There are other systems you could use to store your data, but none which would so quickly be mapped to your input (you didn't mention how your data would get into this system) and then be queryable against with least effort.

Now, which database to choose...

Cade Roux
A: 

Use Database...but maybe just SQLite, instead of a fully fledged database like MS SQL (Express).

ozczecho