From 0fd7c1e003c920fc013cd4506c39a0f54cf2e805 Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Sat, 28 Jun 2025 18:21:31 +0300 Subject: [PATCH 1/3] adjusting the infobox into a blockquote --- pages/blog/posts/oracle-case-study.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pages/blog/posts/oracle-case-study.md b/pages/blog/posts/oracle-case-study.md index e3a85e2ce..1a1812723 100644 --- a/pages/blog/posts/oracle-case-study.md +++ b/pages/blog/posts/oracle-case-study.md @@ -594,14 +594,14 @@ With all this in place, our React frontend can now create the following form: ![React frontend with input form generated from an annotated Oracle Database 23ai JSON schema.](/img/posts/2025/oracle-case-study/form.webp) - Interestingly, whenever you change the schema annotation in the database, it is immediately reflected inside your browser once you refreshed it. You can try with: +
+Interestingly, whenever you change the schema annotation in the database, it is immediately reflected inside your browser once you refreshed it. You can try with: ```sql ALTER TABLE products MODIFY name ANNOTATIONS ( REPLACE "title" 'Product name' ); ``` - - +
#### JSON Relational Duality View @@ -721,7 +721,9 @@ Running the 2 queries above respectively returns the data in JSON format: |Wooden spatula|4.99|42| |Other nice product|5|10| -The `_metadata` object will contain additional information such as an `etag` that can be used for [optimistic concurrency control](https://docs.oracle.com/en/database/oracle/oracle-database/23/jsnvu/using-optimistic-concurrency-control-duality-views.html). +
+The `_metadata` object will contain additional information such as an `etag` that can be used for [optimistic concurrency control](https://docs.oracle.com/en/database/oracle/oracle-database/23/jsnvu/using-optimistic-concurrency-control-duality-views.html). +
#### POST method @@ -755,7 +757,9 @@ With 23ai, a check constraint can now be marked as [`PRECHECK`](https://docs.ora Once a check constraint is marked as `PRECHECK`, you have the choice whether or not to disable the check constraint on the table as the retrieved JSON schema with `dbms_json_schema.describe()` will contain the check constraints as well. -We do **NOT** advise to disable check constraints as it would allow inserting bad data into the relational tables directly. The remark about `PRECHECK` constraints is here to provide as much information as possible. +
+We do **NOT** advise to disable check constraints as it would allow inserting bad data into the relational tables directly. The remark about `PRECHECK` constraints is here to provide as much information as possible. +
```sql -- Mark check constraints as PRECHECK @@ -777,8 +781,6 @@ insert into products (name, price, quantity) values ('Bad product', 0, -1); commit; - -select * from products; ``` ### Data Use Case Domains @@ -1016,7 +1018,9 @@ select p.content.publishedDate.timestamp() + interval '5' day from posts p; ``` -We use the item method `timestamp()` in the last statement above because otherwise the SQL dot notation would return a SQL `JSON` (by default in 23ai) on which we cannot apply an interval operation. However, because the value is already stored as `TIMESTAMP` inside the binary JSON format, there will be *no conversion* from `JSON` to `timestamp` here. +
+We use the item method `timestamp()` in the last statement above because otherwise the SQL dot notation would return a SQL `JSON` (by default in 23ai) on which we cannot apply an interval operation. However, because the value is already stored as `TIMESTAMP` inside the binary JSON format, there will be *no conversion* from `JSON` to `timestamp` here. +
Last but not least, by enabling type casting, native SQL data type checks are also performed ensuring 100% fidelity between stored binary values in the encoded JSON and SQL data types. As a result, we can store not just the standard JSON data types but also the SQL data types inside the encoded binary JSON such as `NUMBER`, `DATE`, `TIMESTAMP`, `TIMESTAMP WITH TIME ZONE`, `INTERVAL`, `RAW`, `VECTOR`, etc. @@ -1101,7 +1105,9 @@ Results: | {
  "firstName": "Bob",
  "address": "Paris",
  "vat": false
} |Paris|Bob|false|null| | {
  "firstName": "Bob",
  "address": "Paris",
  "vat": false,
  "tableEvolve": true
} |Paris|Bob|false|true| -The trigger executes asynchronously, hence not delaying DML response times, however, because of it being asynchronous, it may take a second before you will see the new virtual column. +
+The trigger executes asynchronously, hence not delaying DML response times, however, because of it being asynchronous, it may take a second before you will see the new virtual column. +
## Conclusion @@ -1109,7 +1115,7 @@ We have shown lots of features inside the Oracle Database 23ai which provide pow ![Oracle Database 23ai is a converged database now supporting JSON schema.](/img/posts/2025/oracle-case-study/converged_database.webp) -Lean more: +Learn more: - [Oracle Database 23ai `DBMS_JSON_SCHEMA` PL/SQL package](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_JSON_SCHEMA.html#GUID-89B9C48D-D905-482C-A78C-8DB314EDF072) - [Oracle Database 23ai JSON Developer Guide](https://docs.oracle.com/en/database/oracle/oracle-database/23/adjsn/index.html) - [Getting started with Oracle Database 23ai](https://medium.com/db-one/oracle-database-download-install-tutorial-my-getting-started-guide-044925c10ca2) From 4c35706aed506427a83b3c6b42e5e85963f839c0 Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Sat, 28 Jun 2025 18:48:36 +0300 Subject: [PATCH 2/3] adjusting the rendering issue --- components/StyledMarkdown.tsx | 4 ++++ pages/blog/posts/oracle-case-study.md | 22 +++++++--------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/components/StyledMarkdown.tsx b/components/StyledMarkdown.tsx index 24107cc5a..2e7acf33e 100644 --- a/components/StyledMarkdown.tsx +++ b/components/StyledMarkdown.tsx @@ -688,6 +688,10 @@ export function TableOfContentMarkdown({ 'Bigquote', 'Regularquote', 'specialBox', + 'Infobox', + 'Danger', + 'Warning', + 'Tip', ), }, }} diff --git a/pages/blog/posts/oracle-case-study.md b/pages/blog/posts/oracle-case-study.md index 1a1812723..39bd70e70 100644 --- a/pages/blog/posts/oracle-case-study.md +++ b/pages/blog/posts/oracle-case-study.md @@ -594,14 +594,14 @@ With all this in place, our React frontend can now create the following form: ![React frontend with input form generated from an annotated Oracle Database 23ai JSON schema.](/img/posts/2025/oracle-case-study/form.webp) -
-Interestingly, whenever you change the schema annotation in the database, it is immediately reflected inside your browser once you refreshed it. You can try with: + Interestingly, whenever you change the schema annotation in the database, it is immediately reflected inside your browser once you refreshed it. You can try with: ```sql ALTER TABLE products MODIFY name ANNOTATIONS ( REPLACE "title" 'Product name' ); ``` -
+
+ #### JSON Relational Duality View @@ -721,9 +721,7 @@ Running the 2 queries above respectively returns the data in JSON format: |Wooden spatula|4.99|42| |Other nice product|5|10| -
-The `_metadata` object will contain additional information such as an `etag` that can be used for [optimistic concurrency control](https://docs.oracle.com/en/database/oracle/oracle-database/23/jsnvu/using-optimistic-concurrency-control-duality-views.html). -
+The `_metadata` object will contain additional information such as an `etag` that can be used for [optimistic concurrency control](https://docs.oracle.com/en/database/oracle/oracle-database/23/jsnvu/using-optimistic-concurrency-control-duality-views.html). #### POST method @@ -757,9 +755,7 @@ With 23ai, a check constraint can now be marked as [`PRECHECK`](https://docs.ora Once a check constraint is marked as `PRECHECK`, you have the choice whether or not to disable the check constraint on the table as the retrieved JSON schema with `dbms_json_schema.describe()` will contain the check constraints as well. -
-We do **NOT** advise to disable check constraints as it would allow inserting bad data into the relational tables directly. The remark about `PRECHECK` constraints is here to provide as much information as possible. -
+We do **NOT** advise to disable check constraints as it would allow inserting bad data into the relational tables directly. The remark about `PRECHECK` constraints is here to provide as much information as possible. ```sql -- Mark check constraints as PRECHECK @@ -1018,9 +1014,7 @@ select p.content.publishedDate.timestamp() + interval '5' day from posts p; ``` -
-We use the item method `timestamp()` in the last statement above because otherwise the SQL dot notation would return a SQL `JSON` (by default in 23ai) on which we cannot apply an interval operation. However, because the value is already stored as `TIMESTAMP` inside the binary JSON format, there will be *no conversion* from `JSON` to `timestamp` here. -
+We use the item method `timestamp()` in the last statement above because otherwise the SQL dot notation would return a SQL `JSON` (by default in 23ai) on which we cannot apply an interval operation. However, because the value is already stored as `TIMESTAMP` inside the binary JSON format, there will be *no conversion* from `JSON` to `timestamp` here. Last but not least, by enabling type casting, native SQL data type checks are also performed ensuring 100% fidelity between stored binary values in the encoded JSON and SQL data types. As a result, we can store not just the standard JSON data types but also the SQL data types inside the encoded binary JSON such as `NUMBER`, `DATE`, `TIMESTAMP`, `TIMESTAMP WITH TIME ZONE`, `INTERVAL`, `RAW`, `VECTOR`, etc. @@ -1105,9 +1099,7 @@ Results: | {
  "firstName": "Bob",
  "address": "Paris",
  "vat": false
} |Paris|Bob|false|null| | {
  "firstName": "Bob",
  "address": "Paris",
  "vat": false,
  "tableEvolve": true
} |Paris|Bob|false|true| -
-The trigger executes asynchronously, hence not delaying DML response times, however, because of it being asynchronous, it may take a second before you will see the new virtual column. -
+The trigger executes asynchronously, hence not delaying DML response times, however, because of it being asynchronous, it may take a second before you will see the new virtual column. ## Conclusion From 264ea3ea674c802cca388c5c1442cdd6be591622 Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Sat, 28 Jun 2025 19:01:16 +0300 Subject: [PATCH 3/3] small fix --- pages/blog/posts/oracle-case-study.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/blog/posts/oracle-case-study.md b/pages/blog/posts/oracle-case-study.md index 39bd70e70..ba3648838 100644 --- a/pages/blog/posts/oracle-case-study.md +++ b/pages/blog/posts/oracle-case-study.md @@ -777,6 +777,8 @@ insert into products (name, price, quantity) values ('Bad product', 0, -1); commit; + +select * from products; ``` ### Data Use Case Domains