View Full Version : Flat File DB

08-25-2004, 10:06 PM
Hey all,

OK, so here's the deal. I want to create a flat file DB for a toy I'm working on. It will work like this:

1) The user will select an ththemployee's name from the dropdown menu.
2) When then name is selected, certain fields of information will change to reflect the new ththemployee name.

We're talking about 250 approximate ththemployees. Each "row" in the DB will have the following:

- name
- office location
- ththemail address
- phone number
- extension

I could do it with a WHOLE BUNCH of arrays, but that would get insane. Anyone have any suggestions on the DB? I've never done this before, but I know my JS pretty well.

- MT

08-25-2004, 10:32 PM
you could put is all as text in a tag and then with some predefined character combination split the text up into an array. but then you migth as well had put it in an array to begin with and save time not doing the split. and it would most likely be a pest to updated that tag mentioned earlier. Or you could put it all in a real db and then write it as an array when the file is called which makes it easy to update the db but mostlikely take up some more bandwidth than the previous mentioned idea.
Or my 1st and last idea you could use an XML approach I am not completly sure as to how you incorporate js into an XML or the other way around but I am sure it can be done and if can't you can emulate xml storage using normal html tags like for instance the table,tr,td tags as a logical build up storage. just remember to hive those tags and then with java script fetch the names in the employer name column and the then when an employer name is selected in the drop down thing fetch the values from the table corresponding to the emplyoername.

I am quite sure I haven't quite understood what you question actually was lol :)

08-25-2004, 10:54 PM
Could this be done more easily with perl? Again, I want to stick with the flat file concept.

- MT

08-26-2004, 12:48 AM
i did a computing project with an access database with javascript and an activex to access it. It depends on its use as activex requires consent, so an intranet or desktop use you could easily get away with.

if you want to know let me know as i have a full documented project on it.

it makes use of sql aswell.

EDIT: the link for the section of code posted on here http://www.codingforums.com/showthread.php?t=31730

If you need anymore help i would be able to assist you.


08-26-2004, 01:01 AM
With pure Javascript it would be ugly, but using Perl opens up some opportunity:

Hope that helps,

08-26-2004, 10:20 AM
if this is an IE-only project you could always use a Tabular Data Control (TDC). see this forum's sister site for more info: www.javascriptkit.com