Difficulty: Easy
Correct Answer: FRAGMENT BY ROUND ROBIN IN dbspace1, dbspace2
Explanation:
Introduction / Context:
This question tests knowledge of Informix table fragmentation syntax, specifically round robin fragmentation across multiple dbspaces. Fragmentation in Informix allows a table to be physically divided into multiple pieces for performance, manageability, and availability. Round robin fragmentation distributes rows evenly across fragments without regard to a key value.
Given Data / Assumptions:
Concept / Approach:
In Informix, the FRAGMENT BY clause is used to define how a table is fragmented. For non key based fragmentation, the ROUND ROBIN keyword specifies that rows are placed sequentially and evenly across fragments. The IN clause lists the dbspaces where the fragments reside. Therefore, a correct statement must use FRAGMENT BY ROUND ROBIN followed by IN and the list of dbspaces. Extra or missing keywords make the syntax invalid.
Step-by-Step Solution:
1. Recall that the general syntax for round robin fragmentation is FRAGMENT BY ROUND ROBIN IN dbspace list.
2. Evaluate option A, which uses FRAGMENT AS instead of FRAGMENT BY. This does not match Informix syntax.
3. Evaluate option B, which uses FRAGMENT TABLE BY, adding an extra TABLE keyword that is not part of the standard clause.
4. Evaluate option C, FRAGMENT BY ROUND ROBIN IN dbspace1, dbspace2, which matches the documented syntax exactly.
5. Option D, FRAGMENT BY ROUND ROBIN, omits the required list of dbspaces and is therefore incomplete.
Verification / Alternative check:
You can verify the syntax against Informix documentation or by executing a similar statement in a test database. A successful CREATE TABLE or ALTER TABLE statement using FRAGMENT BY ROUND ROBIN IN dbspace1, dbspace2 confirms that option C is correct.
Why Other Options Are Wrong:
Option A is wrong because FRAGMENT AS is not a valid Informix clause for table fragmentation.
Option B is wrong because the extra TABLE keyword is not part of the supported syntax and would cause a parse error.
Option D is wrong because it does not specify the dbspaces where the fragments should reside, making the definition incomplete.
Common Pitfalls:
Learners often confuse FRAGMENT BY with other SQL keywords or forget to list dbspaces explicitly. Another pitfall is mixing key based and round robin syntax, which leads to invalid statements. Always check that the clause uses FRAGMENT BY, the appropriate strategy keyword such as ROUND ROBIN, and a valid IN clause listing dbspaces.
Final Answer:
The correct statement is FRAGMENT BY ROUND ROBIN IN dbspace1, dbspace2.
Discussion & Comments