Hacker News new | past | comments | ask | show | jobs | submit login
Problems with Oracle SQL (codingtofreedom.com)
356 points by thunderbong on Sept 10, 2021 | hide | past | favorite | 263 comments



So many comments here about MS and Oracle. Mēh! I have an intellectual affinity for the suffering. But it has been 20 years since I wrestled with the Beast from Seattle.

Most of those twenty years were spent doing my own things in Linux, Perl, and R. In glorious ivory tower isolation from the real world consequences of serving a master who's goal was to extract revenue...

Here I am for the last year serving Apple (the Beast from Cupertino?).

The problems are the same with documentation. Yesterday I found an example in some Apple documentation. It saved me half a day, and I almost dies from shock. I have never before seen an actual example...

Their main documentation is videos. Fucking videos. Videos of what looks like actors pretending to be developers, that go on for ages, have no transcripts....

And then the tools: At least the MS and Oracle tools work! (Do they?) In Apple you cannot believe what the debugger tells you about the state of your programme with out double checking in at least two other ways, because their tool chain is very buggy, and they will not fix it.

There is no money in fixing tools. We developers pay them SFA money, brighter colours on the App store, deeper dark arts in getting you to fork over $XX for shiny apps that is where their development resources are going.

SO... They are all the same: APple, MS, Oracle, Google.... We developers are their bitches, we will crawl over broken glass to get things done, so there is no need to spend any resources on us....

Come back RMS!! All is forgiven!!!


When I started developing for Apple platform(Objective C) I wondered why there are no examples in the documentation, I used to think may be all other Apple platform developers are just smarter than me and the SO answers almost always referred to a WWDC video.

Thanks to you now I feel vindicated that even (Sr.?) Apple internal developer seems to feels that Apple Documentation should have examples although it's likely you were developing some obscure OS feature.

TBH I don't develop for the platform anymore, So I'm glad I don't have to put up with it anymore. I assume Swift has made development easier.


The best HN posts really do start around 5PM EST


This comment smells like mead and dwarves.


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 of the strange dialects of English and style that flourish on MS and Oracle and Java docs.


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 isn't terrible, but for answers.microsoft.com 90% of questions are some outsourced foreign support rep telling the user to run sfc /scannow and not looking into the issue any further. Which makes it a huge pain for sysadmin type stuff, their developer documentation is much better.


answers.microsoft.com accepted answers are mostly accepted by the poor foreign support rep after OP have left disappointed. It is somewhat similar in quality to yahoo answers. Microsoft should be ashamed this pile of useless bits is public.


Let me make sure I understand the problem you're having trouble getting answers from answers.microsoft.com, is that correct? Please open the site answers.microsoft.com in Microsoft Edge web browser and once the page loads, look for answers there. This should solve the issue. Can you also please run the windows memory diagnostic tool and paste in the output in a reply to this message? Once you have done that, please open your computer and make sure that your CPU is firmly seated in its socket. That will be required to help further. If this has helped solve the problem finding answers on answers.microsoft.com please mark it as correct.


This is excellent and very representative.


Please run "sfc /scannow" and dism /online /restore-health" to verify system integrity.


> It is somewhat similar in quality to yahoo answers.

“How is babby formed?"

[EDIT] Corrected quote


"How is babby formed" - for those not participating in the zeitgeist of 2006.


Thanks for the correction.

I actually missed the original.


> outsourced foreign support rep telling the user to run sfc /scannow

Sysadmin story. Recently I had a really strange problem after a disk migration - defrag.exe simply would not run no matter what (I needed it to TRIM the SSD), it just quits without any messages, as if it's /bin/false. GUI had the same problem.

The first search result was a thread at answers.microsoft.com, they give the same canned "sfc /scannow, dism /restorehealth, chkdsk /f" response. But OP finally solved the problem on their own, the "Optimize Drives" service was somehow been stopped, restarting it solved the problem. I tried it, it didn't work. Having no options, I decided to give the seemingly useless solution a shot (why did I bother to try? This was after a disk migration, I felt filesystem corruption could be real). It finally worked after "chkdsk /f"...

I was genuinely impressed. It was the first time ever that it actually fixed a real problem for me. Presumably defrag.exe detected a filesystem anomaly and refused to run.


> defrag.exe simply would not run no matter what (I needed it to TRIM the SSD)

Would be interested in the logic here, given that it runs counter to what I thought was extremely obvious advice by now.

Defrag generates writes to rearrange blocks in the _virtual_ view of storage visible to the OS, but even after defragmentation, the _physical_ placement is totally outside the control of anything except the firmware. If after defragmentation a file's blocks are arranged (0, 1, 2, 3) in the OS-visible view, in flash are still very likely to to be arranged (412, 77, 1, 12341, 5) etc. All you can do is let it know that some range of sectors is not used, which is what TRIM enables, and that does not require defragmentation upfront.


> All you can do is let it know that some range of sectors is not used, which is what TRIM enables, and that does not require defragmentation upfront.

This is exactly what defrag.exe does on an SSD today. Since Windows 10 (or 8?), instead of doing a "real" defrag, defrag.exe also has an option to issue TRIM commands to unused blocks on an SSD. In other words, it works like fstrim(1). The time has changed and you must have missed the update. I suggest keeping your knowledge up-to-date before delivering a lecture on disk defragmentation on a forum where everyone should've known better.

https://docs.microsoft.com/en-us/windows-server/administrati...

> /d Perform traditional defrag (this is the default).

> /l Perform retrim on the specified volumes.

> /o Perform the proper optimization for each media type.

Since I migrated the hard disk using a block-level copy via "dd", it's a good idea to manually TRIM the disk afterwards to inform the controller about the unused blocks in the new filesystem for proper wear leveling (to the controller, the block-level copy looks like a single large file).

And before another one gives me another lecture: No, I did not corrupt the filesystem because I made the mistake of copying the disk while Windows was still in Fast Startup mode. It was probably ntfsresize(8), to be fair, the corruption was extremely minor.


Thanks for the excellent explanation, but the attitude and needless personalization was unnecessary. This functionality was previously available via the Optimize-Volume cmdlet, I guess it makes sense the defragmenter was updated with similar functionality to account for the typical Windows user.


Yeah that site is terrible. Spent a few days digging for solutions to fix an issue, always ended up back on that site. Always same old useless information.

I had to go to like page 10 of Google results to find some random sysadmin's blog which looked like it came straight out of 2005 and guess what? Problem is explained clearly, steps to fix it are laid out, sorted and wish I found the website 2 days earlier.


That's why you don't go there, you go on ServerFault and SuperUser on StackExchange instead.


I don’t work with Microsoft stuff as much anymore, but my big beefs with Microsoft product documentation are:

- It is was often unclear what version of the “thing” was in scope. An article from product version X will reference X-1 documention.

- Microsoft will gaslight you. If you interact with them on a significant issue, you need to snapshot their product docs. I’ve worked with Premier on issues when pushing products to the edge of their limits, and the product group will edit the product specs in near real-time.


Microsoft is a complex and big entity. While most of it is doing a bad job whatever it is, some parts are quite good. In particular now that the C# stack is fully open, it's very easy to report a bug (on GitHub) and developers are reactive from my experience (submitted a bug impacting the dotnet SDK).


Agreed.

That issue left a sour taste in my mouth. As a customer, I don’t really need to be in the middle of corporate politics, I have my own poisonous politics to deal with!

I share it because many folks can’t conceive that sort of thing being possible.


I found the same. C# being on GitHub combined with the Microsoft documentation has made working with it a breeze. If I ever have any doubt, I just step into the code itself and figure it out.


Even before that. A problem in EF, got fixed in 2 minor versions later.

This was during .net 4.5 fyi, ages ago by now.


Most Docs have public repos on GitHub, so you can see the PRs if the docs change.


The thing I find most annoying about Microsoft documentation is that many old versions are still locked behind an msdn paywall.


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.


Well, PowerShell docs are next to useless. Maybe the other parts are better. But I think this mythos of great docs for proprietary MS stuff is just that, a myth.


They're not as good as they were. The win32 docs are a a thing of beauty. I used to actively enjoy writing win32 code, in stark contrast to my experiences with Core Audio which is a similar sort of C API but documented by Apple, which is to say not at all. It is hell on earth.

Powershell, though. I don't know how you could even document powershell. It's insane.


Powershell is so weird to me. It never does what I expect it to do but it’s also full of powerful features. When looked at as a programming/scripting language it feels totally insane and disjointed. I just jump into C# or Python instead of dealing with it, because it just doesn’t make any sense to me as an engineer. But whenever I’m looking up how to manipulate some obscure bit of Windows, a cut and paste powershell one liner always makes an appearance.

Does anyone know if there’s any sort of reflective documentation or anything in powershell? Like, is there a way to ask it what arguments exist for a command?


Get-Help cmd ? But you can even leave out the arguments and it will query for the mandatory ones.

Also just FYI, it can fuzzy match on arguments, so you can specify only the first letter, or substring of the whole name. I think from this aspect, it is far superior to the UNIX tools.


I learned a lot of different programming languages. But I’ve never seen something as cryptic as power shell.

Sometimes I write the same script as PS and as bash script. For PS I usually need 3x more characters than for bash.

There are some features though that are really useful. But most of the time you won’t know about them when you need them.


> Sometimes I write the same script as PS and as bash script.

That's your mistake! Don't write bash scripts in PowerShell, and don't write PowerShell scripts in bash. Don't be surprised if the shopkeeper can't understand you, when you're speaking "French" by translating an English sentence word for word.

PowerShell is much more readable, terse, and elegant than Bash. It absolutely blows it out of the water... on Windows, where its inputs are the streams of objects that it's designed for. If you're trying to shoehorn text-based streams like in Linux into a PowerShell script, you're going to have a bad time.

See this earlier comment I made and the linked comments for some examples of PowerShell-vs-Bash: https://news.ycombinator.com/item?id=23423650


PowerShell elegant? Wow. No way. I've written hundreds of thousands of lines of PowerShell on Windows over the years. PowerShell is great for one-liners and very short scripts. It also has many cool hooks into the OS that makes things more comfy. That said, as soon as you need to write a modestly long script or need something remotely performant, you're going to want to reach for the nearest pencil to shove into your ear. I'll take Bash with all its limitations and arcane warts every time. I vastly prefer Python to either Bash or PowerShell for anything serious.

A sterling example of PowerShell's inanity is its brain-dead, ivory tower implementation of function return values. Anything that outputs to stdout gets added to the return value object for your function. Forgetting for a moment how non-standard and unexpected this is, consider that it’s impossible to completely silence many, many Windows commands CLI programs and utilities. Even with all the silent flags, output redirection, etc. it is simply impossible to silence stdout. What you end up with is... you just can't ever use return values in functions since it's so unreliable. This, coupled with PowerShell's atrocious performance (it's the worst performing scripting language I've used by far) instantly makes PowerShell a second class language for anything apart from very small scripts.

I've never heard anyone call PowerShell “terse” until today. It is currently winning the competition with Java for “Language whose inventor is most likely paid per keystroke”. PowerShell's arguments are extremely verbose and lines tend to become quite long as a result.

Disclaimer: I’m a recovering Windows Admin and haven't used PowerShell in a few years. I'm told that none of these problems have been fixed, but I don't know for a fact.


An observation I've made over decades of development in dozens of languages on many platforms is that humans often confuse frequency for speed. They assume that because they are making "many actions per unit time" that they are getting to their solution goal faster.

This is most obviously noticeable (to me at least), when debating ergonomics with people that prefer UNIX platforms, especially bash and text-based configurations. There was a study that showed that an action like moving a mouse to select a file feels slow because there's one slow movement, but selecting the file through typing at a console is perceived to be faster because there are many keystrokes in quick succession. People report that they prefer the latter for "the speed" even if it's an order of magnitude slower than the mouse if measured with a stopwatch.

The terse two-character commands of the UNIX world were an optimisation for teletype. As in a literal typewriter banging away on paper, at a rate of something like 10-30 cps. Modern (four-decade-old!) computers have tab complete, which makes this largely irrelevant.

Verbose commands are an enabler. They enable novice users to read scripts, instead of only masters being able to write them. Long, systematically and consistently named commands enable discovery through wildcard searches.

You cannot now -- nor ever will be able to -- do something like this in the Bash world:

   Get-Command Get-Az*Disk*
That's not an option because Bash doesn't actually follow the UNIX philosophy: it's not composable, it's not orthogonal, it's not designed, it's not self-consistent, etc...

It's a clever hack around byte streams that people have slowly built up over decades, evolving over time haphazardly. There was an 'sh' for example!

PS: You talk about using Python instead of scripting languages, which is actually a fine choice that I won't argue with. But have you considered writing "heavyweight" PowerShell modules in C#? As in, a proper DLL module? It's mindblowing how productive it is compared to trying to write a command line tool in C/C++, or any other language for that matter. Automatic input validation, input parameter name tab-complete, pipeline handling, all wired up with a handful of attributes...


> Verbose commands are an enabler. They enable novice users to read scripts, instead of only masters being able to write them. Long, systematically and consistently named commands enable discovery through wildcard searches.

For short scripts, this works great and improves discoverability for newcomers. This is the siren's song of PowerShell. However, the long commands and particularly the often unneeded/overly verbose parameters frequently creates a wall of text. This really hurts readability for everyone in all but the shortest scripts. Additionally, this wall-of-text that is all to common in PowerShell scripts is very intimidating to newcomers.

Regarding Tab completion in PowerShell, it frequently isn't terribly helpful. To work yourself up to something like Get-ItemPropertyValue is quite an incantation to remember, while being worse than a lot of bash ergonomics.

> have you considered writing "heavyweight" PowerShell modules in C#?

That is an interesting approach and would make life more bearable in MS-only shops. However, I can do the same thing with Python, which is superior to PS in so many ways and doesn't suffer any huge, glaring flaws (as PS does).


The performance problems, at least, have had some TLC applied to them and are much better in PowerShell core (the one that goes by pwsh), to the point that I don't hate using PowerShell interactively now.


Character count is not generally a good measure of the quality here. I think the biggest issues aren't the verbosity but how complex it can be to express some of the most common operations.

Filter is harder than it should be[0]. Same thing for map

[0]: https://www.concurrency.com/blog/august-2018/powershell-basi...


Bash is the worst abomination that has ever existed on the world. If a bash script has more lines than 2 (that is including the #! one), it sucks.


Yeah, I’ve tried a handful of Microsoft products and MSFT’s docs are ok for tutorials, but I’ve often found it hard to find useful reference documentation: e.g. the tutorial bits of Appcenter’s Codepush and UI Testing documentation are ok, but the reference documentation for both is ambiguous and/or incomplete.


With Microsoft, generally the documentation around the edges isn't great. The edges being the "Microsoft condoned solutions and generally anything coming from the Office/Enterprise side. On the Enterprise side they often have fantastic documentation but they have an amazing talent for making it unfindable.

It's like they hire an army of noob-level interns who churn out "getting started" articles, with the end result being that you have to dig 5 pages deep into Google result to get meaningful documentation (4 of those pages are of people asking questions on Microsoft Connect or the-site-that-shall-not-be-named or something).


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


Win32 and .Net docs are great!

Azure and Powershell docs leave a lot to be desired. A lot of the time parameters are vaguely documented, return values completely undocumented. You have to inspect the object returned by a lot of things to get to understand what members and methods it has, and what they mean.

Examples illustrating what formats it expects inputs in? Forget it.


The newest stuff tends to have the worst docs, since they haven't had time to "mature" with corrections and such yet.

In contrast, Win32 which has been around for over 25 years is mostly stable now.


Azure powershell docs are the worst. All you get told is the name of fields, no indication of what they mean, or the expected inputs/outputs.


I assume you have not encountered SharePoint. The SharePoint documentation I could get my hands on - even in books I paid for - was so bad it was like I was living inside some David Lynch interpretation of Ancient Greek myths of divine punishments unleashed upon the worst sinners.

More than once, the "solution" to my problem was a blog post by a SharePoint consultant from India describing some undocumented flag to pass to some obscure command, "but of course, you should never do this on a production system". (I bear no ill will towards Indian SharePoint consultants, to be clear. I just find it really creepy they seem to enjoy this kind of torment.)


This. Sharepoint has to be a beast to work with.


PowerShell is easy to debug though. So I never have a problem with that. I generally program in it without ever looking at any documentation. I just don't need it.

Just get-help -full/get-member everything or export-clixml it. But maybe I've done it for too long, so I don't see the weaknesses anymore.


The docs have to be good. They are the creators, and their docs need-to and are comprehensive.


The actual MSDN docs sections are uniformly reasonable in my experience, but some galaxy brains decided to nest at least 2 (if not 3?) user support forums (think "my printer is broken") under the microsoft.com domain. Searching their docs usually requires a bunch of excludes


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.


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

“if you know how to read it” is...not a ringing endorsement of documentation. But, its true that MS documentation is less likely to be wrong once you understand what it is trying to say than, say, Amazon's (though have glaring omissions or things concealed by opaque organization is quite common.)


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.


MSDN was great, Docs is not. There are still lots of inexplicable errors from the migration of content, and they seem content to outsource the labour of finding and fixing them --- errors they themselves created --- to the "community".


This just isn’t the case. Docs for many older releases are still stuck behind a paywall on msdn, or even available offline only.


I might have been unfair on MSDN, as my experience in the past was really bad. I work with non-MS tech quite a bit, not sure if being deep in the MS-ecosystem helps in grokking the docs.. But I found it uniformly bad across : MS-SQL, Visual Basic, Asp.Net etc.

I think my issue might be more with the English style. But why does SO work right-away for me, while other these other developer portals don't. Part of the flaw maybe lies with me - maybe these portals (like MSDN) need in-depth, patient reading (guilty here). SO on the other hand, is way quicker in helping to solve issues. Over the years though, I've had enough bad experiences ..

Someone should do a compare between SO and non-SO. Take a sample, discrete (if such a thing exists in software issues) issue, and see how both help to solve. The layout of the page, the noise, and finally the curated/voted answer all contribute. And factor in the fact that SO answers are written by a diverse group of people, many of them non-English speaking.

Call it hate, but regardless, Oracle product docs - when you're in a bind are the bottom of the pit.


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.


As far as OEM notes go ms is probably among the best but it’s not saying a lot. I find that most MS notes rarely explain the how very well if at all. They usually just explain the what. Sometimes that is enough, but usually I want to see examples of how to use code to perform a task. For me at least seeing examples of real world use helps infinitely more than here is an object. Here are its public methods. Here are its public fields and properties.

Stack Overflow excels at showing implementation examples which, while the best way is not always highly rated, at least shows a way. When I was more junior I would sometimes take SO answers verbatim but I think now it at least gives me something to think about improving.


“// handle errors here” “// don’t do this in real code”

Because a list of errors that could occur and a comprehensive list of what is recoverable (and how) vs what should abort is not useful at all in developer documentation…


Just a note that Android Java is not JavaTM, it is just some bastard son of it. I think java has quite a good API documentation, it’s just that google results are usually from java 8 or even earlier versions.


It isn't a bad site per se.

Just most links seem to be broken.


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 horribly wrong and point me to some fantastic docs somewhere I would be so delighted to be proven wrong.


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.


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


In my experience both Oracle and Microsoft documentation is usually good to excellent,I actually want google to search specifically on ms docs site most of the time. I do find AWS docs to be lengthy and incomprehensible.

StackOverflow is mostly useful to quickly (and often dirtly) solve issues that are burning now, without getting deeper understanding of the subject. This isn't universally true, some answers are exceptionally good.


Somewhat unrelated, the case where I want to "Google search some specific site" is well suited to duckduckgo bangs, if there is a bang for that site.

!msdn will search MS's developer network


Just like site:msdn.microsoft.com, just more convenient and with worse results


Honestly I wouldn't mind the MSDN documentation so much or the Microsoft forums if it didn't feel like it was constantly doing this super tedious redirection hot potato because of their SSO Microsoft live account bull crap.


I can't agree with the Java one, there are great examples and docs out there.


Well, he said Java for Android. The Android SDK is a capricious beast and the documentation is often outdated or sub-par.


The aws docs aren’t concise, but they have a lot of good information in them if you want to go in depth. I learned a lot back when I was an intern by reading them

Iirc, the postgres docs were also good reading in a similar way: not concise, but a lot of good information


So spoiled by Rust now when using one of these "documented" APIs.

* Rust's examples work, because the default behaviour of Rust's automated testing is to test your documented examples (as well as any unit tests you wrote), so, it's actually more effort to write examples that don't work. If you're too lazy for that, you're going to not write any examples, so then I at least know I'm in uncharted territory.

* The relevant Rust source code is linked. Mostly. Rust's source links don't chase macros, so it's conceivable your link tells you that foo(X) is just the result of the macro make_thing!(foo,X) and you need to chase how make_thing!() is defined which is annoying. But 99% of the time you discover immediately what's actually going on.

This week I would say about half of my time was spent fighting with the C# library for talking to the Microsoft Graph API. Both of which are, in theory, "documented" and yet I repeatedly ended up cribbing from Stack Overflow answers or, after beating my head against a wall, pasting URLs (which I already know will go stale in a year or two) and Microsoft's uselessly bland explanations for the obviously broken stuff as the excuse for why we can't do things you would obviously anticipate being possible.

Today I particularly liked: There are five documented ways to make an educationClass. Most of them simply don't work (unanswered Issues on github), and the error responses for these methods are undocumented and lead nowhere. But one of them does work. However the C# library drops the output of the API call for that method on the floor, presumably because coping with this case was hard, and so the best option (as a Stackoverflow post explains) is to reach inside the library, dredge out the HTTP request it's about to do, and perform that request yourself, then do all the heavy lifting they couldn't be bothered to do with the HTTP response to get what you actually wanted (including a polling loop because apparently nothing after the 1980s happened for Microsoft).

However, in the months since that Stackoverflow post was written, the C# library API has changed, enough that the example code wouldn't even build.

The change is undocumented (of course) and involves an enumeration (also undocumented) which was auto-generated for some reason. This feels like somebody was hoping it wouldn't matter if they changed it, and that somebody was wrong. But if they'd been forced to document it then maybe they'd have either decided it wasn't worth it (still works as before) or I'd have saved ten minutes guessing how the API now works.

But now it's the weekend and I'm going to write Rust.


A thing that helps with Rust, in my opinion, is that the language is statically typed and people mostly write functions. That makes it easy to glue the pieces together in my head. So even if the documentation isn't great, I can find a way to do what I want.


Also, people don't overuse polymorphism like they do in Java and C#.


There's still lots of polymorphism in Rust. Take for example the way reqwest handles HTTP headers. Reqwest cares that it's technically possible (albeit a bad idea) to write arbitrary bytes into an HTTP header name even though those bytes are ASCII case crushed. This being understood, and Rust's strings necessarily being UTF-8 and not arbitrary bytes, a header's name might not be a string in Rust (though of course the vast majority are) and so Reqwest carries around a whole marker type for things-that-might-be-plausible-header-names, knowing that all any non-bad-guys will care about is a few simple ASCII strings but needing to correctly handle much more.

The two obvious things work, if you say the name of a header, you get that header, and there are constants like HOST defined for the most common headers to avoid typos, but you can do crazy stuff, and importantly if a hostile peer sends you crazy stuff Reqwest promises to cope.

Maybe it's that Rust's polymorphism is more explicit through Traits.

If Pigeon, Duck and Emu are all Birds, and further more Animals in C++ it's unclear what exactly this Bird superclass does for me, still less Animal or when I, knowing I have a Pigeon here, should consult the documentation for Bird and/or Animal rather than or in addition to that for Pigeon.

Whereas not only does the Emu not implement Fly, I can feel comfortable guessing that the code implementing Fly generically or for my Pigeon is unlikely to be related to my problem that this Pigeon says "quack" and I should instead look closely at the AnimalSound trait, given away by the fact I had to explicitly name that trait to get the "quack" noise from the pigeon.


A lot of the good errors is gone when you switch from (Oracle) SQL Developer to DataGrip.

So many reasons to use DataGrip, but often enough (>once a month) I have to fire up SQL Developer to get line number errors.


Win32 along with DirectX, Media Framworks etc. etc has one of the best docs and examples ever from my experience.


also applies to salesforce.


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 I figure actually hiring Oracle DBAs would be a nightmare.

These two factors combine to make me absolutely baffled at how completely Oracle has seemed to dominate every market but the private one (i.e. government, especially defense and educational). Have I been missing something about ways to actually get real world experience with Oracle?


Oracle sells to executives, not technical staff.

Training on Oracle tech is via certified classes, provided “free” by your employer as part of their licensing deal; not online discovery.

Source: sold to and worked with Oracle Inc. for several years, got a front row seat at the sausage factory.


Besides training for Oracle University, Oracle has a couple of free learning and training resources out there on the web too.

https://livesql.oracle.com --> A SQL scratchpad that also includes scripts and tutorials.

Oracle Live Labs (https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/home) --> Granted, while it's easier googled as "Oracle Live Labs" than to remember that URL, it does, however, provide free Hands-On Labs for users.

https://oracle.github.io/learning-library/ --> The instructions for the Hands-On Labs above and more can be found in the learning-library

asktom.oracle.com --> I fully free Q&A portal where you can ask Oracle Database employees for help. Furthermore, it offers regular "Office Hours" live webinars and an entire course of learning Oracle Database: https://asktom.oracle.com/databases-for-developers.htm


I've got to attend some free Oracle classes at uni (taught by Oracle employees), they were horribly boring. I don't think they'd have any chance at selling to technical staff even if they tried.


>Oracle sells to executives, not technical staff.

agree. i have a year or two with Oracle Apex. at a pervious job, we were using Java to develop a web app but a executive saw how fast you can create a web page/app with Oracle Apex. we switch over since we already using Oracle for database.

Enterprise software is not targeting you (techies). its for CxOs.


We kludged together an apex reporting solution to replace an old payroll UI. It was quick to work with in relation to the number of reports we were able to publish.


It’s more than that. Oracle is sold off the back of its middleware applications. Which equally suck too…but at least they’re solving difficult problems that most other database vendors don’t both with.


Such as?


Such as enterprise level accountancy solutions, human resource packages, payroll solutions (which is the where I worked with Oracle) and so on and so forth.

A lot of the time when businesses by Oracle, they’re buying into the middleware rather than the RDBMS.


All the apps they bought.

Siebel, PeopleSoft, BEA Weblogic.

I was the DBA for a Siebel instance for ten years.

I would say J.D. Edwards, but that's AS400/DB2.

SAP is also a big driver, although they don't want to be (so much so that they bought Sybase).


J.D.Edwards old World product was AS400, but EnterpriseOne (formerly OneWorld) is also Linux, Windows, AIX, Solaris, HPUX, and IBMi and is still very much alive. Runs on Oracle DB, MS SQL Server, and DB2.


In addition to Oracle owned middleware, it's common to end up running Oracle because your vendor supports only it.

Sometimes with somewhat sensible reasons, like Oracle combining clustering and in-memory encryption, but it still means you don't get to choose...


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, but I worked with Oracle a lot and it never was a main culprit in my work. It has its issues, sure, but they're solvable.


> Oracle it not that bad anyway, it's just stupidly expensive.

Full of bugs, some that destroy speed, some that destroy data, some that just make a feature that you need unusable. More heavyweight than lead (although it gets fast after you throw enough hardware). Lacking any capable or usable management interface (but then, that excludes everyone except for postgres and mysql). Impossible to program. Impossible to predict how your program will run.... And my favorite, absolutely fragile, any wrong code you run there can take everything out of the air.

And yeah, stupidly expensive and comes with the Oracle legal team.


> comes with the Oracle legal team

This would've been sufficient, honestly.


That's a problem for the people working with contracts. I'm personally more concerned about the fragility, and the bugs.

Did I say it has bugs?


Any source on the bugs?


The Oracle's documentation on bugs is paywalled... What is actually an improvement over others like Microsoft, that denies a bug with all their might, up to the point it is fixed, and then say the minimum possible.

Anyway the most recent pair I found on the wild was a problem that made indexes of georeferenced data fail at random, pushing your queries into a non-indexed search and breaking things like materialized views, and one that causes some inconsistency on testing clobs for null or empty string (what made them impossible to test for either when it applies). But there's a well known one that breaks optimization plans at random and goes with the last try (it doesn't matter if that it will scan that table 100000 rows 1000 times), and there's some bug where if you create some tables, populate them, drop them and repeat enough times you will lose your database. But that's just from the top of my head.

Oh, of course, that isn't including designed behaviors like the one that takes your database offline if you don't do backups often enough (where "often enough" is something that you can estimate but never be sure about its frequency).


There were more than just Oracle or DB2. Informix, SyBase, 4D and I’m pretty sure there was something with the word “fox” in its name too. Plus of course MySQL, though that was many taken seriously until relatively recently.


Amazon sponsored a writeup at The Register on the difficulties of moving non-trvial databases off of Oracle.

https://www.theregister.com/2021/07/20/how_amazon_broke_free...


> so the choice was Oracle or DB2

Sybase, Ingres


Worth noting, that Microsoft SQL Server started life as a Sybase fork.


not so sure that is correct. ms sql WAS sybase from 1989 until the fork in 1993 and i have been told that substantial changes to the codebase did not occur until years after the 1993, during the jim gray tenure.


Our Vendor offered Sybase in the mid 200x's as a choice for our college middleware, but they used 'case-insensitive' sort, which the linux version of Sybase did not work with.


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.


Potato Patahto


Oracle is free to download and try out. It’s only when you want to use it in production that you get to know the heart of their business: the oracle sales team. They are pushy, and devious, and they never give up.

I spent about a decade working on a large system built on top of oracle. Once you get used to its idiosyncracies it is not actually that bad. It has a good query optimizer, so even badly written queries tend to perform ok. And if there is any DB feature you want, it probably has it. Whether you can afford that feature is a different matter.


The problem is the Oracle dialect was created BEFORE the SQL standard was written. For backwards compatibility they never changed it after the SQL standard was written. Personally, I think they should have had a flag so you could choose whether to use standard SQL or Oracle SQL.


Exactly, and many features that are in the standard now and we take for granted were invented by Oracle in the first place.


ANSI SQL is a supported option in Oracle since 9i.

Not that most Oracle DB ppl use it anyway.


It would be ever so nice if Microsoft SQL Server supported JOIN USING in addition to JOIN ON.

Everybody has problems.


Postgres has Oracle layer, available as a commercial variant by EnterpriseDB. I don't think MariaDB implementation can compete, but EDB Postgres is solid. Basically a native implementation of Oracle in Postgres.


The Oracle layer was also added to IBM DB2.

Which one? Good question. The mainframe, as/400, and Windows versions are all on separate source code last I heard.

https://www.enterprisedb.com/news/enterprisedb-and-ibmr-coll...


DB2 LUW (Linux/Unix/Windows), DB2 iSeries, and DB2 z/OS are three different databases. With the same name - I guess for branding.


Does it replicate the same kind of "evil" bugs as in the article, or does it provide an improvement?


AFAIK it works exactly as Oracle. Doing something barely similar would probably introduce some very expensive bugs in production.


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


Oracle is a decent product with all the features that you could want if you are an Enterprise and in addition they have the support for all that. Postgres has most if not all of them at this point, but if you want support you have to pick from one of many vendors.

Having used many RDBMS, one thing I very much liked about Oracle was the bitmap index. Very very useful for some performance issues that a b-tree cannot solve.


> 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


I haven't ever worked at a giganto company myself - even though I've worked with largeish amounts of data... from multi-teribyte pyradmically stored JPEG2000s to 50GB tables of raw rows parsed from ridiculously long documents. I suspect some big places are indeed using Oracle - but notably large companies are still using MySQL or Postgres to great effect (i.e. Facebook).


There was a comment on here a few years ago from a developer with experience working on the Oracle database codebase which put me off it for life: https://news.ycombinator.com/item?id=18442941


> https://news.ycombinator.com/item?id=18442941

thats quite beautiful in its scale of monstrousness


To me, millions test sounded like a good thing. The main issue I had with the description of that workflow is that if the tests take 20-30 hours to run, someone in Oracle is not spending sufficient money on build hardware! They should have tens of thousands of servers, not hundreds, and they should be kitted out with the fastest processors and NVMe drives money can buy.

If you look at how companies like NVIDIA do things, they throw ungodly amounts of compute at development and simulations. Entire data centres worth!


It's possible to have millions of tests and NOT have the problems described in that story. SQLite has a famously thorough test suite and I've seen the SQLite developers turn around a suggested improvement to their codebase - including authoring the fix, testing it and landing it, in just a few hours.


Not discrediting, but can someone else working there confirm the things written here?


Oh no. What fresh biblical hell is this codebase.


Malbolge: the enterprise edition


OMG, comment right after would explain why we have a chip shortage....

"Sounds like ASML, except that Oracle has automated tests.

(ASML makes machines that make chips. They got something like 90% of the market. Intel, Samsung, TSMC etc are their customers)

ASML has 1 machine available for testing, maybe 2. These are machines that are about to be shipped, but not totally done being assembled yet, but done enough to run software tests on. This is where changes to their 20 million lines of C code can be tested on. Maybe tonight, you get 15 minutes for your team's work. Then again tomorrow, if you're lucky. Oh but not before the build is done, which takes 8 hours.

Otherwise pretty much the same story as Oracle.

Ah no wait. At ASML, when you want to fix a bug, you first describe the bugfix in a Word document. This goes to various risk assessment managers. They assess whether fixing the bug might generate a regression elsewhere. There's no tests, remember, so they do educated guesses whether the bugfix is too risky or not. If they think not, then you get a go to manually apply the fix in 6+ product families. Without automated tests.

(this is a market leader through sheer technological competence, not through good salespeople like oracle. nobody in the world can make machines that can do what ASML's machines can do. they're also among the hottest tech companies on the dutch stock market. and their software engineering situation is a 1980's horror story times 10. it's quite depressing, really)"


Where do they find people willing to put up with that. Some people have a high threshold for job pain versus uncertainty around job hunting pain. I'd much rather the latter.


sheer dominance in their tech space using 0 tests, absolute CDD


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.


> Empty strings are equivalent to null.

No, they are not. Empty strings are completely different from null, and if you go returning them or testing for equality, everything will break by random some single-digit percent of the time. The same for concatenating, taking the length or iterating.

I imagine there's some deterministic procedure to decide what leads to an empty string and what leads to null. The one thing I know is that if you insert it on a table, you will always get null.


Fascinating. Of course it would be too easy if they were strictly the same!

It seems like reading the tale of a greek programmer cursed by the gods to work with madness itself.


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


TIMESTAMP WITH LOCAL TIMEZONE. Never again.


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.


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


Or maybe 3999 chars, of which a couple are two-byte. More fun.


Oracle supports up to 32k VARCHARs since 12.1 released back in 2013.

It just needs to be enabled: https://docs.oracle.com/database/121/REFRN/GUID-D424D23B-093...


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


That one actually changed already. If you follow the new recommendations, varchar is as good as varchar2.


Good to know! I haven't had to touch an Oracle database in almost 15 years, but one never knows.


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.


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


It's like how at one time, "0" was not yet invented and had to be invented and explained, and it was a revolution for math. It's a quantity just like 5 or 244, but for when the amount happens to be none.

We need that again, another new 0 concept to add to 0, to distinguish between "set-to-0" and "not-yet-set".

Maybe 2 new concepts, since null is also different from 0. 0 is a value, null is the absense of a value.

Not just as an idiom or implementation detail in a programming language, but as a general concept that may be used anywhere in life.

Without it, we have exactly these confusions and ambiguities and differences of opinion about how to do something or what something means or what something should mean.


Bad software punishes you for doing things right.


Either make the column nullable, or apply local workarounds and folklore. E.g. I've seen "person" records with surname = '.' in certain databases, for people who don't have one.


Honestly that's bad db design anyways. If empty string is a valid value then you don't want NOT NULL anyways. This is a table structure constraint, not a variable declaration. NOT EMPTY would have been a better syntax imo but that's a whole can of worms.


Empty string means "we know its blank" null means "we don't know".

When it comes to datatyping, (the whole point of data types in a db), null is its own datatype, so forcing the allowance of nulls to get blank strings is kinda stupid and only causes software/application level bugs.


An empty string is a perfectly valid neutral element of the free monoid over the alphabet in question. It's also not a NULL value for this reason. If a NOT NULL column of strings allows for all strings except for a very important one, then that's a very weirdly special-cased design of the RDBMS.


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.


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!


Real programmers encode emptiness as ZZZ...

(I once worked maintaining a MUD that used internal memory management and marked block terminals (which were unnecessary since it stored the length of blocks it had allocated) with ZZZ)


ZZZ? EEK!


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.


Or just prefix everything so that your string domain doesn't shrink? Then you don't have to worry what your users enter.


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!


My "favorite" Oracle experience (not):

> select count(*) from mytbl;

ORA-12986: columns in partially dropped state. Submit ALTER TABLE DROP COLUMNS CONTINUE

Well, OK then...

> ALTER TABLE mytbl DROP COLUMNS CONTINUE;

SQL Error: ORA-00604: error occurred at recursive SQL level 1 ORA-01654: unable to extend index SYS.I_OBJ4 by 128 in tablespace SYSTEM

The table was completely unusable, we needed to restore the DB from backup.


Just curious - did you try an AS OF clause for flashback?


I think I've found 5 bugs in the Oracle database in the last 4 months, including multiple queries that returned incorrect results.

They end up being in weird edge cases - one was... you needed to be casting something as JSON, parsing it, and have a WHERE clause that included a compound predicate. A similar but slightly different query simply threw an error. I made a full reproduction and everything. Got bounced around between a couple of departments until we finally reached an engineer who said, and I lightly paraphrase: "um, that seems weird. I don't see anything in the docs about it."

The solution to that was updating from oracle 19.3 to 19.12. But _that_ broke our INSERT IF NOT EXISTS style queries. We were using this "hint" they have, "ignore_row_on_dupkey_index", which is a comment that goes before your query which actually affects the code execution (WTF?).

Batch queries via JDBC return an array of integers: the length is how many different queries you batched together, and each element represents how many rows were affected by each batch.

Unfortunately, when using this ignore_row_on_dupkey_index, the array sometimes both 1. has the wrong length, and 2. has invalid integers: stuff like -1203214.

So we switched over to using MERGE INTO WHEN NOT MATCHED style syntax, and everything was hunky dory, right? Wrong. We started getting UNIQUE CONSTRAINT VIOLATED errors. As near as we can tell, MERGE INTO WHEN NOT MATCHED can still run into a race condition - if you have two queries that try to insert the same non-existent row, the database will check that the row doesn't exist, execute the queries, and then blow up one of them. But as far as we can tell, only on batch queries. As I'm not paid to figure out WTF is wrong with oracle, just get it to work, I didn't end up doing a full repro of this stuff. But there's a couple of weeks I'm not getting back.


Well, I used to work with Oracle Databases and that "old man" (Donald Burleson) website has saved me quite a few times.

I even remember the "Learn Oracle at the Sea" advertisement.

But that's the state of affairs and I try to avoid them as much as I can. Amazon seems to think similar [0].

[0] https://www.youtube.com/watch?v=9yBP5gnnZi4


My goto was Tom Kyte (https://asktom.oracle.com) for learning the 'why'. Burleson is an interesting character, but not always correct either.


Last I've heard of Tom Kyte: https://archive.is/20150928144011/http://www.oracle.com/tech...

His answers were sometimes prime examples of what is today known as seriously unwelcoming. But I remember I un-learned the "best practices" meme reading one of his answers. In fact it was just one sentence, some concise version of "if the 'best' setting existed, nobody would bother to make it a configurable option". But it clicked.

Burleson's more advanced answers were of limited usefulness, because they have never mentioned the exact oracle version. They often have been only valid for antiques like Oracle 7.


Tom Kyte books were great and beyond Oracle, I learned a lot about databases generally from them.


My SO was a Oracle DBA and she swore by Kyte's books.


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


Oh indeed, they all have quirks.

Oracle seems to have more than most, IMO.

I have a journeyman data engineering level experience with each. Rare combo I guess, Data Scientist focus.


Exactly, Oracle should be chosen when business logic is written in sql/plsql


On Oracle most of the error messages are bad, not precise enough or plainly wrong. Basic things like a wrong error line (failure is on line 3, displays 5 or 6), messages that aren't related to the real issue. You're pretty much on your own.

Also, I had to switch to DBeaver since Oracle SQL Developer made things worse with random crashes and freezes. Back when I used it, an easy way to freeze the editor was connecting to a DB via VPN and then suddenly disconnect. The connection gets stuck, parts of the UI get frozen and after a while the whole thing freezes.

MySQL/MariaDB and Postgres are better.


To be fair, I had to switch to DBeaver for Postgres as well, as pgAdmin’s usability has been steadily decreasing since the first release of version 4. The lack of quality GUI is essentially my only problem with Postgres, though.


Tom Kite is/was great, but his answers are the equivalent of "I'm glad you asked, pull up a chair and let me tell you a story about a white whale..."


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.


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.


There are rather usable clients for Java and .Net that do not require that. Well, the .Net one silently converts async calls to sync, but Oracle wouldn't be Oracle without nasty surprises.


The Oracle 19.3 installer must be used to install on RedHat/Oracle Linux 8, but nothing lower that 19.6 will run on this OS.

Two patch sets must be applied to the nonfunctional installer before it will work, which was quite hostile to learn and master.

At least with 11.2, a new install set was issued for RedHat 7.


We had an extra optional curriculum on university, and to pass you had to successfully install Oracle.


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 are fine, but the answer should never be that error messages tell you information about something you don't have permission to know about.


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.


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.


Sure, if "table does not exist" actually means that, which it does not. It means you have no access to such a table if it exists or not


Came here to find the thread discussing this. You stated what I'd think is the conventional wisdom and I expected this to be the top thread.

However, this thinking comes at the cost of UX (or Developer eXperience). Much more mundane instance of the same thinking is hiding elements of the UI you are not allowed to use. This often gets me thinking - is there a way to do this that I'm not allowed to see, or is it just that I can't find the function in the UI?

A solution for the DX issue is logging the real error somewhere only accessible for an admin. Has this been implemeted anywhere in the wild? For UIs, just be honest and show the menu items disabled.


I have some resolutions:

> Table does not exist or you do not have access. Please contact your DBA if it should exist.

For login, assuming sql*plus

> Either you have an invalid password, user does not exist, or database cannot be found at this endpoint. Please contact your DBA if it should exist.


The thing that kills me about Oracle is that since the license does not allow benchmarking, we (or at least I) don't know how it actually stacks up to the competition. Of course, that's the idea, but it would be cool to have that data.


Someone who has performance worth the money would not inhibit the benchmarking of it.


Indeed. You could do it, just can't publish the results without backlash.


What?! How do they disallow people from benchmarking it? Do they just forbid people from benchmarking in legal terms? That sounds so fishy.


Both Microsoft and Oracle prohibit benchmarking: https://danluu.com/anon-benchmark/

Wikipedia article: https://en.wikipedia.org/wiki/David_DeWitt#The_%22DeWitt_Cla...

It's plainly illegal, but nobody who has built their business on Oracle DB wants to piss off Oracle the company with a lawsuit, and it doesn't appear any legal activists want to either.


Seems it's in the license agreement. What's unusual is that actually matters here. If someone tried to prevent benchmarking Postgresql by licensing terms, someone else would promptly ignore them and do it anyways, since Postgresql is free to download. Oracle licenses are very expensive, so anybody who has access to it also has money and a lot to lose by flouting license terms.


It is “free” to use as a developer, just not in production.



You can benchmark it, the license agreement only prohibits you from publishing the benchmark.


Oh man, the infamous “Missing Right Parenthesis”. Many an hour has been spent trying to decipher Oracle’s passive-aggressive - and even actively misinformative - error messages.


“But how in the world is it okay for Oracle to throw me for a loop as I try to pinpoint why the existing grants aren’t sufficient, debugging the whole program to see which user credentials are used – only to find out that it was neither a table nor a view, but rather the SEQUENCE used to increment the ID column that needed grants for the user?“

Probably a security issue. If you tell a user”“table T exists, but you don’t have rights to write to it because you can’t increase sequence S”, you’re leaking the information that a sequence with that name exists.

It’s the same reason a good login system will say “invalid username or password” instead of “invalid password” and its recovery screen “if that’s a valid user name, a mail has been sent to the address associated with it”.


Beside the regular complaints or praises I find oracle extremely ugly, unaesthetic and inconsistent. I understand it is old and has backwards compatibility but why would anyone choose oracle over a newer modern RBDMS such as PostgreSQL or MSSQL for a new project? Besides, Oracle is very expensive and very hard to get rid of.

It is also a bit of an issue that they don't have a default IDE, I worked with Rapid SQL which is a clunky, slow and riddled with bugs IDE. I think the Rapid part of its name is pure gaslighting.


> MSSQL

T-SQL is just so a weirdly ugly language and the feature set of SQL Server is super weird.

If we can, we go with Postgres or MySQL.


There are definitely aspects of MSSQL I don't like... for the most part I don't mind it. I will say, if you're willing to pay the cost, getting advanced features setup and running in MSSQL is easier than any other RDBMS I've ever tried.

That said, still inclined to use PostgreSQL. I do not like MySQL at all, and every single time I've used it, I feel cringes of absolute pain... starting with "utf8" isn't UTF8, "utf8mb4" is. Or that indexing a binary field isn't case-insensitive (ie, binary) by default.


isn't case-sensitive/binary... that one got me when migrating data and had converted from older identifiers to a UUID map.


There's Oracle SQL Developer :D

but as others mentioned, it's sold to executives, not to technical personnel.


I actually like SQL Developer, though I haven't used it in quite awhile. Remember it making my life a lot easier though!


Drop the 'SQL', it's cleaner.


Came here to say the same


My favourite oracle issue was an older version would not install on Linux if you had number lock key on!


I have worked with the Oracle database for six years and haven't had any major issues with error messages, in fact I'd say Oracle did a really great job building an amazing database.


I'm not a DBA, but as a developer who's worked with Oracle off and on for the last 15 years, I can say that the error messages are frequently misleading, and do, indeed, sometimes appear to be actively malicious. With other databases, they're at worst useless.


Oracle was the first DB I did major work with (12 yrs ago). I have fond memories of that time. I created an automated warehouse management system with it

Pros:

- pl/sql (I like it more than other flavors of sql, maybe because it was the first one I used a lot)

-pl sql developer. Not the java one (sql developer). I loved that you could see tabs in a list and in general it was smooth. I still keep a thin client in my spare drive and use it with delight from time to time

Cons:

-Installing and maintaining Oracle. But it wasn't terrible either

-Having to read Burleston posts. Not sure if this has improved

I know I am biased by my experience, I've heard many horror stories. I wouldn't choose Oracle today, but having to develop for it wouldn't scare me either


> pl/sql (I like it more than other flavors of sql, maybe because it was the first one I used a lot)

pl/sql is not a flavor of SQL, it is a name for the separate SQL-based “procedural” (imperative) language (hence the “pl”) supported by Oracle. The Oracle SQL dialect is usually referred to as “Oracle SQL” if there is a need to distinguish it.


We run a large number of Oracle database for customers. I mostly help manage the application running on top of the database, and we have a DBA team handling the databases.

It's amazing to see how calmly they handle managing Oracle, but their argumentation is also very Oracle-like: It's not a database problem, you're just using it wrong. Which would be a terrible answer, if they weren't right. I think most of us forget that for all the terribleness of Oracle, they actually do build a very stable and performant database, assuming you can afford it.


CTE has a reference to a column which does not exist, perhaps due to misspelling.

Error returned: "ORA-00907: missing right parenthesis"

Am I using Oracle wrong? No. It's a tool and CTEs are supported. Ergo the error message is an issue since it is not descriptive of the actual issue.


I disagree with you but I'm not sure why you were downvoted.


you have been really lucky, then.


Really lucky on commission on Oracle sales :-)


Oracle has quirks, yes. Oracle the company is...yes. We all get it. Oracle RDBMS has been around for longer than most of us have been alive and has amazing backwards compatibility. It has features I wish PostgreSQL had and vice versa. Nothing is perfect.


Just someone who wants Oracle to be something else without understanding it's nature.

Vehemently disagree with the 'access denied' error message. Why would you want some one who does not have access to a table to know it exists.


Oracle spelled backwards, "El Caro", is Spanish for "expensive". I can never forget this tidbit when dealing with Oracle.


Oracle SQL is not the devil.

I can code up SQL easily and find errors. I use sqldeveloper and granted It's not as helpful as say coding Dart on Android Studio IDE in pinpointing where a problem is and making suggestions. But I've been able maintain single sql statements 800 lines long, perform knapsack in a single sql statement, and develop complex packages in Oracle.

If you really want to see super complexity, download and create an Oracle EBS 12.2 virtualbox instance and checkout the PL/SQL packages in the APPS schema and the schemas themselves of which there are over 200.

I've used NoSQL and other SQL databases, each which had their challenges. I like the free tooling that Oracle provides - The APEX app builder and XE database are nice, if not hosted on Oracle Cloud - try the libvirt instance to evade Oracle's cloud grip.

I think the problem here is developer experience and a negative bias toward Oracle, which is understandable and prevalent in the developer community.

Cheers


You really should try Postgres. I was a professional Oracle developer for 15 years, then we had to move to Postgres since we simply couldn't afford the Oracle licensing fees anymore. It took 2 years to move our database over - mainly because we had to rewrite thousands of queries from Oracle sql syntax into standard-compliant sql syntax. Anyway, I truly expected Postgres to by worse than Oracle. I was wrong. The performance has been equal to or greater than Oracle. The documentation in Postgres is so good it almost makes me weep. I had no idea the Oracle documentation was so bad until I had something to compare it with. Installing and managing Postgres is so much easier. Backups, replication, etc. are far far easier and less error prone than Oracle. I've literally not found a single thing to complain about in Postgres. Now I wish we had moved years earlier.


APEX just exists to lock people even further into the database. A literal antipattern of a product.


That is completely true, but the product is actually very cool. I wish there was a database agnostic version of the product as it is such a great concept for many business apps.


I sort of agree, but then the data structures get basically fixed forever, as lots of UI code is written directly against them. It's not the end of the world, but it does require data model maturity.


Anecdotal, but wanted to mention positive experience with Oracle support. I have posted questions on SO relating to Oracle SQL and SqlDeveloper, and Oracle staff responded quickly with a solution I accepted.

Shoutout to ThatJeffSmith for contributing to the community!


Oracle support is always good when escalated.

Without escalation, sometimes tickets bounce between groups.

I filed a ticket on getting sqlplus to work in a chroot, and finally figured it out myself with strace. I didn't think it warranted escalation.


I've been working with Oracle SQL for years, and it definitely has it's idiosyncrasies. Part of their problem is (in my opinion) an unwillingness to upgrade older programs and processes. I do a lot of work in Pro*C, which is C with pre-compiled Oracle SQL and PL/SQL embedded in normal C code. The SQL you can use in that tool, for some reason, is a small subset of what you can use in an SQL tool like PL/SQL Developer. You can't bring back subselects in the select list, and you can't use inline views, among others. Which baffles me, because it should all be SQL once you hit their database.

Their sqlplus command-line tool for linux program was written in 1982 it says, and it still doesn't allow for use of the up arrow to retrieve history, and is very quirky with how it handles editing of code. Their Oracle Forms product is very klunky, too. I'm happy I don't need to set up Web Logic servers, because that looks like a nightmare, too.

A little work on tooling would go a long way.

I am partial to using joins in where clauses instead of ansi sql join statements, so I guess there's that.


The up arrow works in sqlplus on Windows.

A java remake called SQLcmd fixes some of the other problems.

Forms? Didn't that go out of support?


> Oracle hates giving error details

> Oracle even prints malicious error messages

From the ancient humorous internet textfile hacktest.text[1] ("THE HACKER TEST - Version 1.0")

    0241 Is your job secure?
    0242 ... Do you have code to prove it?
[1] http://www.hungry.com/~jamie/hacker-test.html


“But how in the world is it okay for Oracle to throw me for a loop as I try to pinpoint why the existing grants aren’t sufficient, debugging the whole program to see which user credentials are used – only to find out that it was neither a table nor a view, but rather the SEQUENCE used to increment the ID column that needed grants for the user?“

Probably a security issue. If you tell a user “table T exists, but you don’t have rights to write to it because you can’t increase sequence S”, you’re leaking the information that a sequence with that name exists.

It’s the same reason a good login system will say “invalid username or password” instead of “invalid password” and its recovery screen “if that’s a valid user name, a mail has been sent to the address associated with it”.


> You lose hope for humanity’s continued existence, and start adding log outputs after each and every function call to finally figure out where the script stops working

Good to know I’m not the only one doing it this way. Sometimes it’s the only way.


The author looks young (judging from his picture). I'm honestly sorry to the younger generation that we didn't do a better job of passing down what we learned.

Yes Virginia, Oracle is the Devil.


Looks like it might be getting hugged, here's an archive if you can't load it:

https://archive.is/MS2lJ


The main gripe the author has is him overlooking how DBMS_OUTPUT works. He's better off either logging to a table, or using UTL_FILE.


How can he write that long of a blog post about Oracle SQL and not mention the number one sin? Null is equal to empty string.


> Null is equal to empty string.

marcosdumay disagrees:

https://news.ycombinator.com/item?id=28484963

NULL and empty string are often equal, but sometimes not. Life would be boring otherwise.


So I've used MySQL at a very basic level but for the last couple of years almost solely been on Oracle because that's what my org uses. I sporadically dabble in the db stuff but am mostly working on front end. What's the db most people use now, Postgres? Could someone point me towards a good resource for it?


The official documentation is exceptionally good https://www.postgresql.org/docs/


PostGres is fine I guess, but MySQL setup is streamlined better. If MySQL is fine for big corps its fine for me too.


The biggest problems I've had with Oracle databases are getting CDC data out of it. There's conflicting technologies with their own tradeoffs - LogMiner vs. Flashback, neither of which cover all use cases well, licensing is ambiguous, and docs are conflated with information you don't need.


Rude!


I remember automating the deployment of Oracle DB to OpenStack using Ansible. Finished playbook took 45 minutes to run, and that's starting from a pre-configured snapshot!

Plus, Oracle charges per-cpu core used, so we had to license an entire portion of our datacenter...


I have a special level of hate for oracle full text searches as well, which requires embedding an additional complex search syntax into a text string, so you can't use binds in any reliable way without sanitisation.

There is no interface that I can see that takes a temp table or set of parameters.

I've also grown to dislike their (+) syntax. Super convenient but mixing the left joins into the WHERE clauses makes them get lost pretty easily.

I've also spent a ton of time with mystery crashes in large queries in PHP and Java where the crash only seemed to occur if the prepared statements had \r\n instead of \n, or went away on clearing statement cache until next time a set of statements were loaded.

Oh, and the annoying VARCHAR limits - thankfully higher than the 4000 it was at for a long time, but still irritating even now. Trivial example: select listagg(level,',') from dual connect by level <= 8000


We need simple 2 line explainers with 10 lines of explainer codes. Show the codes enough fluff and padding. Give the juice.

A wall of text with options and no actual code example that you can try isn't going to help so much.

Options and parameters everywhere.


fun fact: if youve ever wondered why performance benchmarks dont really seem to exist between things like mysql or postgres and Oracle, its because this is expressly forbidden in your license.


It is also the only database that has a precision parameter when calling spacial functions. Like 1 and 1 can sometimes be 1.9. Never again.


I share the author's opinion, though I haven't used other DBs in anger much, so I don't know if they're better. When I think about why it works this way, I'm sure product decisions and backwards compatibility are issues, but I also remember an amazing comment on writing code for Oracle:

https://news.ycombinator.com/item?id=18442941


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


I'm not sure I'd include SQLite as particularly good... Same goes for mySQL/MariaDB, too many oddities.

I do like PostgreSQL. MSSQL neutral to positive (nice to administer/setup).


For clarification, I really do like SQLite, it's probably the best option for what it is... I just don't consider it particularly good. I also like FirebirdSQL quite a lot, but it's more difficult in general to work with (embedded licensing, etc).


The biggest WTF for me is that you can't put parameters in `EXPLAIN` queries. This killed support for `Queryset.explain()` on Oracle in Django.

Seems like such a weird limitation, and the error messages definitely where not helpful.


That old Burleson Computing guy lives in my nightmares...


The title should rather be: „Oracle Is the Devil“.


Oh yeah. Been there and still have faded T's.

But then there's the licensing and the sales guys. Talk about pure evil.


There are 2 types of technologies: the ones that people complain about and the ones that nobody uses.


No. Some technologies are hostile to the people forced to use them.


That's pretty much what OC is saying, any technology good enough to be commonly used is going to suck and/or have sharp edges


to a degree thats true but the amount of vitriol expressed to oracle seems a bit warranted. I'm a user of postgres. its widely supported on cloud offerings. Every startup I worked in used it or mysql so it could be argued that postgres is used in a lot more places.

While I certainly have a few issues with postgres, It does the job with minimal bullshit and most of the time, just works. I'm at a point where I just trust it to do its damn job. How often do you hear people complain about postgres or mysql the way you hear people complain about oracle's enterprise db offerrings?


Shouldn't it be "Oracle is the Devil"?


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: