Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to create Master database table in sqlserver 2008.

suppose if i have 10 tables and i have changed the data in the master table it has to be effect in the child table also ...pls can anyone knows tell me the answer..it will be helpful for me

user-image
Question ajoutée par sharath kandukuri , Dot NET Developer , IBrix Technologies
Date de publication: 2013/05/06
mohmed osman mohmed lotfy alameen
par mohmed osman mohmed lotfy alameen , محاسب و مدخل بيانات , و متدرب على تصميم برامج الحاسب باستخدام فيجوال ستوديو , محكمة المنصورة الابتدائية

you can make relations between tables by the explorer window on the left of the screen by choosing the tables you want but you must take care of the logic relation between relative data in all tables to the master table by code and making a primary row on the master table and a secondry  row on the child table that is related by code to each other 

i hope i hit the right answer

shakeel mir
par shakeel mir , Senior Software Developer , Rawat-Al-Makan

two ways to solved this problem, you can break the relation with parent child or you add the following Cascade option enable in Tables, you removed it.
i think your problem will solved

Adrian Lorentz
par Adrian Lorentz , Principal IT officer (analyst-programmer) , A.N.P.

Hello, the concept of inheritance from the object oriented programming does not apply in the SQL programming ...
I think this is the problem.
I am not aware to be possible in SQL to do the things you need automatically.
The only thing that I can suggest is that you have to use a trigger in order to propagate the changes that were made.

VISWANATH LEELA KRISHNA
par VISWANATH LEELA KRISHNA , Database Administration , GULF BANK, KUWAIT

Create After Update, After Delete trigger in Master table and writer necessary SQL scripts in triggers to do changes in child tables.

Mohammad Qusai AL Sabbagh
par Mohammad Qusai AL Sabbagh , Senior SQL Server DBA, Consultant, & Corporate Trainer , Sitespower institute

You can use replication (Snapshot or Transaction Replication)

or you can use triggers (After insert / After update / After delete)

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?