1Z0-184-25 Question 34
Single answerYou have a table named PRODUCT_RECOMMENDATIONS in your Autonomous Database on Oracle Cloud Infrastructure. This table includes a vector column EMBEDDING_DIM_128, which is defined with a dimension of 128. Your data science team now needs to store embeddings of dimension 256 in the same table, and they want to preserve existing data with minimal downtime. Which approach should you use to perform this DDL operation on the vector column?
- A
Use an ALTER TABLE statement to directly modify the existing EMBEDDING_DIM_128 column to dimension(256).
- B
Add a new vector column EMBEDDING_DIM_256, copy the data from EMBEDDING_DIM_128 to the new column, and finally drop the old column.
- C
Drop the existing EMBEDDING_DIM_128 column, create a new EMBEDDING_DIM_256 column, and rely on application logs to reinsert historical embeddings.
- D
Rename the column from EMBEDDING_DIM_128 to EMBEDDING_DIM_256 using a RENAME command with the new dimension value.
Show answer and explanation
Correct answer: B
Explanation
When you need to change the dimension of a vector column, you cannot directly modify its dimension definition. Instead, follow best practices: create a new column with the required dimension, transfer data from the old column, and then remove the old column. For more details, refer to Oracle Database documentation on vector data types and DDL operations.
- A. Incorrect.
Incorrect. Oracle Database does not allow changing the dimension of a vector column in place, so a direct ALTER TABLE command to change dimension(128) to dimension(256) is not supported.
- B. Correct.
Correct. Adding a new vector column, migrating existing data, and then dropping the old column is the supported method to preserve data while changing the vector dimension.
- C. Incorrect.
Incorrect. Dropping the column first would lose data unless you rely on external logs. This approach disrupts availability and does not guarantee a seamless migration.
- D. Incorrect.
Incorrect. RENAME only changes the column name, not its vector dimension. You cannot alter the dimension simply by renaming the column.