|
Triggers have their place. Like Global variables, and the rarely used GOTO.
growing up in Oracle, every table with an ID column got a sequence, and a trigger.
A Concept that bothered me (vs the simplicity of auto-increment), but I was grateful for before the "OUTPUT Inserted.ID" could accurately tell me the identity of an inserted row!
We used them to log changes across multiple applications (web and various clients), and those logs were used to restore data that was accidentally "lost" due to human error.
But when I have the OPTION of limiting access to a single application... You don't have to have them, and you really need to make sure you are not just being lazy... Or making a system overly complicated!
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: I found we use SQL triggers a bit too much...
336 triggers on 1450 tables... (~23%)
I never kept track because my coding responsibilities weren't close to the database but when I did have to work there I discovered way too much business logic in our stored-procedures and triggers. So much that it made diagnosing bugs extremely difficult. One of the stored procedures was a complex query that was so deep that it could take days just to figure out what the desired result set would be ... of course it was heavily commented (NOT!). I can't stand it when someone seems to intentionally write obscure, un-maintainable code.
If you think hiring a professional is expensive, wait until you hire an amateur! - Red Adair
|
|
|
|
|
I do not use them. I understand them. I understood their place back when databases often housed business logic in a client-server environment.
But - IMHO informed by experience - applications are scalable and reliable when databases are limited to CRUD operations, and business logic and whatever one once used triggers for, is placed in the compiled code in middleware.
Yes, it is easier to update a trigger, SP, view, or UDF since apps do not have to be updated. But as most can attest, the DB complexity mushrooms and performance is hurt.
Intelligent app architecture compensates for much of that.
My advice is to keep the DB to a CRUD machine, and leave the logic to the compiled code.
|
|
|
|
|
When I go to the CP home page the icon (favicon) in the Chrome tab is the twitter bird. Anyone else?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Nope. I would say some kind of Chrome's cache corruption?
"I'm neither for nor against, on the contrary." John Middle
|
|
|
|
|
phil.o wrote: Chrome's cache corruption? That's what I figured but I don't ever recall going to twitter before so not sure where it would have picked it up from.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Nowadays twatter, fishbook, etc. icons are everywhere; you may even have a hard time finding a website that does not try to link to these social media accounts.
But as to know why this supposed corruption has occurred, I'm useless. Does Chrome have a clear cache function? Did you try it?
"I'm neither for nor against, on the contrary." John Middle
|
|
|
|
|
Just you - mine is Bob.
(Chrome Version 61.0.3163.100 (Official Build) (64-bit))
Mind you, the lounge has a blank page icon instead of Bob...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: the lounge has a blank page icon instead of Bob... That happens sometimes too.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Looks like it's just you.
I am not the one who knocks. I never knock.
In fact, I hate knocking.
|
|
|
|
|
GKP1992 wrote: Looks like it's just you. I knew my mom was right. She always said I was special.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
No, but I do see blank page icons sometimes, like on this page (after I clicked reply) and most QA pages.
|
|
|
|
|
It's not working! Should I blame caching?
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Google "G" icon, I have not seen Bob in over a week as a favicon.
|
|
|
|
|
Old worker contains north-eastern mixed chip! (7)
Sorry for the delay; blame the keyboard / chair interface unit: it ed up.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Ancient
worker - ant
contains - ne
chip - ic
mixed
|
|
|
|
|
Is the right answer - you are up tomorrow!
The "contains" bit is NE for "north-eastern", IC for chip, mixed up inside the ANT.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: The "contains" bit is NE for "north-eastern"
Didnt bother stating it fully as it was so obvious
|
|
|
|
|
Figured you did - was just filling in the blanks for beginners.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
IC for chip? New one on me...
One morning I shot an elephant in my pajamas. How he got in my pajamas, I don't know.
|
|
|
|
|
|
Cut the young'uns some slack; you have to admit that the term is a bit old-fashioned these days.
OTOH, I still "dial" a phone number, so what do I know?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
And I "hang up" a call, "tape" a program, "write code" ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You also Drive a car (not a horse) and pull a non existent chain when you go to the toilet or at least you would if you lived in a significant country.
|
|
|
|
|
Modern Times, you know!
... such stuff as dreams are made on
|
|
|
|