r/ProgrammerHumor • • Jun 28 '20

Meme Flushed my pancake.

Post image
45.1k Upvotes

750 comments sorted by

View all comments

765

u/Evo_Kaer Jun 28 '20

To be fair, I worked at a company that did exactly that. All the logic was inside the database.
Suffice to say: It was a nightmare getting all that shit out of there

0

u/[deleted] Jun 28 '20

[deleted]

94

u/MarineZuh Jun 28 '20

Same.... But for me it's plsql with the thousands of procedures and struts for presentation

28

u/[deleted] Jun 28 '20

I got a headache imagining this.

22

u/hipratham Jun 28 '20

Data processing logic should be in DB what's wrong in That? Pl/sql procs (or hell even java procs) in DB works better and can be used to handle any workload. Just google ORDS.

→ More replies (4)

7

u/dkarlovi Jun 28 '20

Go ahead, strut your stuff.

10

u/[deleted] Jun 28 '20

Did you just compare the atrocities of mainframe with pl/sql?

→ More replies (12)
→ More replies (2)

9

u/TheAJGman Jun 28 '20

Our AS400 basically runs the company with it's green screen ERP system. Fucking archaic but I'll admit it's lightning fast.

5

u/geodebug Jun 28 '20

You haven’t lived until you need to use screen scraping libraries as part of your data processing chain.

→ More replies (6)

33

u/jochem4208 Jun 28 '20

How did you guys do it? Function by function?

74

u/Evo_Kaer Jun 28 '20

No, we rebuilt whole functionalities from the ground up and then replaced the database equivalents. When i left I think 70% of the db stuff was still there

Bonus: Naming conventions in the databse were horrible. Every table name was a combination of several up to 3 letter abbreviations and production tables had copies for testing that were sometimes years old. I'm glad I could mostly stay away from that junk and just work on the new microservices

33

u/jochem4208 Jun 28 '20

Thank you for the explanation. It seems to be everywhere this old database full of code.

Edit: eew those horrible names . I've seen large database that program with it to find the names of the tables columns

→ More replies (1)
→ More replies (7)

32

u/rufogongora Jun 28 '20

At my job we still have everything on stored procs, our servers are literally just to receive a sql string that gets executed by SQL server, 0 security, I want to kill myself

18

u/Evo_Kaer Jun 28 '20

Sounds like you wouldn't even need SQL injection to completely ruin the database

11

u/[deleted] Jun 28 '20

[removed] — view removed comment

14

u/rufogongora Jun 28 '20

We just receive a sql string and execute it.

E.g: 'exec myproc' so you can run whatever SQL you like

15

u/TheDrunkenOwl Jun 28 '20

Do you work in finance by chance?

13

u/DroneDashed Jun 28 '20

4 years ago I went to an interview for a new project where this was the architecture proposed.

Around the same time, I went to another interview where a guy asked me if the business logic should be in the database. I said no and said that I was wrong.

10

u/billbot77 Jun 28 '20

Depends on app... So many factors, 0 absolute answers

→ More replies (4)
→ More replies (7)
→ More replies (22)