Loan | Best Search Engine | Mortgage | Free Ringtones | Credit Card Consolidation
ADO.NET and Relational Data problem.....how start? [Archive] - PCMech Forums

PDA

View Full Version : ADO.NET and Relational Data problem.....how start?


gicio
03-02-2003, 04:05 PM
Hi!

I will write an application that work with an Access DB.
My database have 5 table that have a relationship to each other.

tables in DB:

Table 1: Car: CarID, Manufactore, Colour, Hp, Displacement, Price, Model
Table 2: SaleContractCar: SaleContractID, CarID
Table 3: SaleContract: SaleContractID, CustomerID, Date
Table 4: Customer: CustomerID, CustomerAddressID, Tel, Age, SeconCar, Name
Table 5: CustomerAddress: CustomerAddressID, Street, StreetNr, Zip, City

relationship between the tables:

Table 1 (one to more) Table 2
Table 2 (more to one) Table 3
Table 3 (more to one) Table 4
Table 4 (more to one) Table 5


at this moment I don't know how to start.

should I first load all tables I one DataSet?
and create for each table a DataTable?

how I should start?
how I should write an update SQL statement for this DataSet?

where I can find some sample application that work with Relational Data?


thx!!

doctorgonzo
03-03-2003, 09:15 AM
Loading all the tables in one data set isn't going to be of much use. There are too many relationships there.

What I would do first is just write down on a piece of paper all the different ways you or somebody else would want to get information out of the database. Some examples are Sales contracts by car, sales contracts by customer, customer contact info. Then you can create queries to pull that info out.