Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-909 Topic 8 Question 48 Discussion

Actual exam question for Oracle's 1Z0-909 exam
Question #: 48
Topic #: 8
[All 1Z0-909 Questions]

Examine this statement which executes successfully:

CREATE TABLE 'fshop' ('product' JSON DEFAULT NULL ) ENGINE=InnoDB;

Now, examine a json value contained in the table:

{"name" : "orange", "varieties" : [{"VarietyName":"Clementine", "Origin" : ["PA", "BU"] }, {"VarietyName": "tangerine", "Origin" : ["CH","JP"]>]>

Which will cause documents to be indexed over the 'name' key?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Hoa
2 months ago
Okay, let me think this through step-by-step. We need to create a virtual column that extracts the 'name' field from the JSON data, and then add an index on that column. I'm going with option C.
upvoted 0 times
...
Trina
2 months ago
Haha, this is like a secret code language or something. I bet the exam writers had a lot of fun coming up with these tricky JSON questions.
upvoted 0 times
Glynda
2 months ago
E) ALTER TABLE fshop ADD name VARCHAR(20) AS (JSON_ONQUOTE (product->\'S.varieties.VarietyName\')), ADD INDEX (name);
upvoted 0 times
...
India
2 months ago
C) ALTER TABLE fshop ADD COLUMN name VARCHAR(20) AS (product->' S - name' ) VIRTUAL, ADD KEY idx_name (name) ;
upvoted 0 times
...
Flo
2 months ago
A) ALTER TABLE fshop ADD COLUMN name VARCHAR(20) AS (product->' S - varieties' ) VIRTUAL, ADD KEY idx_name (name) ;
upvoted 0 times
...
...
Milly
2 months ago
Why do you think A is the correct answer?
upvoted 0 times
...
Stefania
3 months ago
I disagree, I believe the correct answer is A.
upvoted 0 times
...
Milly
3 months ago
I think the correct answer is C.
upvoted 0 times
...
Shawna
3 months ago
Wait, what? This question is making my head spin. JSON in a database? I thought we were supposed to be learning about SQL, not JSON wrangling.
upvoted 0 times
Iesha
2 months ago
D) ALTER TABLE fshop ADD COLUMN name VARCHAR(20), ADD KEY idx_name (name) ;
upvoted 0 times
...
Nickolas
2 months ago
C) ALTER TABLE fshop ADD COLUMN name VARCHAR(20) AS (product->' S - name' ) VIRTUAL, ADD KEY idx_name (name) ;
upvoted 0 times
...
Winfred
2 months ago
B) ALTER TABLE fshop ADD COLUMN name VARCHAR(100) AS (product->' S - varieties' ) VIRTUAL, ADD KEY idx_name (name) ;
upvoted 0 times
...
Natalie
2 months ago
A) ALTER TABLE fshop ADD COLUMN name VARCHAR(20) AS (product->' S - varieties' ) VIRTUAL, ADD KEY idx_name (name) ;
upvoted 0 times
...
...
Cyril
3 months ago
Hmm, I think option C is the right one. It looks like we need to extract the 'name' field from the JSON data using the correct JSON path syntax.
upvoted 0 times
Naomi
2 months ago
Yeah, we need to use the correct JSON path syntax to extract the 'name' field.
upvoted 0 times
...
Wilburn
3 months ago
I agree, option C seems to be the correct one.
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77