Oracle Converged Database
Blockchain tables
In-Database Machine Learning
Spatial
Relational
Columnar analytics
Property Graph/RDFNative Binary JSON/XML
Text Data
Transactional Event Queue
Vector embeddings
Internet of Things
External Data
CREATE JSON DUALITY VIEW attendeeSchedule
AS attendee
{
_id : aid
name : name
company : company
schedule : attendee_sessions
[ {
session @unnest
{
code : sid
session : sname
time : time
room : room
speaker @unnest
{
speaker : sname
}
}
} ]
};
{
"_id" : "3245",
"name" : "Jill",
"company" : "ACME Inc",
"schedule" : [
{
"code" : "DB12",
"session" : "SQL",
"time" : "14:00",
"room" : "A102",
"speaker" : "Adam"
},
…
]
}
The structure of the view mirrors the structure of the
desired JSON, making it simple to define
Uses familiar
GraphQL syntax
SCHEDULE FOR: JILL
CREATE JSON DUALITY VIEW attendeeSchedule
AS attendee
{
_id : aid
name : name
company : company
schedule : attendee_sessions
[ {
session
{
code : sid
session : sname
time : time
room : room
speaker
{
speaker : sname
}
}
} ]
};
The view simply specifies the tables that contain the
data to include in the JSON document
SPEAKER
SESSION
ATTENDEE
ATTENDEE_SESSION
CREATE JSON DUALITY VIEW attendeeSchedule
AS attendee
{
_id : aid
name : name
company : company
schedule : attendee_sessions
[ {
session
{
code : sid
session : sname
time : time
room : room
speaker
{
speaker : sname
}
}
} ]
};
The view simply specifies the tables that contain the
data to include in the JSON document
ATTENDEE
AIDNAME COMPANY
PHON
E
3245 Jill ACME Inc 650
… … … …
… … … …
… … … …
CREATE JSON DUALITY VIEW attendeeSchedule
AS attendee
{
_id : aid
name : name
company : company
schedule : attendee_sessions @delete @insert @Update
[ {
session
{
code : sid
session : sname
time : time
room : room
speaker
{
speaker : sname
}
}
} ]
};
And specifies the updatability rules
Attendees can update their schedule, but not speaker, rooms, or speakers
CREATE JSON DUALITY VIEW attendeeSchedule
AS attendee
{
_id : aid
name : name
company : company
schedule : attendee_sessions
[ {
session
{
code : sid
session : sname
time : time
room : room
speaker @unnest
{
speaker : sname
}
}
} ]
};
Also specifies when properties in a nested object
should be unnested into the parent