Which Database table Schema is more efficient and why?
'Users (UserID, UserName, CompamyId)' 'Companies (CompamyId, CompanyName)'
OR
'Users (UserID, UserName)' 'Companies (CompamyId, CompanyName)' 'UserCompanies (UserID, CompamyId)'
Given the fact that user and company have one-to-one relation.
For sure, the earlier one is more efficient given that constraint. For getting the same information, you will have less number of joins in your queries.