I am bit confused over composite Primary key
I have 2-table as fallows
My current composite primary key is applied on table SalesOrder
And on (RecordNo,SalesType,FinancialYear, CompanyId) which are
also present in 2nd table SalesDetails .
So every time when I required a particular record I have to apply join
SalesOrder and SalesDetails on each columns of composite primary key.
Is it a good idea to denormalized all these columns ? and addind new column Suppose.. (PKeyOrder = RecordNo+SalesType+FinancialYear+CompanyId),
And create a single primary key on newly added PKeyOrder column.
This will surely reduce no of joints but increases overheads on by tables,
Which is better solution.