I make many to many relationship in erd diagram in sql server 2005 between car and driver as following car table driver table car_driver table. I need to make fleet management program. When I make forms in windows form are i make car form driver form car_driver form When i insert data are creating three forms each form insert to related tables car table car form driver table driver form car_driver table car_driver form please help me
Not really sure what you're asking, but as I understand it, you're trying to make a management / admin-interface for assigning fleet cars - and show which driver has which car? If so, why not just have a table for cars, one for drivers, and perhaps a single table for assignments Car-table: ID, make, model, size, facilities, etc (all info you need for each car, basically) Driver-table: ID, name, abilities, special qualities etc. (all info pertaining to each driver) Assignment-table: car-ID (foreign key from car-table, ID), driver-ID (foreign key from driver-table, ID), time, place, etc. for each assigment You only need one form, with a select/dropdown for cars, drivers and extra info - all the info from this is stored in the assignment table If you also need forms to add cars and drivers, you will have these separately, of course You can then also limit the availability on cars and drivers by checking to see which cars and drivers are already assigned when someone tries to use the form (based on assignment dates etc.) Also, if you have different types of cars etc. you could create a form which limits the selection based on what is stored in the database, based on earlier selections in the assignment form. Apologies if I misunderstood your post - it was a bit unclear as to what you were actually asking.