Problem-statement: Couchbase Bucket_1 have an array of keys(stud_ids) and Bucket_2(stud_id) require a join with those array of keys(stud_ids). Could you please help.
How to write a query to get Student Name and Course in this scenario using join. Please find the below example for the clear understanding.
Bucket_1:
Document-1
{
“Name”: “ABC”,
“id”: “1001”,
“description”: “none”,
“stud_ids”: [“S1”, “S2”],
“location”: “uk”
}
Document-2
{
…
}
Bucket_2:
Document-1
{
“stud_id”: “S1”,
“stud_name”: “Student1”,
“course”: “MS”
}
Document-2
{
“stud_id”: “S2”,
“stud_name”: “Student2”,
“course”: “MS”
}
Document-3
{
…
}