Live data from Hacker News

Problems with Oracle SQL

codingtofreedom.com

91–100 of 277 posts

Re: Problems with Oracle SQL

#91
post #55

Earlier quoted context omitted.

Back in the day MS SQL was Windows-only and Postgres was not mature, so the choice was Oracle or DB2. And Oracle was more popular, because it used more progressive model (versions vs DB2 locks). Plenty of people who don't closely follow recent trends associate database with Oracle, so when they have a word, they'll choose it. Oracle it not that bad anyway, it's just stupidly expensive. I'd choose Postgres any day, bu…

> so the choice was Oracle or DB2 Sybase, Ingres

Don't forget about Informix. Early 2000's had several commercial databases.

I worked at both a Sybase shop and an Oracle shop. I far preferred Sybase.

Re: Problems with Oracle SQL

#92
post #87
post #36

In theory, Oracle is able to store timestamps down to the microsecond. In practice it rounds off to the nearest second if you try to touch it in any way, or even look at it slightly funny. So much so that the microseconds are practically unusable.

With which data type do you experience this?

TIMESTAMP WITH TIME ZONE when I tried to do some date arithmetic on an ETL job to load into Postgres.

Eventually I gave up, and fetched it back into Python and did the arithmetic there before sending it on.

It may have been that there is an obvious answer which I simply failed to find due to the fact that I hadn't used Oracle in a decade. But I went down a number of dead ends before coming up with an approach that worked. (And the person before me had simply not noticed the problem...)

Re: Problems with Oracle SQL

#93

This is missing my favorite oracle quirk: Empty strings are equivalent to null. Trying to insert an empty string into a NOT NULL column will fail, which took me a while to understand the first time I saw it happen.

One of oracle quirks for me is varchar2. What happened to varchar1? Nobody knows.

varchar1 was varchar. I should say "is", since varchar is still supported, they just recommend varchar2 since varchar "might change" (probably not...)

Re: Problems with Oracle SQL

#94

This is missing my favorite oracle quirk: Empty strings are equivalent to null. Trying to insert an empty string into a NOT NULL column will fail, which took me a while to understand the first time I saw it happen.

It was years ago I first came across this, after I'd already spent a lot of time with MySQL and MSSQL, and some time with PostgreSQL and Firebase. But I still remember having a massive WTF moment!

Re: Problems with Oracle SQL

#95
A completely prejudiced and highly reduced view on SQL implementations, but one that could reflect the general mood: in the camp of the good: PostgreSQL, SQLite; in that of the bad: Oracle SQL, MSSQL. Somewhere in between with a tendency to good: MariaDB

Re: Problems with Oracle SQL

#96
post #28

Earlier quoted context omitted.

So how do you insert an empty string into a NOT NULL column? Please don't tell me that it's not possible.

its... .... sorry not possible (can't store empty string in a NULL col either) for reals

Just store the string "empty" and hope there are no nihilists who've changed their names to match. Simple!

Re: Problems with Oracle SQL

#97
post #8

I've worked with databases for a while now and I've never advocated for moving to Oracle (I have advocated for postgres though). The long term organizational costs is a big factor - but an almost equally large factor is the fact that 1. I have never actually used their dialect and have heard absolutely terrible things about it 2. There is no non-enterprise DBMS available that uses something close to their dialect so…

> but the private on

Oracle was massive in the private sector 10 years ago, and it probably still is once you dig past the surface layer of nosql

Don’t forget that for a long term it was either Oracle or DB2

Re: Problems with Oracle SQL

#98

Earlier quoted context omitted.

I'm not sure why the hate against MSDN - at least for .NET, I found the documentation to be one of the best in the business -even a decade ago. I'd only put Go's docs ahead in terms of helpfulness. I cut my teeth writing .NET code, then switched to Java writing apps on Android - the step down in doc quality was quite significant.

MSDN and the whole ecosystem around it is a gem. MSFT isn't great at some (or even many) things but I've always felt MSFT really put a lot of effort into developer experience. I don't miss much about moving away from the MSFT orbit except for MSDN and their development tooling. I kind of got some of it back with Visual Studio Code but I still really miss the Visual Studio level of experience.

this guy came to the same conclusion https://www.youtube.com/watch?v=KMU0tzLwhbE

Re: Problems with Oracle SQL

#99
post #14

It seems to be the general rule of thumb that, when you want to google for an oracle error message, then exclusion of both oracle documentation site, and developer forums is your first criteria on the search bar. Same applies to Microsoft (large parts of MSDN), and now Amazon Web Services documentation (at least some parts of it). That's the reason StackOverflow works - it really solves programmer's problems, instead…

I'm not sure why the hate against MSDN - at least for .NET, I found the documentation to be one of the best in the business -even a decade ago. I'd only put Go's docs ahead in terms of helpfulness. I cut my teeth writing .NET code, then switched to Java writing apps on Android - the step down in doc quality was quite significant.

Microsofts documentation is a mixed bag, but mostly rather good, if you know how to read it.

An example of a place where it's bad is the Python API for Azure. I needed to call some service, I forget which, and everything was clearly just translated from C#. There's a function which takes a string as an input, except it doesn't, it takes one of three string, neither of which is mentioned. I assume that in C# it's an enum, and Visual Studio will just list the option for you.

Re: Problems with Oracle SQL

#100
post #10
post #6

Earlier quoted context omitted.

To be really fair, have you ever seen SQL error messages that don't suck? I do agree that Oracle's are the worst by far though.

I feel Postgres and SQL Server are easier to grok error states. Oracle seems to want to be an application platform more than a datastore

I don't have the experience to compare them to Oracle, but SQL Server and Postgres do have their own issues.

The infamous MSSQL "string or binary data will be truncated" error (fixed a while ago[0]), or the way either deals with unqualified access to columns which leads to surprises (e.g. in MSSQL subqueries or in Postgres's SECURITY DEFINER procedures).

[0] https://docs.microsoft.com/en-us/sql/t-sql/database-console-...

Post reply on HN