Live data from Hacker News

Problems with Oracle SQL

codingtofreedom.com

121–130 of 277 posts

Re: Problems with Oracle SQL

#121

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.

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

But they are not. Empty string means "we know this is empty", Null means "We don't know".

For example, I have a second name. Some people don't have second names. And some records we might not even know if such exists. Null means "unknown". Empty string cannot be equal to null.

Re: Problems with Oracle SQL

#122
post #43

Earlier quoted context omitted.

Let me guess, did you get hit with more than one 3:00am?

Let's not forget that Oracle DB uses the system timezone as the datatype storage (not sure what other database do to be honest) so unless you were running your DB machine as UTC by default their timestamp storage would be ambiguous for DST shift and that's their default. Why wouldn't they store everything in UTC and use the system timezone for parse/formatting I have no clue.

I've been pushing to run ALL servers as UTC for a few decades now... always store/transmit date+time as UTC as well. If it's mapped to a locale, pair it with that locale... let the client translate to/from local.

Re: Problems with Oracle SQL

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

Links of MSDN pages seem like they have a life in weeks. They can be helpful to stumble across but never as a longer term reference.

Re: Problems with Oracle SQL

#124
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 currently taking my first foray into the world of MS applications for work. Have to write something that interacts with an EWS server and I’ve been… overwhelmed with not only the disorganization of their docs, but also the super strong push to do everything in C# instead of just telling me which SOAP (yes that soap) parameters/documents to use for certain actions. If anyone here wants to defend MS and tell me I’m…

Yes, pretty much everything is like that: explained in terms of their web services wrapper, not the actual messages sent on the wire. And if you want to log the SOAP messages going back & forth, you have to implement a weird listener class to get them. Microsoft came late to TCP/IP and the web because of their contempt for open, text-based network protocols, and you can still sense it in their products. For instance the C# web client is able to upload mime-encoded files, but the form data name must be `file`. It can't be `photo`. Let alone `photo1` in the same request as `photo2` or a bunch of photos named `user[photos][]`. And you should try reading the Stack Overflow answers for making Powershell print a raw HTTP conversation the way `curl -v` can.

On the other hand, if you do understand the underlying network protocols and can read them (and find ways to view what is happening), it is like a super power.

Re: Problems with Oracle SQL

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

It's weird to read all the complaints about how bad https://msdn.microsoft.com/ is. For quite some time all the documentation including what was known as MSDN is now on https://docs.microsoft.com/.

While I'm sure the complaints are valid (or was in the MSDN days) I believe Microsoft is putting a lot of effort behind these pages. You can provide feedback on pages that will result in a GitHub issue being created. You can even make pull requests.

While it's possible to provide feedback not all areas seem to process this feedback in a timely manner which of course is frustrating. However, the good parts (like .NET) are very good.

Re: Problems with Oracle SQL

#126
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 think the problem stems from 2 major parts.

A lot of times the people writing the code & designing the APIs for the complex parts of AWS, Java, .NET, Spanner, etc... are highly-technical and not exactly highly articulate.

And even the ones that are highly articulate usually have trouble figuring out who exactly their audience is and what their audience knows and to what degree they need to explain things.

And even the select few programmers who are good at this, run into another set of problems. The language they use amongst themselves is usually highly technical (because it reduces confusion and speeds up communication). However, many of the readers of the documentation aren't going to understand a lot of these terms or concepts. The language needs dumbed down.

Because this is time consuming and requires a lot of thought - the documentation is usually written by technical writers. While these people are usually good at figuring out the audience and how best to communicate with the audience - they have their own unique way of writing (for clarity) that usually causes the documentation they produce to feel non-concise and sometimes not even clear.

I think a good example of this is the Apigee documentation: https://cloud.google.com/apigee

After reading the page - I only have the vaguest idea of what it actually does and I have almost no idea when I should use it and when I shouldn't or how it actually works (which, tbf, probably isn't important at this stage).

Re: Problems with Oracle SQL

#127
post #28

Earlier quoted context omitted.

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!

Use vertical tab, or another whitespace or field separator character, like EOF etc. Generally something a modern keyboard won't be entering, and won't generally be transmitted over the wire.

Re: Problems with Oracle SQL

#128

Earlier quoted context omitted.

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

But they are not. Empty string means "we know this is empty", Null means "We don't know". For example, I have a second name. Some people don't have second names. And some records we might not even know if such exists. Null means "unknown". Empty string cannot be equal to null.

Somebody hasn't learned how to love big brother yet.

Re: Problems with Oracle SQL

#129
post #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 do…

I hate that you have to install the Oracle Client, which is its' own byzantine exercise in frustration to use an application that talks to Oracle.

Most other databases, the application includes a library that communicates to the DB via a protocol implementation... Oracle doesn't want this kind of use case.

Post reply on HN