Gogolang

Go JSON Relational Duality Views Sample

Go sample for creating and querying JSON Relational Duality Views in Oracle AI Database.

JSONDuality Views#Duality Views#Go#JSON
What this sample helps you learn

This sample demonstrates how to use Go, `godror`, and Oracle AI Database JSON Relational Duality Views together. The program creates a `student` table, creates a `student_dv` duality view, inserts JSON data into the view, and queries the JSON document back.

What this sample demonstrates

JSON

Document-shaped data and SQL/JSON querying inside Oracle AI Database.

Use when records need flexible structure without leaving SQL, indexes, constraints, and transactions.

Duality Views

Document-shaped access over relational tables using JSON Relational Duality Views.

Use when APIs need JSON documents without giving up relational storage, SQL, constraints, and transactions.

Highlights

  • Go
  • Oracle client libraries available through DYLD_LIBRARY_PATH
  • An Oracle AI Database instance reachable at localhost:1521/freepdb1