sircatsquid Posted May 30, 2013 Share Posted May 30, 2013 I know that you aren't suppose to have duplicate data in the database but I need to have this data as backup in these tables in case the foreign data gets removed.Like all the users in one table and lets say blog posts in an other if the user gets removed I still want the username stored in the blog table. While writing this I just realized that I might not ever remove any data just flag it out and update the sensitive columns to blank. But still going to ask is there a way to link column data to be updated between two tables like the foreign key updates if the foreign data change id. My educated guess is that this is something solved on the server side and not in SQL. Link to comment Share on other sites More sharing options...
jaseervp@ymail.com Posted May 30, 2013 Share Posted May 30, 2013 you can use trigger Link to comment Share on other sites More sharing options...
birbal Posted June 3, 2013 Share Posted June 3, 2013 check this http://dev.mysql.com/doc/refman/5.6/en/innodb-foreign-key-constraints.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now