Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 database Design Idea

Author  Topic 

modiagag
Starting Member

1 Post

Posted - 2007-05-23 : 08:00:36
Good morning
In messages system i have table to store messages and another table to contain the links which the message is posted through
Now i want to delete a link but i don't want to delete the message sent through this link

The problem:
When displaying the message sent what will be fount in the link field (i.e for the deleted link)
I tried to move the deleted link data to separate table (EX: deletedLink) but if the user added new link with the same name as the deleted link? The problem mainly in when displaying the message sent i will have the same link twice one for the deleted and the other for the added one.

If any one has a good idea for doing that please reply to me
I don’t want the sql code
I want just the idea
Thanks


mohammed Al maghraby

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-23 : 08:08:10
If Message and Link are so inseparable then I will suggest you keep a flag in the Links table which will indicate whether the Link is active or deleted (something like IsActive) and you can permanently remove the link only when no message is using it.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -