School DB Lab
Live from information_schema

Table Explorer

Every fact on this page — columns, types, keys, defaults, indexes — is read straight from MySQL's own catalogue. Click any table to see its full structure.

اس صفحے پر موجود ہر معلومات — کالمز (Columns)، ڈیٹا ٹائپس (Types)، کیز (Keys)، ڈیفالٹ ویلیوز (Defaults)، اور انڈیکسز (Indexes) — براہِ راست MySQL کے اپنے سسٹم کیٹلاگ سے لائیو پڑھی جا رہی ہے۔ کسی بھی ٹیبل پر کلک کر کے اس کی مکمل ساخت (Structure) دیکھی جا سکتی ہے۔

lab_students — 0 rows

COLUMNS

ColumnTypeKeysNull?DefaultExtra
student_id int(10) unsigned
PK
NOTNULL — auto_increment
student_token varchar(64)
UQ
NOTNULL — —
student_code varchar(20)
UQ
NOTNULL — —
student_name varchar(100)
NOTNULL 'Student' —
passkey_hash varchar(255)
NULL NULL —
password_hash varchar(255)
NULL NULL —
is_active tinyint(1)
NOTNULL 1 —
must_change_pw tinyint(1)
NOTNULL 0 —
created_by int(11)
NULL NULL —
created_at timestamp
NOTNULL current_timestamp() —
last_active_at timestamp
NOTNULL current_timestamp() on update current_timestamp()

FOREIGN KEYS (outgoing)

None — this table does not point to any other table.

REFERENCED BY (incoming)

Child tableChild columnRelationshipON DELETE
lab_record_ownership student_token lab_students 1:M lab_record_ownership CASCADE
lab_task_progress student_token lab_students 1:M lab_task_progress CASCADE

UNIQUE CONSTRAINTS

UQ (student_code) UQ (student_token)

INDEXES

UQ IDX (student_code) UQ IDX (student_token)
Explain this table
Primary Key
student_id — uniquely identifies every row.
What could go wrong?
Inserting a row with a duplicate UNIQUE value, a missing NOT NULL field, or a Foreign Key pointing at a row that doesn't exist. Try it in the Keys & Constraints Lab.
پرائمری کی (Primary Key)
student_id — ہر قطار کو منفرد شناخت دیتی ہے۔
کیا غلط ہو سکتا ہے؟
کسی ایسی قطار کو داخل کرنا جس میں پہلے سے موجود یونیک ویلیو (UNIQUE value) ہو، کوئی ضروری فیلڈ (NOT NULL) خالی چھوڑ دی گئی ہو، یا فارن کی (Foreign Key) کسی ایسی قطار کی طرف اشارہ کر رہی ہو جو موجود نہ ہو۔ اسے خود آزمائیں: Keys & Constraints Lab۔