Re: Writing data to disk?!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



What you really need to ask yourself is how you or your customer wants to
store "data" and what exactly the "data" is. Different formats (database,
flat file, etc) have pro's and con's with them and they need to be
considered when making this decision. You should not look for the "simple"
way to do data storage but instead look for the method that gives you and/or
your customer what is needed.

For instance here are some questions/thoughts for you to consider when
choosing a data storage design.

Is the data going to be shared (updated, added to, deleted from, etc) my
multiple users? If so then a DB is better because it has the notion of
locking records.

Is the data very simple? Maybe an XML file would work if it is only
configuration information being saved.

Will there be the notion of multiple instances of these files (user 1, user
2, etc.)? Maybe flat files would be better for this.

Will there be only 1 instance that is shared by multiple users? Maybe a DB
would be better.

How will the data be upgraded? How will this be handled - copies of
files/tables or some other method.

Will you need want to keep a "roseta stone" (aka key) to some home brewed
file format? This is something that you will need if you do not follow some
standard format (database, xml, etc). You dont want to open up a file and
have a bunch of garbage in it and have no clue what it is do you?

Is it a bunch of small values or only 1 or 2 large/huge values (such as an
image)?

Will you need to query this data for a report or something? Databases are
great for this!

Who will be responsible for backing up the data? Your program (maybe flat
files are better) or will your customers IT department handle this (database
server is better maybe)? This is a very important one to keep in mind since
if your program handles user entered data they will want a backup to be done
at some point and if you can push it off on them then it is one less thing
for you to worry about when the system crashes!

As for what options you have here are a few that I can think of. I am sure
there are others though.
- Database servers (SQL Server, MySQL, etc.)
- Database files (Access, etc.)
- XML
- INI files
- Registry
- Flat text files
- Flat binary files (home brewed files)

What is all comes down to is requirements. Either the ones your customer
imposes on you, or the ones that your application imposes on your customer.
You cannot support everything in every application... or can you? :-)

Hope this helps!


"Chris Springer" <cspring@xxxxxxxxxxxx> wrote in message
news:m7ednR_nCLOPzjreRVn-qA@xxxxxxxxxxxxxxx
> I'd like to get some feedback on the issue of storing data out to disk and
> where to store it. I've never been in a production environment in
> programming so you'll have to bear with me...
>
> My question is about storing data in a database. Yes I understand that
> you can link to a database in your program and read and write to the
> database etc etc. Well, that's all find and dandy but what if the person
> you're writing the application for doesn't have SQL/Access or some other
> database provider to use? Does Microsoft provide a class library to make
> disk/data storage simpler without having to write individual pieces of
> data out to disk? I've done a bit of searching through the MSDN online
> documentation using Serialization, marking code as serializable, and then
> writing it out to disk...and actually got it to work...but is this
> efficient or does MS have another way that's simpler? I'd just like some
> feedback if anyone has the time...
>
> Thanks,
>
> Chris
>
> --
> Securing your systems is much like fighting off disease -- as long as you
> maintain basic hygiene, you're likely to be okay, but you'll never be
> invulnerable.
>
> Steve Shah - Unix Systems Network Administrator
>


.



Relevant Pages

  • Re: Transaction processing advice
    ... screen on my server where the data are entered into the database. ... handles sending the emails to the customer and the seller. ... Sometimes it is worthwhile to wait a few seconds and retry the connection ...
    (comp.lang.php)
  • Re: performance in a large table
    ... true source of the problem is not that difficult these days. ... Server load but that doesn't mean you can't fix that. ... Our biggest customer has a 1.1 TB database and they are not ...
    (microsoft.public.sqlserver.clustering)
  • Re: A Quality Penetration Test
    ... I've once worked for a VAR that sold vulnerability scanning/discovery ... Advanced External Penetration Test that our team delivered to a customer. ... to use those unchecked variables to penetrate into our Customer's Web Server ... automatically dump the contents of the database when executed. ...
    (Pen-Test)
  • Re: performance in a large table
    ... Determining if the SAN is the bottleneck and the true source of the problem is not that difficult these days. ... Most SAN's are not properly configured for a high end SQL Server load but that doesn't mean you can't fix that. ... It really sounds to me like the database code or schema is simply not optimized for such a large db and that needs to be addressed first. ... Our biggest customer has a 1.1 TB database and they are not ...
    (microsoft.public.sqlserver.clustering)
  • Re: teaching a child - console or GUI
    ... written back in '95 based on Paradox, now I'm asked to do a new version. ... universe - the demanding and unpredictable database. ... > is fully capable of running without the server online... ... What if the customer has more than 65535 items in stock? ...
    (comp.lang.pascal.delphi.misc)