Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>The companyID should be autogenerated by SQL Server. It will keep track of all that for you. No need to track "next ID".
>
>>Up to now we have kept different companies' data in different directories, so there hasn't been a question of which company owns a piece of data. We are now creating an add-on product that keeps its data in sql server and plan to keep several companies in the same database with a Companies table that assigns a CompanyID for each company.
>>
>>I wonder which other tables should have a CompanyID column. It seems enough to indicate companyID in the top table of a group of tables that are related as parent/child/grandchild. Or should each record of each table indicate to which company it belongs? The second alternative opens up the possibility of conflicting CompanyIDs being stored in parent, child and grandchiled records.
>>
>>I'd appreciate suggestions.
>>
>>TIA,
>>
>>Alex
It is autogenerated. Thank you.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement