Philipp Salvisberg’s Blog

Database-centric development

2024-09-30

How Many Bytes Are in an Emoji?

What Is a Byte? A byte is made up of 8 bits. And in the old days, it represented a character. If you use a single-byte character set such as WE8MSWIN1252, WE8ISO8859P15 or similar, it still is. What Is a Character? We can find definitions for example on Wikipedia and in the […]
2024-07-29

IslandSQL Final Episode 10: Parsing PL/pgSQL

Introduction IslandSQL is a parser for SQL files targeting OracleDB or PostgreSQL. The parser is available on Maven Central and can process SQL*Plus, SQLcl or psql statements besides SQL statements. However, the focus is on statements with static DML statements and code in PL/SQL and PL/pgSQL. For static code analysis, for example. […]
2024-06-27

IslandSQL Episode 9: GraphQL, JSON and Flexible Schemas With Duality Views

Introduction In the last episode, we looked at some new features in Oracle Database 23.4. The IslandSQL grammar now covers all statements that can contain static DML statements and code in PL/SQL and PL/pgSQL. While implementing the ANTLR grammar for the create JSON relational duality view statement I stumbled over GraphQL in […]
2024-06-15

IslandSQL Episode 8: What’s New in Oracle Database 23.4?

Introduction In the last episode, we looked at some features in PostgreSQL which I miss in the Oracle Database. The IslandSQL grammar now covers PL/SQL and the related DDL statements. The implementation was more complex than expected, mainly because of the incompatibilities between PostgreSQL and the Oracle Database. I will probably deal […]
2024-03-23

IslandSQL Episode 7: DML Statements in PostgreSQL 16 and What I Miss in Oracle Database 23c

Introduction In the last episode, we covered DML statements in SQL*Plus/SQLcl scripts for the Oracle Database 23c. The IslandSQL grammar can now also handle PostgreSQL 16 DML statements in psql scripts. In this blog post, we will look at some features in PostgreSQL 16 which I miss in the Oracle Database 23c. […]
2024-01-30

IslandSQL Episode 6: DML Statements in Oracle Database 23c

Introduction The IslandSQL grammar now covers all DML statements. This means call, delete, explain plan, insert, lock table, merge, select and update. In this episode, we will focus on new features in the Oracle Database 23c that can be used in insert, update, delete and merge statements. For the select statement see […]
2024-01-12

IslandSQL Episode 5: Select in Oracle Database 23c

Introduction In the last episode, we extended the expressions in the IslandSQL grammar to complete the lock table statement. The grammar now fully covers expressions, conditions and the select statement. In this episode, we will focus on optimizer hints and new features in the Oracle Database 23c that can be used in the […]
2023-12-18

Autonomous Transactions

Introduction Autonomous transactions became available in the Oracle Database 8i Release 1 (8.1.5). 25 years ago. Before then the feature was used only internally, for example, when requesting a new value from a sequence. I mean, if Oracle is using autonomous transactions internally and they’ve made them public, then the usage can […]
2023-11-26

Installing MLE Modules in the Oracle Database

Introduction In my previous blog post, I’ve shown how you can deploy an npm module from a URL and a custom ESM module from a local file into a remote Oracle Database 23c using JavaScript and SQLcl. This works well. However, for two MLE modules, I had to write 22 lines of […]
2023-11-12

MLE TypeScript & JavaScript Modules

Introduction The Oracle Database 23c supports MLE JavaScript modules. MLE modules are standard ECMAScript 2022 modules. The easiest way to develop such modules is outside the database. This allows us to take advantage of the extensive JavaScript ecosystem and develop MLE modules in TypeScript instead of JavaScript. In this blog post, I […]