Photo AI

VRAG 2: DATABASISPROGRAMMERING Die databasistoepassing word benodig in 'n digitale-media-mashup vir die doel om die werking van 'n videodatabase te demonstreer - NSC Information Technology - Question 2 - 2024 - Paper 1

Question icon

Question 2

VRAG-2:-DATABASISPROGRAMMERING--Die-databasistoepassing-word-benodig-in-'n-digitale-media-mashup-vir-die-doel-om-die-werking-van-'n-videodatabase-te-demonstreer-NSC Information Technology-Question 2-2024-Paper 1.png

VRAG 2: DATABASISPROGRAMMERING Die databasistoepassing word benodig in 'n digitale-media-mashup vir die doel om die werking van 'n videodatabase te demonstreer. Die... show full transcript

Worked Solution & Example Answer:VRAG 2: DATABASISPROGRAMMERING Die databasistoepassing word benodig in 'n digitale-media-mashup vir die doel om die werking van 'n videodatabase te demonstreer - NSC Information Technology - Question 2 - 2024 - Paper 1

Step 1

Knoppie [2.1.1 - Free videos]

96%

114 rated

Answer

To retrieve free videos from the database, the appropriate SQL query is:

SELECT Title, Duration, UploadDate, CreatorID
FROM tblVideos
WHERE FreeVideo = True;

Step 2

Knoppie [2.1.2 - Check domain]

99%

104 rated

Answer

To check the domain for creators residing in South Africa, the SQL statement should be:

SELECT CreatorName, Email, Country
FROM tblCreators
WHERE Email LIKE '%@gmail.com%' AND Country = 'South Africa';

Step 3

Knoppie [2.1.3 - Latest videos]

96%

101 rated

Answer

To obtain the latest videos sorted by upload date, use:

SELECT TOP 3 UploadDate, VideoID, Title
FROM tblVideos
ORDER BY UploadDate DESC;

Step 4

Knoppie [2.1.4 - Videos per creator]

98%

120 rated

Answer

To count videos per creator, the correct SQL query is:

SELECT CreatorID, COUNT(*)
FROM tblVideos
GROUP BY CreatorID
HAVING COUNT(*) > 5;

Step 5

Knoppie [2.1.5 - Add new creator]

97%

117 rated

Answer

To add a new creator, you can use the following SQL insert statement:

INSERT INTO tblCreators (Name, Email)
VALUES ('TrishKamal', 'trish@srmarketing.co.za');

Step 6

Knoppie [2.2.1 - Remove creator]

97%

121 rated

Answer

To remove a creator from the database, follow these steps:

BEGIN;
DELETE FROM tblVideos WHERE CreatorID = (SELECT CreatorID FROM tblCreators WHERE CreatorName = 'NameToRemove');
DELETE FROM tblCreators WHERE CreatorName = 'NameToRemove';
COMMIT;

Step 7

Knoppie [2.2.2 - Change upload date]

96%

114 rated

Answer

To change the upload date for a specific video, the SQL command should be:

UPDATE tblVideos SET UploadDate = CURRENT_DATE WHERE VideoID = 'specificVideoID';

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

;