Sunday, February 19, 2012

database design - joins on which fields?

Hi,

I,m trying to develop a relational database but confused so much & need help to streamline the basics of the the database design error free.


Below is the case,

There r six databases with the joined fileds as below,

Buyer( filed used to join with style / po / production / shipped = Buyer Name )
Factory ( filed used to join with style / po / production / shipped = Factory Name )
Style ( one style have multiple pos ) ( filed used to join with po / production / shipped = Style # )
Po ( one po have multiple styles )( filed used to join with production / shipped = Po # )
Production
Shipped

There is nothing unique in all the 6 databases to make any filed primary key.

If in Buyer database, if we change the buyer name then all the records ralated to this buyer disturbed in all the databases & same is the case for factory name, style # & po # in Factory / Style & PO databases & any of these changes in first 4 databases ( i.e Buyer / Factory / Style / Po ) also badly effects the record linking & records in Production & Shipped databases.

Need advice how to join the databases in this case?

Is I use the auto serial # method in all the 6 databases or is there other ways to do so?

Will appreciate if someone let me know the way or guide me on this?

Thanks / Sulman

Sorry, but due to this unclear information given, I think it is hard to find a quick solution for you, perhaps you post some DDL and sample data.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment