3
mr-user
4y

I wanted to know what is the worst mistake you make on database.

I have actually implements the logic of token access control on database and not on business logic layer.

The database have a login procedure which accept username and password. That login procedure actually hash the password and try to authenticate user.

If it is a correct user , it generate a token. In other to use other procedure on database , you must provide a token. By using that token , the procedure know who is it and what permission is granted to that user.

Comments
  • 1
    I only discovered there were some procedures on the DB I've worked with for nearly 3 years. ...

    Everything was business logic until I found that there was no explanation for the behavior of one of the tables or what the hell could be making ... "oh shit is it?"

    That's more of a documentation / onboarding issue, but it was amusing.

    Word has it Lee Holloway who founded Cloudflare actually had huge amounts of logic in stored procedures that encapsulated a great deal of what Cloudflare did in the early days of that company.
  • 1
    @N00bPancakes

    Do you know any link where I can look at the database complete design as reference?

    I remember that there is such website but my memory seem to be failing me.
  • 1
    @mr-user Sorry I do not know.
  • 4
    @N00bPancakes Back then stored procedures were significantly faster.
Add Comment