View Full Version : Flat File DB
08-25-2004, 09:06 PM
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:
- office location
- ththemail address
- phone number
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.
08-25-2004, 09: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, 09:54 PM
Could this be done more easily with perl? Again, I want to stick with the flat file concept.
08-25-2004, 11:48 PM
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, 12:01 AM
Hope that helps,
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.