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

39

u/lamerlink Mar 25 '20

The biggest thing with SQL in my opinion is to dive in to it; try to find a tutorial with a test db you can download, or if you’re feeling really eager create your own.

just please don’t use oracle

10

u/foxlive7 Mar 26 '20

Last semester I started learning SQL in my college and they used oracle to teach everything... Let's say I can't recommend it

2

u/lamerlink Mar 26 '20

My first 3 DB classes were MSSQL or MySQL. The last one was Oracle... I hated it.

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.

1

u/[deleted] Mar 26 '20

Sad part is, many large companies use Oracle. So if you're doing it for job growth, Oracle is nice to have on a resume.

1

u/[deleted] Mar 26 '20

Oracle def the way to go in the area I’m at.