You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/blog/posts/oracle-case-study.md
+7-15Lines changed: 7 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -594,14 +594,14 @@ With all this in place, our React frontend can now create the following form:
594
594
595
595

596
596
597
-
<blockquote>
598
-
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:
597
+
<Infobox> 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:
599
598
```sql
600
599
ALTERTABLE products MODIFY name ANNOTATIONS (
601
600
REPLACE "title"'Product name'
602
601
);
603
602
```
604
-
</blockquote>
603
+
</Infobox>
604
+
605
605
606
606
#### JSON Relational Duality View
607
607
@@ -721,9 +721,7 @@ Running the 2 queries above respectively returns the data in JSON format:
721
721
|Wooden spatula|4.99|42|
722
722
|Other nice product|5|10|
723
723
724
-
<blockquote>
725
-
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).
726
-
</blockquote>
724
+
<Infobox>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).</Infobox>
727
725
728
726
#### POST method
729
727
@@ -757,9 +755,7 @@ With 23ai, a check constraint can now be marked as [`PRECHECK`](https://docs.ora
757
755
758
756
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.
759
757
760
-
<blockquote>
761
-
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.
762
-
</blockquote>
758
+
<Danger>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.</Danger>
763
759
764
760
```sql
765
761
-- Mark check constraints as PRECHECK
@@ -1018,9 +1014,7 @@ select p.content.publishedDate.timestamp() + interval '5' day
1018
1014
from posts p;
1019
1015
```
1020
1016
1021
-
<blockquote>
1022
-
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.
1023
-
</blockquote>
1017
+
<Infobox>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.</Infobox>
1024
1018
1025
1019
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.
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.
1110
-
</blockquote>
1102
+
<Infobox>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.</Infobox>
0 commit comments