A database management system is required for a digital media company that specialises in creating and distributing online video content - NSC Information Technology - Question 2 - 2024 - Paper 1
Question 2
A database management system is required for a digital media company that specialises in creating and distributing online video content. The company has several vide... show full transcript
Worked Solution & Example Answer:A database management system is required for a digital media company that specialises in creating and distributing online video content - NSC Information Technology - Question 2 - 2024 - Paper 1
Step 1
Button 2.1.1 - Free videos
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To retrieve all free videos from the tblVideos table, we can use the SQL query:
SELECT Title, Duration, UploadDate, CreatorID
FROM tblVideos
WHERE FreeVideo = True;
Alternatively, we could also use:
WHERE FreeVideo = Yes;
Both queries will provide the necessary information about the free videos.
Step 2
Button 2.1.2 - Check domain
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To check for creators from South Africa whose email does not contain "@gmail.com", we can use the following SQL query:
SELECT CreatorName, Email, Country
FROM tblCreators
WHERE Email NOT LIKE '%@gmail.com%'
AND Country = 'South Africa';
Step 3
Button 2.1.3 - Latest videos
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To find the top 3 latest uploaded videos, we can execute the following query:
SELECT TOP 3 UploadDate, VideoID, Title
FROM tblVideos
ORDER BY UploadDate DESC;
Step 4
Button 2.1.4 - Videos per creator
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To count the number of videos uploaded by each creator, we can use this SQL statement:
SELECT CreatorID, COUNT(*) AS NumberUploaded
FROM tblVideos
GROUP BY CreatorID
HAVING COUNT(*) > 5;
Step 5
Button 2.1.5 - Add new creator
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To add a new creator, we will use the INSERT statement as follows:
INSERT INTO tblCreators
VALUES ('C001', 'TRISHKALOM', 'trisha@marketing.co.za', 'South Africa');
Step 6
Button 2.2.1 - Remove creator
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To remove a creator and all associated videos, we need to loop through the tblCreators table:
Start with the first record in tblCreators.
For each creator, check their CreatorName against the specified name.
Within that loop, check the tblVideos for any records with matching CreatorID.
If records are found, delete them using:
tblVideos.Delete;
Finally, delete the creator record from tblCreators once those associated videos are removed.
Continue this process until all creators have been checked.
Step 7
Button 2.2.2 - Change upload date
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To change the upload date, navigate to the tblVideos and edit the UploadDate as follows: