Photo AI

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 icon

Question 2

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.png

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

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

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

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

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

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

Answer

To remove a creator and all associated videos, we need to loop through the tblCreators table:

  1. Start with the first record in tblCreators.
  2. For each creator, check their CreatorName against the specified name.
  3. Within that loop, check the tblVideos for any records with matching CreatorID.
  4. If records are found, delete them using:
tblVideos.Delete;
  1. Finally, delete the creator record from tblCreators once those associated videos are removed.
  2. Continue this process until all creators have been checked.

Step 7

Button 2.2.2 - Change upload date

96%

114 rated

Answer

To change the upload date, navigate to the tblVideos and edit the UploadDate as follows:

tblVideos.Edit;
tblVideos['UploadDate'] := Date;
tblVideos.Post;

We can also format the date using:

DateToStr(Date);
FormatDateTime('yyyy/mm/dd', Now);

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;