DBMS and SQL: DDL and DML – Grade 13 A/L ICT Notes 8.3

© 2026 schoolict.net (Ruwan Mangala Suraweera)

8.3 DBMS and SQL: DDL and DMLDBMS සහ SQL: DDL සහ DML

Grade 13 A/L ICT · Lesson 813 ශ්‍රේණිය A/L ICT · පාඩම 8

Prints all tabs in the language you are reading. Use “Save as PDF” in the print window to keep a copy.ඔබ කියවන භාෂාවෙන් සියලු tabs මුද්‍රණය වේ. පිටපතක් තියාගන්න print window එකේ “Save as PDF” තෝරන්න.
🎬Video coming soon in this language. Switch language to watch the other video.මේ භාෂාවෙන් වීඩියෝව ඉක්මනින් එනවා. අනෙක් වීඩියෝව බලන්න භාෂාව මාරු කරන්න.

In this videoමේ වීඩියෝවේ

  • A DBMS sits between users and stored data.DBMS පරිශීලකයින් සහ දත්ත අතර ඇත.
  • DDL = CREATE, ALTER, DROP.DDL = CREATE, ALTER, DROP.
  • DML = INSERT, SELECT, UPDATE, DELETE.DML = INSERT, SELECT, UPDATE, DELETE.
  • WHERE filters rows; ORDER BY sorts; GROUP BY groups.WHERE පෙරයි; ORDER BY පිළිවෙළ කරයි; GROUP BY කාණ්ඩ කරයි.
  • INNER JOIN combines tables on matching keys.INNER JOIN ගැළපෙන යතුරු මත වගු එක් කරයි.
DBMSSQLDDLDMLDCLCREATE TABLEALTER TABLE

Notesසටහන්

Syllabus 8.3. A Database Management System (DBMS) is the software between users and the stored data. We talk to it with SQL. DDL (CREATE, ALTER, DROP) defines the structure; DML (INSERT, SELECT, UPDATE, DELETE) works with the data, including queries on one table and inner joins on several tables.විෂය නිර්දේශය 8.3. දත්ත සමුදාය කළමනාකරණ පද්ධතිය (DBMS) පරිශීලකයින් සහ ගබඩා කළ දත්ත අතර ඇති මෘදුකාංගයයි. අපි එය සමඟ SQL මගින් කතා කරමු. DDL (CREATE, ALTER, DROP) ව්‍යුහය නිර්වචනය කරයි; DML (INSERT, SELECT, UPDATE, DELETE) දත්ත සමඟ ක්‍රියා කරයි – එක් වගුවක විමසුම් සහ වගු කිහිපයක inner join ද ඇතුළුව.

1. Components of a database system1. දත්ත සමුදාය පද්ධතියක සංරචක

Database system: users → applications → DBMS → databaseUsersApplicationprogramsDBMSDDL · DML · DCLsecurity · backupconcurrencyDatabase+ datadictionaryDDL: CREATE, ALTER, DROP – define structureDML: INSERT, SELECT, UPDATE, DELETE – work with dataDBA controls the DBMS; SQL is the language for both
Users, applications, DBMS and databaseපරිශීලකයින්, යෙදුම්, DBMS සහ දත්ත සමුදාය
  • Hardware and software (the DBMS, e.g. MySQL).දෘඩාංග සහ මෘදුකාංග (DBMS, උදා: MySQL).
  • Data and the data dictionary (metadata).දත්ත සහ දත්ත ශබ්දකෝෂය (metadata).
  • Users: end users, programmers and the database administrator (DBA).පරිශීලකයින්: අවසාන පරිශීලකයින්, ක්‍රමලේඛකයින් සහ DBA.
  • Procedures: rules for backup, security and access.ක්‍රියා පටිපාටි: උපස්ථ, ආරක්ෂාව සහ ප්‍රවේශ නීති.

2. SQL and its classification2. SQL සහ එහි වර්ගීකරණය

Groupකාණ්ඩයPurposeඅරමුණCommandsවිධාන
DDLDDLDefine structureව්‍යුහය නිර්වචනයCREATE, ALTER, DROPCREATE, ALTER, DROP
DMLDMLWork with dataදත්ත සමඟ ක්‍රියාINSERT, SELECT, UPDATE, DELETEINSERT, SELECT, UPDATE, DELETE
DCLDCLControl accessප්‍රවේශ පාලනයGRANT, REVOKEGRANT, REVOKE

3. DDL: creating and changing structure3. DDL: ව්‍යුහය සෑදීම සහ වෙනස් කිරීම

📝 DDL commands (SQL)DDL විධාන (SQL)

CREATE DATABASE SchoolDB;
USE SchoolDB;
-- add and remove a column
ALTER TABLE Student ADD Phone VARCHAR(10);
ALTER TABLE Student DROP COLUMN Phone;
-- add and remove keys (MySQL style)
ALTER TABLE Student ADD PRIMARY KEY (StudentID);
ALTER TABLE Student ADD CONSTRAINT fk_class
  FOREIGN KEY (ClassID) REFERENCES Class(ClassID);
ALTER TABLE Student DROP FOREIGN KEY fk_class;
ALTER TABLE Student DROP PRIMARY KEY;
-- remove objects
DROP TABLE Marks;
DROP DATABASE SchoolDB;

When we added Phone in sqlite3 the Student columns became StudentID, Name, ClassID, Phone; after DROP COLUMN they were StudentID, Name, ClassID; after DROP TABLE Marks the tables left were Class, Student.sqlite3 තුළ Phone එක් කළ විට Student තීරු StudentID, Name, ClassID, Phone විය; DROP COLUMN පසු StudentID, Name, ClassID; DROP TABLE Marks පසු ඉතිරි වගු Class, Student.

4. DML: inserting, updating and deleting4. DML: ඇතුළත් කිරීම, යාවත්කාලීන කිරීම සහ මකා දැමීම

📝 DML commands (SQL)DML විධාන (SQL)

INSERT INTO Student (StudentID, Name, ClassID) VALUES ('S006', 'Dilini', 'C12B');
UPDATE Marks SET Mark = Mark + 5 WHERE SubjectCode = 'ICT' AND Mark < 50;
DELETE FROM Marks WHERE SubjectCode = 'MATH' AND Mark < 60;
🧮 Worked exampleවිසඳූ උදාහරණය How many rows does each statement change on the sample data?නියැදි දත්තවල එක් එක් විධානය වෙනස් කරන පේළි ගණන?
INSERT adds 1 row (students now 6). UPDATE changes 2 rows (S002 45→50, S005 39→44). DELETE removes 1 row (S003 MATH 55), leaving 7 mark rows.INSERT පේළි 1 ක් එක් කරයි (සිසුන් 6). UPDATE පේළි 2 ක් වෙනස් කරයි (S002 45→50, S005 39→44). DELETE පේළි 1 ක් ඉවත් කරයි; ලකුණු පේළි 7 ක් ඉතිරි වේ.

5. SELECT queries5. SELECT විමසුම්

📝 Single-table queriesඑක් වගු විමසුම්

SELECT Name FROM Student WHERE ClassID = 'C12A' ORDER BY Name;

SELECT AVG(Mark) FROM Marks WHERE SubjectCode = 'ICT';

SELECT ClassID, COUNT(*) FROM Student GROUP BY ClassID ORDER BY ClassID;
QueryවිමසුමResultප්‍රතිඵලය
Students in C12A (by name)C12A සිසුන් (නම අනුව)Kamala; Nimal; RuwanKamala; Nimal; Ruwan
Average ICT markසාමාන්‍ය ICT ලකුණ62.462.4
Students per classපන්තියකට සිසුන්C12A, 3; C12B, 2C12A, 3; C12B, 2
INNER JOIN Student and Class ON ClassIDStudentS003 Sunil C12BS004 Amali C12BClassC12A 12A PereraC12B 12B SilvamatchResultAmali SilvaSunil SilvaOnly rows whose ClassID values match appear in the result.WHERE ClassName = 12B keeps class C12B only.
Inner join of Student and ClassStudent සහ Class inner join

📝 Inner join queriesInner join විමසුම්

SELECT Student.Name, Class.Teacher
FROM Student INNER JOIN Class
  ON Student.ClassID = Class.ClassID
WHERE Class.ClassName = '12B'
ORDER BY Student.Name;

SELECT Student.Name, Marks.Mark
FROM Student INNER JOIN Marks
  ON Student.StudentID = Marks.StudentID
WHERE Marks.SubjectCode = 'ICT' AND Marks.Mark >= 60
ORDER BY Marks.Mark DESC;
Query 1: Nameවිමසුම 1: නමTeacherගුරු
AmaliAmaliSilvaSilva
SunilSunilSilvaSilva
Query 2: Nameවිමසුම 2: නමICT markICT ලකුණ
SunilSunil8888
NimalNimal7878
AmaliAmali6262
💡 Always write the join condition (ON …); without it every row joins every row.join කොන්දේසිය (ON …) සැමවිටම ලියන්න; නැත්නම් සෑම පේළියක්ම සෑම පේළියක් සමඟ එක් වේ.
🚀 Beyond the syllabus (2026 update)🚀 විෂය නිර්දේශයෙන් ඔබ්බට (2026 යාවත්කාලීනය) Not required for the exam – read for interest.විභාගයට අවශ්‍ය නැත – දැනුම සඳහා කියවන්න. In 2026 many DBMSs accept natural-language questions and turn them into SQL, but you must still check the generated query.2026 දී බොහෝ DBMS ස්වභාවික භාෂා ප්‍රශ්න SQL බවට හරවයි; නමුත් සෑදූ විමසුම ඔබම පරීක්ෂා කළ යුතුය.

Key Wordsප්‍රධාන පද

DBMSDBMS
Software that creates, manages and controls access to a database.දත්ත සමුදාය සාදන, කළමනාකරණය කරන සහ ප්‍රවේශය පාලනය කරන මෘදුකාංගය.
SQLSQL
Standard language for defining and querying relational databases.සම්බන්ධතා දත්ත සමුදාය නිර්වචනයට සහ විමසීමට සම්මත භාෂාව.
DDLDDL
SQL commands that define database structure.දත්ත සමුදාය ව්‍යුහය නිර්වචනය කරන SQL විධාන.
DMLDML
SQL commands that insert, read, change and delete data.දත්ත ඇතුළත්, කියවීම, වෙනස් සහ මකන SQL විධාන.
DCLDCL
SQL commands that grant or revoke access.ප්‍රවේශය ලබා දෙන හෝ අහෝසි කරන SQL විධාන.
CREATE TABLECREATE TABLE
Command that makes a new table with columns and types.තීරු සහ වර්ග සහිත නව වගුවක් සාදන විධානය.
ALTER TABLEALTER TABLE
Command that changes the structure of an existing table.පවතින වගුවක ව්‍යුහය වෙනස් කරන විධානය.
DROP TABLEDROP TABLE
Command that deletes a whole table and its data.සම්පූර්ණ වගුවක් සහ එහි දත්ත මකන විධානය.
SELECTSELECT
Command that retrieves rows and columns.පේළි සහ තීරු ලබා ගන්නා විධානය.
INNER JOININNER JOIN
Combines rows of two tables where key values match.යතුරු අගයන් ගැළපෙන තැන වගු දෙකක පේළි එක් කරයි.
UPDATEUPDATE
Command that changes values in existing rows.පවතින පේළිවල අගයන් වෙනස් කරන විධානය.
Database administratorදත්ත සමුදාය පරිපාලක
Person who manages security, backup and performance of a database.දත්ත සමුදායේ ආරක්ෂාව, උපස්ථ සහ කාර්ය සාධනය කළමනාකරණය කරන්නා.

Sample Q&Aආදර්ශ ප්‍රශ්න සහ පිළිතුරු

1List four components of a database system.සංරචක හතරක්.

Answerපිළිතුර: Hardware, software (DBMS), data, users (and procedures).දෘඩාංග, මෘදුකාංග, දත්ත, පරිශීලකයින්.

2Distinguish DDL and DML.DDL සහ DML වෙනස.

Answerපිළිතුර: DDL defines structure (CREATE/ALTER/DROP); DML handles data (INSERT/SELECT/UPDATE/DELETE).DDL ව්‍යුහය; DML දත්ත.

3Write SQL to add a Phone column to Student.Phone තීරුව එක් කරන SQL.

Answerපිළිතුර: ALTER TABLE Student ADD Phone VARCHAR(10);ALTER TABLE Student ADD Phone VARCHAR(10);

4What does the C12A query return?C12A විමසුම ලබා දෙන්නේ?

Answerපිළිතුර: Kamala; Nimal; Ruwan.Kamala; Nimal; Ruwan.

5What is the average ICT mark?සාමාන්‍ය ICT ලකුණ?

Answerපිළිතුර: 62.4.62.4.

6Who are the 12B students and their teacher?12B සිසුන් සහ ගුරුවරයා?

Answerපිළිතුර: Amali and Sunil; teacher Silva.Amali සහ Sunil; Silva.

MCQබහුවරණ ප්‍රශ්න

Choose the correct answer for each question.සෑම ප්‍රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.

Scoreලකුණු: 0 / 20

1CREATE, ALTER and DROP belong toCREATE, ALTER, DROP

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

DDL.DDL.

2INSERT, UPDATE and DELETE belong toINSERT, UPDATE, DELETE

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

DML.DML.

3The command that removes a whole table isවගුව ඉවත් කිරීම

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

DROP.DROP.

4Rows changed by the UPDATE (+5 to ICT marks under 50) areUPDATE පේළි

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

S002, S005.S002, S005.

5The average ICT mark of the sample data isසාමාන්‍යය

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

312 ÷ 5.312 ÷ 5.

6The 12B join query returns12B

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

Matching ClassID.ClassID ගැළපීම.

7ICT marks of 60 or more, highest first, are60 හෝ වැඩි

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

ORDER BY DESC.ORDER BY DESC.

8Who controls security and backup of a database?ආරක්ෂාව

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

DBA.DBA.

9Which term means: “Software that creates, manages and controls access to a database”?“දත්ත සමුදාය සාදන, කළමනාකරණය කරන සහ ප්‍රවේශය පාලනය කරන මෘදුකාංගය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

DBMS – Software that creates, manages and controls access to a database.DBMS – දත්ත සමුදාය සාදන, කළමනාකරණය කරන සහ ප්‍රවේශය පාලනය කරන මෘදුකාංගය.

10Which term means: “Standard language for defining and querying relational databases”?“සම්බන්ධතා දත්ත සමුදාය නිර්වචනයට සහ විමසීමට සම්මත භාෂාව” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

SQL – Standard language for defining and querying relational databases.SQL – සම්බන්ධතා දත්ත සමුදාය නිර්වචනයට සහ විමසීමට සම්මත භාෂාව.

11Which term means: “SQL commands that define database structure”?“දත්ත සමුදාය ව්‍යුහය නිර්වචනය කරන SQL විධාන” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

DDL – SQL commands that define database structure.DDL – දත්ත සමුදාය ව්‍යුහය නිර්වචනය කරන SQL විධාන.

12Which term means: “SQL commands that insert, read, change and delete data”?“දත්ත ඇතුළත්, කියවීම, වෙනස් සහ මකන SQL විධාන” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

DML – SQL commands that insert, read, change and delete data.DML – දත්ත ඇතුළත්, කියවීම, වෙනස් සහ මකන SQL විධාන.

13Which term means: “SQL commands that grant or revoke access”?“ප්‍රවේශය ලබා දෙන හෝ අහෝසි කරන SQL විධාන” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

DCL – SQL commands that grant or revoke access.DCL – ප්‍රවේශය ලබා දෙන හෝ අහෝසි කරන SQL විධාන.

14Which term means: “Command that makes a new table with columns and types”?“තීරු සහ වර්ග සහිත නව වගුවක් සාදන විධානය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

CREATE TABLE – Command that makes a new table with columns and types.CREATE TABLE – තීරු සහ වර්ග සහිත නව වගුවක් සාදන විධානය.

15Which term means: “Command that changes the structure of an existing table”?“පවතින වගුවක ව්‍යුහය වෙනස් කරන විධානය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

ALTER TABLE – Command that changes the structure of an existing table.ALTER TABLE – පවතින වගුවක ව්‍යුහය වෙනස් කරන විධානය.

16Which term means: “Command that deletes a whole table and its data”?“සම්පූර්ණ වගුවක් සහ එහි දත්ත මකන විධානය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

DROP TABLE – Command that deletes a whole table and its data.DROP TABLE – සම්පූර්ණ වගුවක් සහ එහි දත්ත මකන විධානය.

17Which term means: “Command that retrieves rows and columns”?“පේළි සහ තීරු ලබා ගන්නා විධානය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

SELECT – Command that retrieves rows and columns.SELECT – පේළි සහ තීරු ලබා ගන්නා විධානය.

18Which term means: “Combines rows of two tables where key values match”?“යතුරු අගයන් ගැළපෙන තැන වගු දෙකක පේළි එක් කරයි” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

INNER JOIN – Combines rows of two tables where key values match.INNER JOIN – යතුරු අගයන් ගැළපෙන තැන වගු දෙකක පේළි එක් කරයි.

19Which term means: “Command that changes values in existing rows”?“පවතින පේළිවල අගයන් වෙනස් කරන විධානය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

UPDATE – Command that changes values in existing rows.UPDATE – පවතින පේළිවල අගයන් වෙනස් කරන විධානය.

20Which term means: “Person who manages security, backup and performance of a database”?“දත්ත සමුදායේ ආරක්ෂාව, උපස්ථ සහ කාර්ය සාධනය කළමනාකරණය කරන්නා” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

Database administrator – Person who manages security, backup and performance of a database.දත්ත සමුදාය පරිපාලක – දත්ත සමුදායේ ආරක්ෂාව, උපස්ථ සහ කාර්ය සාධනය කළමනාකරණය කරන්නා.

MCQ answer keyMCQ පිළිතුරු

  1. B – DDL.DDL.
  2. C – DML.DML.
  3. D – DROP.DROP.
  4. B – S002, S005.S002, S005.
  5. E – 312 ÷ 5.312 ÷ 5.
  6. E – Matching ClassID.ClassID ගැළපීම.
  7. A – ORDER BY DESC.ORDER BY DESC.
  8. C – DBA.DBA.
  9. A – DBMS – Software that creates, manages and controls access to a database.DBMS – දත්ත සමුදාය සාදන, කළමනාකරණය කරන සහ ප්‍රවේශය පාලනය කරන මෘදුකාංගය.
  10. B – SQL – Standard language for defining and querying relational databases.SQL – සම්බන්ධතා දත්ත සමුදාය නිර්වචනයට සහ විමසීමට සම්මත භාෂාව.
  11. A – DDL – SQL commands that define database structure.DDL – දත්ත සමුදාය ව්‍යුහය නිර්වචනය කරන SQL විධාන.
  12. E – DML – SQL commands that insert, read, change and delete data.DML – දත්ත ඇතුළත්, කියවීම, වෙනස් සහ මකන SQL විධාන.
  13. D – DCL – SQL commands that grant or revoke access.DCL – ප්‍රවේශය ලබා දෙන හෝ අහෝසි කරන SQL විධාන.
  14. D – CREATE TABLE – Command that makes a new table with columns and types.CREATE TABLE – තීරු සහ වර්ග සහිත නව වගුවක් සාදන විධානය.
  15. C – ALTER TABLE – Command that changes the structure of an existing table.ALTER TABLE – පවතින වගුවක ව්‍යුහය වෙනස් කරන විධානය.
  16. A – DROP TABLE – Command that deletes a whole table and its data.DROP TABLE – සම්පූර්ණ වගුවක් සහ එහි දත්ත මකන විධානය.
  17. C – SELECT – Command that retrieves rows and columns.SELECT – පේළි සහ තීරු ලබා ගන්නා විධානය.
  18. D – INNER JOIN – Combines rows of two tables where key values match.INNER JOIN – යතුරු අගයන් ගැළපෙන තැන වගු දෙකක පේළි එක් කරයි.
  19. B – UPDATE – Command that changes values in existing rows.UPDATE – පවතින පේළිවල අගයන් වෙනස් කරන විධානය.
  20. E – Database administrator – Person who manages security, backup and performance of a database.දත්ත සමුදාය පරිපාලක – දත්ත සමුදායේ ආරක්ෂාව, උපස්ථ සහ කාර්ය සාධනය කළමනාකරණය කරන්නා.

Structured Questionsව්‍යුහගත ප්‍රශ්න

1Describe the components of a database system.සංරචක විස්තර කරන්න. (5 marksලකුණු 5)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
Hardware; DBMS; data and dictionary; users and DBA; procedures.දෘඩාංග; DBMS; දත්ත; පරිශීලක; ක්‍රියා පටිපාටි.

2Write SQL to create database SchoolDB and table Class with a primary key.SchoolDB සහ Class. (2 marksලකුණු 2)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
CREATE DATABASE SchoolDB; CREATE TABLE Class (ClassID CHAR(4) PRIMARY KEY, ClassName VARCHAR(10) NOT NULL, Teacher VARCHAR(30)).CREATE DATABASE; CREATE TABLE; PRIMARY KEY.

3Write SQL to add then remove a foreign key on Student.ClassID.FK එක් කර ඉවත් කිරීම. (2 marksලකුණු 2)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
ALTER TABLE ADD CONSTRAINT fk_class FOREIGN KEY REFERENCES Class; ALTER TABLE DROP FOREIGN KEY fk_class.ADD CONSTRAINT; DROP FOREIGN KEY.

4Write SQL to add 5 marks to ICT marks below 50 and state rows changed.ලකුණු 5 එක් කිරීම. (2 marksලකුණු 2)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
UPDATE Marks SET Mark = Mark + 5 WHERE SubjectCode = ICT AND Mark < 50; 2 rows.UPDATE; පේළි 2.

5Write an inner join listing each 12B student with the teacher, and give the output.12B inner join. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
SELECT Name, Teacher; FROM Student INNER JOIN Class ON ClassID; WHERE ClassName = 12B; Amali Silva, Sunil Silva.SELECT; INNER JOIN ON; WHERE; ප්‍රතිඵලය.

🎮 Game🎮 ක්‍රීඩා

Pick a game. Each one uses words from this lesson.ක්‍රීඩාවක් තෝරන්න. හැම එකක්ම මේ පාඩමේ වචන පාවිච්චි කරනවා.

Summary & Downloadsසාරාංශය සහ බාගත කිරීම්

Key pointsප්‍රධාන කරුණු

  • A DBMS sits between users and stored data.DBMS පරිශීලකයින් සහ දත්ත අතර ඇත.
  • DDL = CREATE, ALTER, DROP.DDL = CREATE, ALTER, DROP.
  • DML = INSERT, SELECT, UPDATE, DELETE.DML = INSERT, SELECT, UPDATE, DELETE.
  • WHERE filters rows; ORDER BY sorts; GROUP BY groups.WHERE පෙරයි; ORDER BY පිළිවෙළ කරයි; GROUP BY කාණ්ඩ කරයි.
  • INNER JOIN combines tables on matching keys.INNER JOIN ගැළපෙන යතුරු මත වගු එක් කරයි.

Downloadsබාගත කිරීම්

Full Lesson 8 PDFසම්පූර්ණ පාඩම 8 PDF: English · සිංහල

Next noteඊළඟ සටහන 8.4 →

© 2026 schoolict.net (Ruwan Mangala Suraweera). All rights reserved.සියලු හිමිකම් ඇවිරිණි.