All posts by danmcghan

Authenticating End-users with Node.js and Oracle Identity Cloud Service

By | Uncategorized | No Comments

I once wrote about authenticating users using database tables and JWTs. While functional, custom solutions like that put the onus on you to protect the user’s credentials and they’re a far cry from a full-blown platform for security and identity. Oracle’s solution for such a platform is called Oracle Identity Cloud Service (IDCS). In this tutorial, I’ll show you how to authenticate end-users using OpenID Connect 1.0 with IDCS and protect your Node.js based APIs.
Read More

Uploading and Downloading Files with Node.js and Oracle Database

By | Uncategorized | No Comments

I first wrote about uploading and downloading files in 2015. Since then, many new features have been added to the driver, including streaming and buffer APIs for working with LOBs. It’s time to revisit the topic and put these new APIs to use. In this mini-series, I’ll demonstrate two different options for uploading and downloading files. The best choice for your use case will depend on several variables which will be discussed in the respective post.
Read More

Relational to JSON with PL/SQL

By | Uncategorized | 2 Comments

In the last post in this series, I demonstrated how powerful functions added to the SQL engine in Oracle Database 12.2 allow you to generate JSON with ease. But what if you were doing something sufficiently complex that it required the procedural capabilities that PL/SQL provides? Well, you’re covered there too! In this post, I’ll show you how new JSON based object types can be used to get the job done.
Read More

Relational to JSON with SQL

By | Uncategorized | No Comments

Oracle started adding JSON support to Oracle Database with version 12.1.0.2. The earliest support was targeted at storing, indexing, and querying JSON data. Version 12.2 rounded out that support by adding features for generating, exploring, and processing JSON data. See the JSON Developer’s Guide for a comprehensive overview of what’s now available. In this post, I’ll leverage the new SQL operators for JSON generation to convert the relational data to meet the goal.
Read More

Creating a REST API: Database Basics

By | Uncategorized | 25 Comments

With the web server in place, it’s time to look into some database basics. As mentioned in the parent post, this series will use the Oracle Database driver/API for Node.js (node-oracledb) to interact with the database. In this post, you’ll create a module that’s responsible for starting up and shutting down a database connection pool. You’ll also add a function that simplifies executing simple statements by getting and releasing connections from the pool automatically.
Read More