CS403 SQL QURIES BY JUNAID.pdf

Verified academic study resource for CS403 (Database Management Systems) under the Computer Science at Virtual University of Pakistan. This PDF document (Verified Study Resource) covers Full Course Curriculum spanning approximately 280 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS403 – Database Management Systems
Faculty
Computer Science
Format
PDF
Type
Study Resource
Coverage
Full Course Curriculum

Review this document alongside the official handouts and test your retention in the Interactive MCQs Studio.

What this file covers — CS403 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS403 SQL QURIES BY JUNAID.pdf for free?

You can preview and download "CS403 SQL QURIES BY JUNAID.pdf" (CS403 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs403-sql-quries-by-junaid-pdf-2) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS403 file?

This document covers Full Course Curriculum across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS403 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS403 solved past papers and handouts verified for 2026 exams?

Yes. All CS403 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

SQL QURIES

            Junaid Malik
0304-1659294 junaidfaza08@gmail.com

1

                            BSCS 4th SEMESTER
                           AL-JUNAID INSTITUTE

    DDL (DATA DIFINITION LANGUAGE)
                                                                   ‫ میں ہم‬DDL
       Create Table
       ALTER Table
       Drop Table
       Truncate table
       Rename
                                                      ‫کرسکتے ہیں‬

                           ‫ لکھتے ہیں۔‬Code ‫ بنانے کیلیئے ہم یہ‬TABLE‫۔‬1
    create table employee
     (
     emp_id int;
     first_name varchar (50),
     last_name varchar (50),
     salary int,
     );

                          ‫دیکھنا چاہتے ہیں‬Logical Structure ‫ کا‬TABLE‫۔اگر ہم‬2
    describe employee‫؛‬
                                   ‫کرنا چاہتے ہیں‬add ‫کو‬TABLE ‫۔اگر ہم کسی‬3
    Altar Command
    alter table employee add contact int;
     Select*from employee;

    TRUNCATE Command

2

                               BSCS 4th SEMESTER
                              AL-JUNAID INSTITUTE

                                 ‫کرنا ہو تو ٹیبل میں سے۔‬Delete ‫کو‬Records ‫۔‬4
    truncate table employee;
     select*from employee;
    DROP Command:
                                                 ‫کرنا ہو‬DELETE ‫کو‬TABLE ‫۔اگر ہم‬5
    alter table employee           drop    column contact;
     select*from employee;

           DML (DATA MANIPULATION LANGUAGE)
     ‫ لکھی ہوئی ہوتی ہے اسے‬DATA STRUCTURE ‫سے ہم نے جو‬DML
       Insert‫کر سکتے ہیں‬
       Update‫کر سکتے ہیں‬
       Delete‫کر سکتے ہیں‬
            ‫کرتے ہیں‬add ‫کو جب‬Values ‫لکھتے ہیں۔‬Code ‫کرنے کیلیئے ہم یہ‬Insert ‫۔ ۔‬6
    insert into employee (emp_id,first_name,last_name,salary) values
    ('9','shoaib','malik','500');
     insert into employee (emp_id, first_name,last_name,salary) values
    ('7','junaid','prince','700');
     insert into employee (emp_id,first_name,last_name,salary) values
    ('8','fraz','javed','900');
     Select*from employee;
    Note:
    Varchar (50) and INT is data type

    UPDATE Command:
       ‫ لکھ سکتے‬Values ‫ میں ہم کسی بھی جگہ پر کوئی بھی‬UPDATE Commands ‫۔‬7
                                                                    ‫ہیں۔‬
    For Example:

3

                               BSCS 4th SEMESTER
                              AL-JUNAID INSTITUTE

    STORE ‫کو‬Values ‫( ان میں کوئی دوسری‬emp_id,first_name,last_name,salary)
                                                                 ‫کروانا ہو۔‬
    update employee set last_name = 'mohsin' where emp_id = 7;
     select*from employee;

    DELETE Command:
                                  ‫ کر سکتے ہیں‬Record Delete ‫ میں کوئی بھی‬Command ‫۔ اس‬8

    delete from employee where emp_id in (7);
     select*from employee;
                                              ‫ کرنا ہو تو‬Delete ‫کو‬Records ‫جب دو‬
    delete from employee where emp_id in (7,9);
    select*from employee;

                                             ‫کرنے کیلئے‬MAX Salary Find ‫۔‬9
    select max (salary) from employee;
                                           ‫کرنے کیلئے‬AVG Salary Find ‫۔‬10
    select avg(salary) from employee;
                                            ‫کرنے کیلئے‬MIN Salary Find ‫۔‬11
    Select min(salary) from employee;
                                           ‫کرنے کیلئے‬SUM Salary Find ‫۔‬12
    select sum(salary) from employee;
                                   . ‫کرنے کیلئے‬Count RECORDS Find ‫۔‬13
    select count (*) from employee;

4

                              BSCS 4th SEMESTER
                             AL-JUNAID INSTITUTE

            ‫ کس‬SALARY ‫ کریں گے کہ‬FIND ‫ میں ہم یہ‬Command ‫۔اس‬14
                                      ‫کی زیادہ ہے۔‬EMPLOYEE
    select emp_id from employee where salary =
    (select Max(salary) from employee);
                      ‫کرتے ہیں۔‬Find ‫کو‬Max Salary 2nd ‫ میں ہم‬Command ‫۔اس‬15
    (select max(salary) from employee where salary <>
    (select max(salary) from employee));
                  TCL (TRANSECTION CONTROL)
         Commit
         Rollback
         Save point
                          ‫ پر اٹھا نا ہو تو‬Base ‫کی‬Records Condition ‫۔ ہمیں کوئی‬16
    select*from employee where emp_id=7;
     select*from employee where salary=900;
     select*from employee where first_name='junaid';
     select *from employee where last_name='shahid';

      o And Operator
     TRUE ‫ کو‬CONDITION ‫ کرتے ہیں ہماری دونو ں‬USE ‫اس لیئے‬AND Operation ‫۔ہم‬17
                                                                  ‫ہونا چاہئے۔‬
    select*from employee where first_name='junaid' and last_name='prince';
     select*from employee where first_name='fraz' and salary=900;
      o OR Operator

5

                             BSCS 4th SEMESTER
                            AL-JUNAID INSTITUTE

       ‫ کو درست‬CONDITION ‫ کرتے ہیں ہماری دونو ں‬USE ‫اس لیئے‬OR Operation ‫۔ہم‬18
                                                   ‫ کر لے ۔‬EXECUTE ‫مان کر‬

    select*from employee where emp_id= 9 Or salary=900;
      o NOT operator
    select*from employee where first_name='fraz' and salary !=900;
                           SPECIAL Operator
    19. Find Range:

    select*from employee where salary between 700 and 900;

    20. Find String data type:

More CS403 files

  • 1.png (IMAGE · Study Resource)
  • 10.png (IMAGE · Study Resource)
  • 11.png (IMAGE · Study Resource)
  • 12..png (IMAGE · Study Resource)
  • 12.png (IMAGE · Study Resource)
  • 13.png (IMAGE · Study Resource)
  • 14.png (IMAGE · Study Resource)
  • 15.png (IMAGE · Study Resource)

All CS403 files · Midterm Prep 2026 · MCQs Bank