Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple design question
Message
De
22/09/2005 00:33:28
 
 
À
21/09/2005 13:24:43
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01051245
Message ID:
01051844
Vues:
15
Hi

Thank for the infor, but how do I use it
I don't get any result when run under
my database. Please advise.

Thank you

>V,
>
>The data you are after is already stored in the INFORMATION_SCHEMA tables:
>
>
>select
>	ccu.table_catalog + '.' + ccu.table_schema + '.' + ccu.table_name as ChildTable,
>	ccu.column_name as ChildColumn,
>	ctu.table_catalog + '.' + ctu.table_schema + '.' + ctu.table_name as ParentTable,
>	ccu1.column_name as ParentColumn,
>	ccu.constraint_name as ConstraintName,
>	rc.match_option,
>	rc.update_rule,
>	rc.delete_rule
>from information_schema.referential_constraints rc
>	inner join information_schema.constraint_column_usage ccu
>		on ccu.constraint_name = rc.constraint_name
>	inner join information_schema.constraint_table_usage ctu
>		on ctu.constraint_name = rc.unique_constraint_name
>	inner join information_schema.constraint_column_usage ccu1
>		on ccu1.constraint_name = ctu.constraint_name
>order by
>	ChildTable,
>	ChildColumn,
>	ParentTable,
>	ParentColumn
>
>
>>Hi,
>>
>>Anyone have done the following database design,
>>
>> -All the tables in a database relationship(primary & foreign key) and link are
>> save in a table for fast reference.
>>
>>I need some reference on how to do the above mentioned design
>>as my application need fast reference to which table is related to
>>which table and any changes, which table will be affected. I don't
>>refer to use trigger as I have lot of tables.
>>
>>I am designing my own but want to know from other which might
>>give me a better design concept and ideas.
>>
>>Thank in advance.
Best Regards
Virusim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform