More Trigger Fun
Another scenario that will not work in a multiuser environment. Seems like a case for an on-commit fast refresh materialized view defined as ...
Select COUNT (*) num_rows
FROM mytable
Where relationship = 'friend'
having count(*) > 2;
Place a check constraint on num_rows to say 1=0 and there you go ... multiuser compatibility for a multirow constraint.
4 Comments:
oh, so now you're answering questions by pointing people to your blog? Interesting...
It's a technique that might catch on!
Actually I posted on a similar issue a few days ago, and then earlier today when the same sort of question cropped up ... eventually I just couldn't stand the stress of no-one pointing out that triggers like that don't work in multiuser environments, so I linked back to the blog.
Come to think of it, it's kind of like answering questions on a blog just so you can link to books that your consultancy has published ... so obviously there's nothing unethical about it! Just for a laugh search here http://dba.ipbhost.com/index.php?act=Search&f=2 for posts that include the text "rampant-books"
No
Just for a laugh search metalink for dba-oracle.com :(
Oooo, that's a good game, Niall. I like it.
Post a Comment
<< Home