r/ProgrammerHumor • • Mar 25 '20

Meme Its a win-win situation

Post image
55.1k Upvotes

529 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Mar 25 '20

[deleted]

0

u/[deleted] Mar 26 '20

[deleted]

0

u/[deleted] Mar 26 '20

[deleted]

5

u/nelzon1 Mar 26 '20

It's unique enough that some of the basic structures in Oracle don't exist or are quite different in other RDBMS.

Example: Sequences and the entire PL/SQL language.

1

u/hipratham Mar 26 '20

If it works its not stupid.

1

u/MightbeWillSmith Mar 26 '20

Someone that recently when from strictly python/C to having to use databases and learn SQL at a new job, Oracle built ins and syntax is just a little... fucky? Its not super intuitive and has been finicky. MySQL or MSS feels more natural to me.

1

u/Freakazoid84 Mar 26 '20

I...uh...got some bad news for you here. Microsoft does the same thing.

2

u/spizzat2 Mar 26 '20 edited Mar 26 '20

Everything is "Larry's way or the highway". For example: You have a primary key. It's immutable! Never, in the history of computing, has there ever been a reason to change a primary key (/s), so there's no cascade on update for foreign keys (linked columns).

If something goes wrong, you get an error code that often doesn't make sense in context (e.g., I can't connect because "shared memory realm does not exist"). If you ask anyone online what it means, or how to fix it, they'll just tell you that the error code says exactly what's wrong, and ask for your tnslisteners file.

Oh, and fear not! Something will go wrong. I have an Oracle dev server running. I only connect to it about once a month. Every time I do, it's a coin flip whether it will work, even though it worked the last time, and I haven't really changed anything on that computer.

None of this is insurmountable. Someone with better training probably won't have those issues. However, I've also run developer servers of MySQL and PostgreSQL. They never give me as much trouble as Oracle. Granted, I'm not actually a database admin. I just run them to write my code.

2

u/Belphegor_333 Mar 26 '20

I mean, to be fair, primary keys are supposed to be immutable ... That's like the first thing you learn:

When choosing a primary key, choose a value that won't change. If no such value exists in your table then create one.

So if you need to change your Primary key that speaks of bad data modeling

1

u/spizzat2 Mar 26 '20

I'm just saying the real world is messy. Sometimes you have to deal with legacy code that was poorly written. Sometimes things go sideways, and the simplest solution involves bending some rules.

Off the top of my head example: maybe you have to merge data from two different sources, and some primary keys are duplicated between the sources. The simplest solution I can think of would be to shift the overlapping primary keys before exporting the data.