Opinion Needed: Storing Small Amount of Records

L

Lint Radley

Hi Everyone,

I need an opinion here on storing data for a program I am working on the
processes DICOM images. Essentially, my program stores 25-45 (it varies
depending on the user) ranges of pixel values to search the image for.

Currently, I am using a .MDF database that requires SQL Express to be
installed. For only 25-45 records it seems like overkill to me. That
being said, I love the ability to easily update records, delete, add, etc.

Does anyone have any thoughts on whether I should explore other methods
for storing this data? If so, what is it? The key is to be able to
easily allow for modifications and additions.

Thank you,

Lint Radley
 
L

Larry Smith

I need an opinion here on storing data for a program I am working on the
processes DICOM images. Essentially, my program stores 25-45 (it varies
depending on the user) ranges of pixel values to search the image for.

Currently, I am using a .MDF database that requires SQL Express to be
installed. For only 25-45 records it seems like overkill to me. That being
said, I love the ability to easily update records, delete, add, etc.

Does anyone have any thoughts on whether I should explore other methods
for storing this data? If so, what is it? The key is to be able to easily
allow for modifications and additions.

What about XML? You can store your data in a strongly-typed dataset and
read/write via "DataSet.ReadXml()" and "DataSet.WriteXml()". You therefore
have the benefit of the native ADO.NET classes which provides adequate
RDBMS-like functionality with no external DB req'd. Keep in mind that you
lose the benefits of a full-blown RDBMS but for a small app it works very
well IMHO.
 
L

Lint Radley

Hi Larry,

I will look into this. I had thought about XML but didn't go too far
into checking the solution for suitability. Sounds like from your
description you can still bind to it?

Thanks,

Lint Radley
 
M

Mac McMicMac

Lint Radley said:
Hi Larry,

I will look into this. I had thought about XML but didn't go too far into
checking the solution for suitability. Sounds like from your description
you can still bind to it?

UI controls can be bound to an ADO.NET DataTable. The DataTable natively
understands XML, and can read and write to/from XML files directly:

http://msdn2.microsoft.com/en-us/library/system.data.datatable.readxml.aspx

http://msdn2.microsoft.com/en-us/library/system.data.datatable.writexml.aspx

If you are unfamiliar with ADO.NET, consider that a standard approach to
working with data is to query a database and load data into a DataSet or
DataTable via an ADO.NET DataAdapter instance. Note that a DataSet is
basically a container for DataTable objects. Data lives only in DataTables -
and never directly in a DataSet. To over simplify, you can pretty much think
of a DataSet as an in-memory relational database, as you can set up
DataRelations amongst contained DataTables. Anyway, you then bind your UI
components to the DataSet (specifying the particular DataTable) or a
DataView, or bind directly to a DataTable (DataTables are not required to
exist within a DataSet). The user can then update the data in the
DataTable(s) (perhaps via contained in a DataSet). You then persist the
changes back to the database with an ADO.NET DataAdapter instance.

Keep in mind that (1) DataTables have no clue as to where their data came
from. And (2) because DataTables natively store their data as in-memory XML,
they are capable of reading and writing directly to XML files on disk (no
need to get data from a typical database like MS Access or SQL Server). The
two links above have overloads you can use to read and write directly
to/from XML files on disk.

-HTH
 
L

Lint Radley

Hi Mac,

I really appreciate your write up here. I will be reading up on this
tomorrow. Thanks! :)

Lint Radley
 
S

sloan

This is what I do.

I create a directory like

DataStores\

and put things like

dicom.xml


and i do this

create a strong dataset

add a few rows using code and using the strong typed methods

ds.WriteXml(fileName);

look at it in notepad. save it in dicom.xml

then use the ds.ReadXml when I need it.

(as a previous person has said)

Its for my very very static data. But still updateable if need be.
 
J

JT

This is what I do.

I create a directory like

DataStores\

and put things like

dicom.xml

and i do this

create a strong dataset

add a few rows using code and using the strong typed methods

ds.WriteXml(fileName);

look at it in notepad. save it in dicom.xml

then use the ds.ReadXml when I need it.

(as a previous person has said)

Its for my very very static data. But still updateable if need be.







- Show quoted text -

This is only a heads-up. I have not used this, although it's been
approved for use at my organization. If you're definition of overkill
is a large footprint, maybe you should look into SQLite
(www.SQLite.org). Draw your own conclusions, but if you try it,
please update us.

JT
 
R

Rad [Visual C# MVP]

Hi Everyone,

I need an opinion here on storing data for a program I am working on the
processes DICOM images. Essentially, my program stores 25-45 (it varies
depending on the user) ranges of pixel values to search the image for.

Currently, I am using a .MDF database that requires SQL Express to be
installed. For only 25-45 records it seems like overkill to me. That
being said, I love the ability to easily update records, delete, add, etc.

Does anyone have any thoughts on whether I should explore other methods
for storing this data? If so, what is it? The key is to be able to
easily allow for modifications and additions.

Thank you,

Lint Radley

You can also use a small footprint database, which are basically DLLs
that you reference for the database functionality rather than full hog
databases.

There are several of these:

- SQL Lite
- SQL Server Compact Edition
- VistaDB

*Vista DB is not free
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top