C# Programming, Flat File Database

100 views
Skip to first unread message

Adam

unread,
Nov 11, 2009, 12:00:51 PM11/11/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I need to use a flat file database for a program i am writing (users
needs offline portability).

What the program does is takes input data calculates a return value
based on certain criteria (ie if value 1 from import is within 0 and 3
take value 2 and multiply it by the criteria's column value)

Requirements:
* The INPUT data: imported easily from excel (the input xls can be
forced to be massaged/formatted by implementing SOPs)
* The INPUT data needs to be easily edited after the fact, incase key
values need to me tweaked or a flat increase needs to be applied to
the input values
* The CRITERIA data: imported easily from excel (same SOP can apply
that applied for input)
* The OUTPUT results need to be exportable to excel.


Now i am in an argument with the Project Lead as to what FlatFile to
use. He says we should rely heavily on MS ACCESS for importing the
INPUT data, manipulating the INPUT and CRITERIA.
I am railing against the use of MS ACCESS, period. I have a great
disdain for MS ACCESS and i am afraid it is blinding me to the
possibility that MS ACCESS is better to use than writing all the
editing and import functions into the C# program.

What i am asking is, Is Access a good solution for importing/
manipulating the IMPORT and CRITERIA data?, or should i write the
controls into my program and use something like SQLite for the flat
file?

SIDE NOTE: i want to keep the business logic layer of the app in C# so
that i can easily redeploy the application installation without needed
to worry about rogue users having outdated business logic code.

Cerebrus

unread,
Nov 11, 2009, 10:38:46 PM11/11/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Questions:

1. Define what you imply by "flat file". Also define what you mean by
the (oxymoronic !) term "flat file database".

2. Is your "flat file" actually an MS Excel spreadsheet (.xls) ? Or
you want to import data from an .xls into a flat file ?

3. Why can't the import be done directly from MS Excel ? Why does MS
Access have to come into the picture at all ?

Haven't had my morning coffee yet, so apologies if these are dumb
questions! :-)

Charles A. Lopez

unread,
Nov 11, 2009, 10:44:09 PM11/11/09
to dotnetde...@googlegroups.com
What is an SOP?

2009/11/11 Cerebrus <zor...@sify.com>



--
Charles A. Lopez
charle...@gmail.com

Registered Microsoft Partner

New York City, NY

I'm running on Windows 7 Build 7100

Quality Software Works

Charles A. Lopez

unread,
Nov 11, 2009, 10:50:30 PM11/11/09
to dotnetde...@googlegroups.com


2009/11/11 Cerebrus <zor...@sify.com>

Questions:

1. Define what you imply by "flat file". Also define what you mean by
the (oxymoronic !) term "flat file database".


Based on my experience, a flat file is typically data without implicit relations between the data.
 
2. Is your "flat file" actually an MS Excel spreadsheet (.xls) ? Or
you want to import data from an .xls into a flat file ?

3. Why can't the import be done directly from MS Excel ? Why does MS
Access have to come into the picture at all ?

Haven't had my morning coffee yet, so apologies if these are dumb
questions! :-)

Charles A. Lopez

unread,
Nov 11, 2009, 10:54:39 PM11/11/09
to dotnetde...@googlegroups.com


2009/11/11 Adam <adam.ch...@gmail.com>


I need to use a flat file database for a program i am writing (users
needs offline portability).

What the program does is takes input data calculates a return value
based on certain criteria (ie if value 1 from import is within 0 and 3
take value 2 and multiply it by the criteria's column value)

Requirements:
* The INPUT data: imported easily from excel (the input xls can be
forced to be massaged/formatted by implementing SOPs)
* The INPUT data needs to be easily edited after the fact, incase key
values need to me tweaked or a flat increase needs to be applied to
the input values
* The CRITERIA data: imported easily from excel (same SOP can apply
that applied for input)
* The OUTPUT results need to be exportable to excel.


Now i am in an argument with the Project Lead as to what FlatFile to
use. He says we should rely heavily on MS ACCESS for importing the
INPUT data, manipulating the INPUT and CRITERIA.
I am railing against the use of MS ACCESS, period. I have a great
disdain for MS ACCESS and i am afraid it is blinding me to the
possibility that MS ACCESS is better to use than writing all the
editing and import functions into the C# program.


Why are you manipulating the data with Access if you intend to "write a program"?
 
What i am asking is, Is Access a good solution for importing/
manipulating the IMPORT and CRITERIA data?, or should i write the
controls into my program and use something like SQLite for the flat
file?

SIDE NOTE: i want to keep the business logic layer of the app in C# so
that i can easily redeploy the application installation without needed
to worry about rogue users having outdated business logic code.

Processor Devil

unread,
Nov 12, 2009, 3:42:00 AM11/12/09
to dotnetde...@googlegroups.com
flat file database can be:
binary file where every columns is based on already defined length of characters (like sql), it means:
name (10 chars), surname(10 chars), email(20 chars), etc.
It can also be XML, unix database file (columns separated by commas, equal marks, etc)
It can also be serialized class or such things...

I have one question upon the OP:
so you need to write program that can "login" even if offline. It means that every user will have his own database flat file OR his own copy of database flat file... This can destroy the data consistency and also easily allow someone to change data in the flat file and bypass security...
I wonder if it wouldn't be better to have some sql server or some logon service on one computer of the network (eg on server) and all remaining computers would send their login credentials there (of course in encrypted form).
Good hint is that passwords and such data should be hashed.

2009/11/12 Charles A. Lopez <charle...@gmail.com>

Adam

unread,
Nov 12, 2009, 11:26:33 AM11/12/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Okay looks like i used the wrong terms to describe what i meant by
Flat File DB (upfront - my apologies!).

A little more on the project, its a Rate Simulation program where it
takes shipment weights and compares against rate sheets that the user
saves (so they are a production sheet that other users would have to
concern themselves with primarily) and gets the cost of that shipment
using sheet a, or sheet b....etc

On Nov 11, 10:38 pm, Cerebrus <zorg...@sify.com> wrote:
> Questions:
>
> 1. Define what you imply by "flat file". Also define what you mean by
> the (oxymoronic !) term "flat file database".
>

I mean a portable-ish Database File, something along the lines of
embedded databases (like SQLite), i group MS Access in the same group
simply because (and i am testing my knowledge here) it can for the
most part not rely on anything but the JET Engine for access and
SQLite takes it that much further and it's access engine/library is
integrated with the application its designed with.

>
> 2. Is your "flat file" actually an MS Excel spreadsheet (.xls) ? Or
> you want to import data from an .xls into a flat file ?
>

Most of this question goes away i think now that i found my
terminology misstep, The imported data is coming from an XLS into the
embeded database.

> 3. Why can't the import be done directly from MS Excel ? Why does MS
> Access have to come into the picture at all ?
>

The access has to come into play (from my project lead's perspective)
is so we can edit the imported data after the fact without writing in
extra code

>
> Haven't had my morning coffee yet, so apologies if these are dumb
> questions! :-)



On Nov 11, 10:44 pm, "Charles A. Lopez" <charlesalo...@gmail.com>
wrote:
> What is an SOP?

Standard Operating Procedure, required set of instructions/rules users
must follow to accomplish a task.
i.e. user received shipping appointment email, they must collect a
predefined set of caller details and record this in the appropriate
scheduling application.

>
> --
> Charles A. Lopez
> charlesalo...@gmail.com
>
> Registered Microsoft Partner
>
> New York City, NY
>
> I'm running on Windows 7 Build 7100
>
> Quality Software Works



On Nov 11, 10:54 pm, "Charles A. Lopez" <charlesalo...@gmail.com>
wrote:
> 2009/11/11 Adam <adam.cheese...@gmail.com>
>
>
>
> Why are you manipulating the data with Access if you intend to "write a
> program"?
>

the program has already been written using an online method (i.e.
reads shipping data from existing shipments and an excel rate sheet
that user provides)
The new addition will allow the user to give an excel sheet full of
shipments (shipments we don't exist in the system so we can quote cost/
revenue appropriately)

and i am trying to minimize the impact of introducing the embeded
database for creating portability. (i hope that makes sense...:S)

>
> --
> Charles A. Lopez
> charlesalo...@gmail.com
>
> Registered Microsoft Partner
>
> New York City, NY
>
> I'm running on Windows 7 Build 7100
>
> Quality Software Works


On Nov 12, 3:42 am, Processor Devil <processor.de...@gmail.com> wrote:
> flat file database can be:
> binary file where every columns is based on already defined length of
> characters (like sql), it means:
> name (10 chars), surname(10 chars), email(20 chars), etc.
> It can also be XML, unix database file (columns separated by commas, equal
> marks, etc)
> It can also be serialized class or such things...
>
> I have one question upon the OP:
> so you need to write program that can "login" even if offline. It means that
> every user will have his own database flat file OR his own copy of database
> flat file... This can destroy the data consistency and also easily allow
> someone to change data in the flat file and bypass security...

Because the data the user would have on their own db file doesn't
impact others, data consistency isn't a big concern (even though i
have brought it up in a project meeting, so it is something i have
thought about).
Reply all
Reply to author
Forward
0 new messages