← RGPV CS-502 DBMS December 2025 solved question paper
RGPV CS-502 (GS) | December 2025 | Q3(b) | 7 marks (inferred)
Question (restated): Create STUDENT(Roll No, Name, Marks), insert two records and retrieve students scoring above 60.
Answer
CREATE TABLE defines a relation and its constraints. INSERT adds rows and SELECT retrieves rows satisfying a condition. Use RollNo as a portable identifier for the question’s Roll No attribute.
CREATE TABLE STUDENT ( RollNo INT PRIMARY KEY, Name VARCHAR(100) NOT NULL, Marks INT NOT NULL CHECK (Marks BETWEEN 0 AND 100) ); INSERT INTO STUDENT (RollNo, Name, Marks) VALUES (101, 'Asha', 75), (102, 'Ravi', 58); SELECT RollNo, Name, Marks FROM STUDENT WHERE Marks > 60;
Expected result
| RollNo | Name | Marks |
|---|---|---|
| 101 | Asha | 75 |
The primary key prevents duplicate roll numbers. NOT NULL requires values for Name and Marks, while CHECK restricts the range in DBMS versions that enforce it. The WHERE clause filters rows before projection. A student scoring exactly 60 is excluded because the question uses a strict greater-than comparison. CREATE is DDL, INSERT is DML, and SELECT is a query operation. Explicit column lists make insertion clearer and less sensitive to changes in column order.
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion