Database Development Flashcards
1
Q
How do you do a UPDATE query?
A
UPDATE Tutor Group
SET Room = ‘D15’
WHERE TGCode = ‘TG5’;
2
Q
How do you do an INSERT query?
A
INSERT INTO Result (StudentNo, AssessmentCode, Mark, AssessmentDate)
VALUES (‘101237’,’X216’,’99’, ‘2016-10-23’);
3
Q
How do you do a DELETE query?
A
DELETE FROM Result WHERE Result.StudentNo = “101237”
4
Q
How do you do a SELECT query?
A
SELECT Assessment.AssessmentType, Assessment.Title, Assessment.Marks
FROM Assessment
WHERE Assessment.AssessmentType = “Multiple Choice” AND Assessment.Marks <=100
ORDER BY Assessment.AssessmentType DESC, Assessment.Title ASC;
5
Q
What are the two possible participations of an entity in an ER diagram?
A
Mandatory, Optional