-
ADO.Net Question
I am new to database programming, so bare with me. I have created an access database of which there are many tables. Each table will hold records of data captured on a specific date. You see I have these text files created on a daily basis and I want to suck them into a database. I shouldn't have much trouble perging the text files for the data I want to insert, but I do not know how to put certain data in certain fields. Each table is setup as:
date(txt file was made) | datapoint1 | datapoint2 | datapoint3 | etc...
One more thing, each text file has information for each one of my 32 tables, so I will have some hoping around to do. At this point, this functionality does not require any graphical intervention, just populating a database.
Any ideas on where to start? I have already made my connection using VS, not in code.
Thank you all.
-
Are the data of each day basically different? If not y bother with so many tables? I think you may think about redesigning your database.
-
I can not go into specifics, but lets say each table represents a state, and every day data is gathered from each state for number of cars, buses, trains, planes, etc...
So I was thinking that I would have a table of dates, and each state would have its own table, filled with records of each dates data. The "dates" table would have a one to one relationship to each corresponding date in each of the tables for the states.
I do not know much about the relationship thing, so I am open to suggestions.
I was thinking that as I gathered the bits of data from the text files, I would stick them into an array, then make a record from that array.
Thank you for your response...
-
Still i think you dont need that much table. If the data in different states are of the same kind, for example each state has buses, cares, ...you can have all of them in table linking with parent tables of date and states. It can be done by 3 tables then. To pump data from arrays to tables you may use datarow object.
-
How then would you link them? What would the relationships be?
Thanks again. I really appreciate your help.
-
1 Attachment(s)
Just a suggestion, look at the attachment. Remember that table cars does not need a primary key, but without that you have to manage to write the update statement yourself as VS wont build it automatically for you. A little hard to start with maybe.
-
Thank you Lunatic3. I will have a look at this tomorrow. I really appreciate your help.