Live data from Hacker News

Problems with Oracle SQL

codingtofreedom.com

31–40 of 277 posts

Re: Problems with Oracle SQL

#31
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…

Point 2 is no longer true. MariaDB has an Oracle compatibility layer now.

Re: Problems with Oracle SQL

#32

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.

Oh sorry, are you looking to insert 4001 characters in your varchar2? Buckle up kids, things are gonna get rough.

Re: Problems with Oracle SQL

#33

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.

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

First you accept that null and an empty string are the same thing. Then you insert a null.

Re: Problems with Oracle SQL

#34
Oracle SQL and PL/SQL is the better side of Oracle.

Having to install and maintain Oracle software is the real hell. You sometimes need a patch for the installer (I kid you not, the OAM 12.2.1.4 installer needs a patch to work on Oracle Linux). The syntax for Advanced Rules in OAM is not completely described in the manual, the examples are wrong, and you have to disable the parser in version 12.2.1.4 because it is doesn't work.

It seems every little task turns into an investigation into a series of bugs, errors, and undocumented features.

Re: Problems with Oracle SQL

#35
post #22

From a security perspective, keep in mind the errors like "access denied" or "password invalid" are typically bad not good when compared to more generic "table does not exist" or "failed logon attempt". These errors tell you something positive about the existence of something you don't have the rights to know about and that is a defect in my opinion. I not saying good error messages are not valuable or that Oracle's…

Unless "table does not exist" does take precisely the same time as “access denied” you still leak the same information by replacing the latter.

For logged in users I would prefer logging with explicit error messages. Like that you can tell if someone is poking around or was hacked. And still get clear error messages.

Re: Problems with Oracle SQL

#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.

Re: Problems with Oracle SQL

#38
post #22

From a security perspective, keep in mind the errors like "access denied" or "password invalid" are typically bad not good when compared to more generic "table does not exist" or "failed logon attempt". These errors tell you something positive about the existence of something you don't have the rights to know about and that is a defect in my opinion. I not saying good error messages are not valuable or that Oracle's…

That assumes developers with access to the database are a _threat_, which is not exactly the posture one might expect or prefer.

If your database error messages are exposed to users that actually are a threat ... that already seems like a world of pain.

Re: Problems with Oracle SQL

#39
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 can't agree with the Java one, there are great examples and docs out there.

Re: Problems with Oracle SQL

#40

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.

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

Obviously you prefix every string with a space and when reading, strip the leading space. Then " " is your empty string. ;)

For real though, no idea. I'm glad that I never had to touch Oracle.

Post reply on HN