I have a column in my SQLite database for saving student information (id, profile image path, age and description), then I also have a column for saving video path and thumbnail path specific to the student.
My question is, is it possible to have 2 ids in one column as below:
private static final String CREATE_STUDENT_SPESIFIC = " create table STUDENT_SPESIFIC ( _id TEXT , _viewHolderID INTEGER PRIMARY KEY AUTOINCREMENT , _THUMB_PATH TEXT , _VIDEO_PATH TEXT );";
_id is for when I want to get all video's and thumbnails for specific student (the student ID) and _viewHolderID is to get the specific video and thumbnail to the specific student.
I want to _viewHolderID to AUTOINCREMENT because the student will keep adding to the specific student and I want to be able to rename a specific video name.
I have tried to do so as above but I get the following error:
abort at 12 in [INSERT INTO STUDENT_SPESIFIC(_THUMB_PATH,_VIDEO_PATH,_viewHolderID,_id) VALUES (?,?,?,?)]: UNIQUE constraint failed: STUDENT_SPESIFIC._viewHolderID android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: STUDENT_SPESIFIC._viewHolderID (code 1555)