dbTalk Databases Forums  

Re: Primary/Uniqueness Problem

microsoft.public.sqlserver.mseq microsoft.public.sqlserver.mseq


Discuss Re: Primary/Uniqueness Problem in the microsoft.public.sqlserver.mseq forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Munu via SQLMonster.com
 
Posts: n/a

Default Re: Primary/Uniqueness Problem - 08-31-2010 , 11:14 PM






Munu wrote:
Quote:
Hi All
I am going to design hospital database
I have a patient table tblpatient(patientid pk,name,age,................)
another table that is tblyearly(yearlyid ,patientid fk,isadmit,department,....
)
another table is tblxray(sr pk,yearlyid fk,..........,..........,.........)
another table is tblurulogy(sr pk,yearlyid fk, .......,........,........)
patientid is unique in patient table and yearlyid must be unique for a year
eg for year 2010 yearlyid starts from 1 and ending at something
and at 1st january 2011 yearly id must start from 1 and ending at something
so that previous record of patient
and form tblxray or tblurulogy patients previous record also needed
ho i design

suppose in yearly table yearlyid starts 1,2,3,4.........and ends at
something( at year 2010)
and in yearly table yearlyid starts 1,2,3,4........and ends at
something ( st year 2011)
if any body updates,or selects(loads yearly id based patient record in grid)
previous yearly id's record that is attached with another patient will be
loaded into grid .
and in case update
update tblxray set bodyregion='upper leg' where yearly id=4
then previous yearlyid data will also be updated

Can any body help me
I would REALLY appreciate any advice
cheers
Noor Anwar
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...-mseq/201008/1

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.