An Adobe Commerce developer is trying to create a custom table using declarative schema, but is unable to do so. What are two errors in the snippet above? (Choose two.)
A.
Column (roll_no) does not have index. It is needed since attribute identity is set to true.
B.
Column (entity_id) does not have index. It is needed since attribute identity is set to false.
C.
Column (student_name) does not have attribute length.
D.
NULL is not a valid value for column (roll_no).
According to claude.ai epos:
A. When a column is marked as an identity column (identity="true"), it means it is an auto-incrementing column. In such cases, an index is automatically created for the column by the database engine. However, in the given snippet, the roll_no column is set as an identity column, but it does not have an explicit index defined. Although it is not a strict requirement to define the index manually, it is considered a best practice to do so for clarity and consistency.
C. The student_name column is defined with the type "text", but it does not have the length attribute specified. In declarative schema, when using the "text" type, it is required to provide the length attribute to specify the maximum length of the text field. Without the length attribute, the schema definition is incomplete and will result in an error.
Just implemented it on local env:
Auto Increment column do not have index. Column - "roll_no", table - "student_detais"
upvoted 3 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
arierave
5 months, 2 weeks agosome_gyy
7 months, 4 weeks ago