8

I "love" when tables in database have columns such as UpdatedBy, Updated and this is the only audit that system has.

Comments
  • 7
    You'd really start sweating if you saw the databases that I have to work with daily. They're exactly how you described, except no one even came up with a standard so sometimes you get extra fields attached like IsDeleted and it can be a bit or a int or a byte and can have null variants of each variable type. And it varies on each table in the same database. Hold on, lemme grab some migraine meds.
  • 1
    It’s a start. At least there something. So many apps I have worked with which have nothing, including any type of logging.
  • 2
    I do this, but only for convenience when clients want this info on UI..
    We do have separate audit logs, so we got that going for us, which is nice.
  • 0
    @sladuled How do you model your audit logs? Asking for a friend. Coworkers aren't the best at designing databases and I don't have much to model mine after. I've been tying mine to update triggers and inserting them into an audit namespace that resembles the table plus an update timestamp and Id. But it's a good bit of work to set it up.
  • 2
    @vomitmachine Ooof, we use oracle so low level auditing for each record is done by the db.. not sure how because if I have to resort to that, I just bug our dbas to check for me who manipulated what..which almost never happens.
    For calls from the app we log the params of what is being called on the db, by which user at what time etc.. and that's usually enough for me to figure out what happened. For some settings I also add dedicated audit tables so it's easier for our support to find things. And the part that uses EFCF..fuck me if I know how that shit even works, so I'm dead if I ever need to check what was it doing with the db & how.. o.O
  • 0
    @sladuled thanks for explaining that. Maybe I should convince my coworkers to allow me to try other databases other than t sql. We had a mysql server setup for a few apps, but interfacing with all our apps was pretty hard, we didn't have a nice interface designed for our core systems.
  • 2
    @vomitmachine Yeah..I dread the day when we start moving away from oracle.. First coffe with coworkers this year - my boss: how is everybody?! Yeah all good? I have great news and some more great news..blah blah blah (other major projects planned for this year) blah we need to ditch Oracle for client x.. But we have by the end of the year to implement changes, so no problem.. Guess who didn't even start to discuss the alternatives we can use yet..🤣🤣🤣🤣
  • 1
    @sladuled those unexpected arbitrary tech jumps are more than annoying. "you can rewrite our entire database in a month right", buddy, we have over 150 apps using this database with a handful using unit testing. And only five of them use layers in front of the db. You want to complain why it's going to take so long, complain to the contractors you hired and the guys who worked here before who seemingly didn't understand maintenance practices.
  • 2
    @vomitmachine would trade that every day for tables which have 3-4 columns with 5k JSON entries each cause developers are afraid to change schema of database 😂
  • 0
    I'm currently rewriting an entire system from scratch because the effort to try and normalize the current database model is as much as starting over.
  • 0
    @myss You aren't using metadata until you're querying against json inside your tables lol.
Add Comment