Computer Department Database Computer Department Database: Ge Practical 2
Computer Department Database Computer Department Database: Ge Practical 2
Create a database having three tables to store the details of students of computer department
in your college, as per the given schema.
PERSONAL INFORMATION ABOUT STUDENT (college roll number,, Name of student, Date of
birth, Address, Marks(rounded off to whole number ) in percentage at 10+2, Phone number)
A] Identify primary and foreign keys. Create the tables and insert at least 5 records in each
table.
SHOW DATABASES;
USE computerdep;
SHOW TABLES;
CREATE TABLE STUDENT
Phn VARCHAR(10),
SHOW TABLES;
DESCRIBE STUDENT;
CREATE TABLE PaperDetails
SHOW TABLES;
DESCRIBE PaperDetails;
(Rollno
Rollno VARCHAR(10) NOT NULL,
MarksH INT,
SHOW TABLES;
DESCRIBE StudentDetails;
INSERT INTO Student
B] Design a query that will return the records (from the second table) along with the name of
student from the first table, related to students who have more than 75% attendance and
more thann 60% marks in 'Computer system architecture'
SELECT Name
-> ;
UPDATE STUDENTDETAILS
WHERE S.Rollno = SD.Rollno AND P.PaperCode = SD.PaperCode AND Address LIKE '%Delhi%'
AND PaperName = 'Programming Fundamentals using C++' AND MarksH>60
UPDATE STUDENTDETAILS
E] List the name of student who has got the highest marks in Computer System Architecture.