Operating Web Class 12 Questions and Answers

operating web class 12 questions and answers

Teachers and Examiners (CBSESkillEduction) collaborated to create the Operating Web Class 12 Questions and Answers. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Operating Web Class 12 Questions and Answers

1. What is Web-application?
Answer – Web-based applications are those that can be accessed through a web browser and a network connection. A web-based application offers the benefit of global availability around-the-clock. Web-based applications are now utilised for a variety of tasks, including online shopping with the option of paying with credit or debit cards, e-governance, and learning through online tutorials, quizzes, and other activities.

Operating Web Class 12 Questions and Answers

2. What are the advantages of online reservation system?
Answer – Online reservation systems have benefits for both the business offering the reservation services and the customer using the system to make a reservation. We go over the benefits of using an online reservation system –

Advantages for consumers

a. Convenient – The user/consumer can book tickets anytime anywhere – from home, office, while travelling, etc. All the user needs is just a computer, Internet access, and a card (credit, debit, etc.) for payment.

b. Price Comparison – Online booking allows the customer to check the prices, compare them and get the best deal.

c. Security – Most online reservation sites require the user to create their profile and provide them with a username and password. The information thus remains secure until their password is secure.

d. Confirmation of Reservation – When a booking is done, the confirmation of the booking just takes a few seconds. It is fast and secure.

e. Time Saving – Online reservation consumes very less time in contrast to long queues at the counter.

Advantages of providers

a. Requires Less Staffing – Less man-power is required as every task is done through computers.

b. No Spatial Restrictions – The physical location of the office does not really matter to a customer who is reserving tickets online. So, the organization, big or small, can choose their office space depending on their needs.

c. Global Access – Online reservation is available to anyone irrespective of their physical location.

Operating Web Class 12 Questions and Answers

3. What are the precautions we have to take while performing online transactions?
Answer – The precautions we have to take while performing online transactions are –
a. Make a password complex, like mix case, use numbers and special characters.
b. Be cautious not to leave passwords around and do not share them with friends.
c. Never use names of near and dear ones as passwords.

4. What is e-Governance?
Answer – The use of information and communication technology (ICT) by the government to deliver and facilitate government services, information exchange, communication transactions, and integration of diverse stand-alone systems and services is known as electronic governance, or e-governance.

Operating Web Class 12 Questions and Answers

5. What are the initiatives taken by e-Governance.
Answer – The initiatives taken by e-Governance are –

  • National e-Governance Plan (NeGP)
  • National e-Governance Division (NeGD)
  • e-Governance Infrastructure
  • Mission Mode Projects
  • Citizens Services
  • Business Services
  • Government Services
  • Projects and Initiatives
  • R&D in e-Governance

6. What is the purpose of National Portal of India?
Answer – The Portal’s goal is to give people and other stakeholders access through a single window to the data and services offered by the Indian government. The different ministries and departments of the Indian government, at the national, state, and district levels, work together through the National Portal of India. The National Informatics Centre (NIC), DeitY, MoCIT, Government of India built and maintains this portal as a Mission Mode Project under the National E-Governance Plan.

Operating Web Class 12 Questions and Answers

7. What is the purpose of India Web Directory website?
Answer – This portal serves as a single point of access to all websites run by the Indian Government, regardless of level or sector. It comprises websites for several Indian states and union territories, as well as those for judicial and legislative branches of government. Additionally, it offers details about numerous industries including agriculture and education.

8. What are the benefits of Online Shopping?
Answer – Benefits of Online shopping are –
a. You want to send a product to your friend; you can do online shopping and provide the receiver’s address.
b. The store where you will get what you need may be very far off.
c. The money spent in travelling to the store, parking the car, etc., is much more than overhead if any in online shopping.
d. The product you may require is not available at your market

Operating Web Class 12 Questions and Answers

9. Give some example of online education sites?
Answer – Some of the example of online education sites are –
a. udacity.org – e which offers online courses for development of technical skills. It claims to provide projects built by technical leaders like Google and AT & T. T.
b. coursera.org & edx.org – provide high quality online courses for free, in collaboration with various universities across the globe. They aim to provide free
online education through its partners world wide. The courses include topics from hunanities, science, and engineering including courses at school level.
c. ncert.nic.in – NCERT portal that provides online learning resources in the form of e-books, journals, question papers, children books, etc.

10. What are the characteristics of project?
Answer – Characteristics of project are –
a. A project has a beginning and an end. The extent of the project is defined. It has boundaries.
b. Aproject requires finite resources that are required to complete the project.
c. Aproject has a specific time frame. It has a definite beginning and end dates.
d. A project is complete when its end objectives are achieved. The objective is specific and identifiable.

Operating Web Class 12 Questions and Answers

11. What are the different phases in a Web application project?
Answer – The different phases of web application project are –
1) Requirements Definition Phase
2) Design Phase
3) Implementation Phase
4) Testing Phase

12. What is requirement definition phase?
Answer – We identify the issue statement for which the web application is to be developed during the requirement definition phase. Determine the size of the issue.

Operating Web Class 12 Questions and Answers

13. What is design phase?
Answer – The design phase is when the “how” of the application is to design, what are the different certiries of designing the software.

14. Explore the following sites for online shopping:
1. Amazon.com
2. Ebay.in
Answer –
Amazon.com – An online store and web service company, Amazon.com Inc. The company offers goods in a variety of categories, including clothing, auto and industrial equipment, beauty and health care, electronics, groceries, books, games, jeweler, kids’ and infant products, movies, music, sporting goods, toys, and tools, among others.

Ebay.in – While being one of the most popular and well-established e-commerce sites online, eBay doesn’t actually sell anything. Users can instead offer goods for sale, and other users can then place bids on those goods in auctions. eBay recently added the ability to purchase products at face value or to make price offers for them.

Operating Web Class 12 Questions and Answers

15. Analyze the following scenarios and describe all the steps of the project development cycle:
(i) Online tutoring
(ii) Online matrimonial bureau
(iii) Online ticket booking
Answer –

(i) Online tutoring – An online instructor follows the same steps as a face-to-face tutor: they organize the session, deliver it, and then, ideally, give parents a report on it.

(ii) Online matrimonial bureau – Online matrimony services refer to the establishment of an online community that enables its members to communicate and exchange marriage-related information in specialized, individualized ways.

(iii) Online ticket booking – Smart technology is used in an online booking system to eliminate the dangers of manual entry and human mistake. By automatically updating procedures like payment, scheduling, monitoring availability, and notification reminders, it makes booking easier for both you and your consumers.

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Fundamentals of Java Programming Class 12 Questions and Answers

fundamentals of java programming class 12 questions and answers

Teachers and Examiners (CBSESkillEduction) collaborated to create the Fundamentals of Java Programming Class 12 Questions and Answers. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Fundamentals of Java Programming Class 12 Questions and Answers

1. What is Variable?
Answer – A variable is a storage location for information whose value may vary while a programme is running. A variable is, technically speaking, the name of a storage area in the computer’s internal memory. The data present there serves as the variable’s value.

2. What are the different Variable naming rules in Java?
Answer – The variable naming rules in Java are –
a. Variable names can begin with either an alphabetic character, an underscore, or a dollar sign.
b. Space is not allowed in variable names.
c. Reserved words are not used in variables.
d. Java is a case-sensitive language.

Fundamentals of Java Programming Class 12 Questions and Answers

3. What are the different Primitive Data Types in Java?
Answer – There are eight different types of primitive data types in Java.
a. Byte
b. Short
c. Int
d. Long
e. Float
f. Double
g. Char
h. Boolean

4. What is String Variable?
Answer – String variables, also known as alphanumeric or character variables, have values that are interpreted as text. In other words, string variables’ values could be made up of letters, numbers, or symbols.

5. What is Operator and what are the different types of Operator?
Answer – Operators are special symbols in a programming language and perform certain specific operations. Java support –
a. Arithmetic Operators : +, -, *, /, %, ++, —
b. Relational Operators : ==, !=, >, <, >=, <=
c. Assignment Operators : =, +=, -=, *=, /=, %=
d. Logical Operators : &&, ||, !

Fundamentals of Java Programming Class 12 Questions and Answers

6. Difference between Entry control loop and Exit control loop.
Answer – Difference between entry control and Exit control loop are –
Entry Control Loop –
a. Entry Control Loop tests the condition first and then executes the body of the loop.
b. If the condition is false, Entry control loop will not execute
c. Example of entry control loop are – for loop and while loop

Exit Control Loop –
a. Exit Control loop tests the condition after running a block of code.
b. If the condition is false, the Entry control loop will execute at least one time.
c. Example of entry control loop are – do-while

7. What is an Array?
Answer – Arrays are variables that can hold more than one value, they can hold a list of values of the same type. Example – marks = new double[5];

Fundamentals of Java Programming Class 12 Questions and Answers

8. What is the purpose of user defined methods?
Answer – User-defined functions are techniques you can use to arrange your code within a body. Once a function has been defined, it can be used in the same way that the built-in action and parser functions are used. Instead of being passed by value, variables are passed by reference to functions.

9. What are OOPs?
Answer – OOPs stands for Object Oriented Programming, Java is an Object Oriented Programming (OOP) language. In an OOP language, a program is a collection of objects that interact with other objects to solve a problem. Each object is an instance of a class.

10. What is the difference between local and global variables?
Answer – Depending on their scope, variables are divided into global variables and local variables. Local variables can only be accessed within the function or block in which they are defined, In other hand the global variables, which can be used worldwide throughout the entire programme.

Fundamentals of Java Programming Class 12 Questions and Answers

11. What is the purpose of Constructor in Java?
Answer – A special method member called the constructor method is used to initialize the data members of the class (or any other initialization is to be done at time of object creation). The constructor has the same name as the class, has no return type, and may or may not have a parameter list. Whenever a new object of a class is created, the constructor of the class is invoked automatically. We do not call the constructor explicitly.

12. What are the different types of Access Modifiers?
Answer – Access modifiers are keywords that manage a class’s fields, methods, and function. Examples of access modifiers are Public, protected, and private.

Fundamentals of Java Programming Class 12 Questions and Answers

13. What is the purpose of Getter and Setter Methods?
Answer – Private data members of a class cannot be accessed outside the class however, you can give controlled access to data members outside the class through getter and setter methods.

Basic Java program –

14. Write a program to accept integer number from user and print the number.

import java.util.Scanner;
public class HelloWorld {

    public static void main(String[] args) {

        Scanner reader = new Scanner(System.in);
        System.out.print("Enter a number: ");

        int number = reader.nextInt();

        System.out.println("You entered: " + number);
    }
}

Output - 
Enter a number: 20
You entered: 20

15. Write a program to accept two numbers from the user and find the sum of numbers.

class Example {

  public static void main(String[] args) {
    
  int n1=22, n2=44, sum;
    
    sum = n1 + n2;
    System.out.println("The sum is: " + sum);
  }
}

Output - 
Enter two numbers
22 44
The sum is: 66

Fundamentals of Java Programming Class 12 Questions and Answers

16. Write a program to swap the numbers without using 3rd variable.

public class Swap {

    public static void main(String[] args) {

        int n1=51, n2=48;
        System.out.println("First number = " + n1);
        System.out.println("Second number = " + n2);
        n1=n1+n2;
        n2=n1-n2;
        n1=n1-n2;

        System.out.println("Result");
        System.out.println("First number = " + n1);
        System.out.println("Second number = " + n2);
    }
}

Output - 
First number = 51
Second number = 48
Result
First number = 48
Second number = 51

Fundamentals of Java Programming Class 12 Questions and Answers

If Statement related program – 

17. Write a program to accept number from the user and check whether number is even or odd.

import java.util.Scanner;
public class Example {
    public static void main(String[] args) {

        Scanner reader = new Scanner(System.in);
        System.out.print("Enter a number: ");
        int num = reader.nextInt();
        if(num % 2 == 0)
            System.out.println(num + " is even");
        else
            System.out.println(num + " is odd");
    }
}

Output - 
Enter a number: 22
22 is even

Fundamentals of Java Programming Class 12 Questions and Answers

18. Write a program to accept number from the user and check whether an alphabet is vowel or consonant.

import java.util.Scanner;
public class Example {
    public static void main(String[] args) {

        Scanner reader = new Scanner(System.in);
        System.out.print("Enter a character: ");
        char ch = reader.next().charAt(0);

        if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )
            System.out.println(ch + " is vowel");
        else
            System.out.println(ch + " is consonant");

    }
}

Output - 
Enter a character: a
a is vowel

19. Write a program to accept three numbers from the user and find the largest number.

public class Example {
    public static void main(String[] args) {

	Scanner reader = new Scanner(System.in);
        System.out.print("Enter a 1st number: ");
        char n1 = reader.nextInt();

        System.out.print("Enter a 2nd number: ");
        char n2 = reader.nextInt();

        System.out.print("Enter a 3rd number: ");
        char n3 = reader.nextInt();

        if( n1 >= n2 && n1 >= n3)
            System.out.println(n1 + " is the largest number.");

        else if (n2 >= n1)
            System.out.println(n2 + " is the largest number.");

        else
            System.out.println(n3 + " is the largest number");
    }
}

Output - 
Enter a 1st number: 7
Enter a 2nd number: 3
Enter a 3rd number: 9
9 is the largest number

Fundamentals of Java Programming Class 12 Questions and Answers

20. Write a program to check leap year.

public class Example {

  public static void main(String[] args) {

    int year = 2022;
    boolean leap = false;

    if (year % 4 == 0) {

      if (year % 100 == 0) {
        if (year % 400 == 0)
          leap = true;
        else
          leap = false;
      }
      
      else
        leap = true;
    }
    
    else
      leap = false;

    if (leap)
      System.out.println(year + " is a leap year.");
    else
      System.out.println(year + " is not a leap year");
  }
}

Output - 
2022 is not a leap year

Fundamentals of Java Programming Class 12 Questions and Answers

21. Write a program the check weather a number is positive or negative.

public class Example {

    public static void main(String[] args) {

        double n1 = 18;

        if (number < 0.0)
            System.out.println(number + " is a negative number");

        else if ( number > 0.0)
            System.out.println(number + " is a positive number");

        else
            System.out.println(number + " is 0");
    }
}

Output - 
18 is a positive number

22. Write a program to check whether a character is alphabet or not.

public class Example {

    public static void main(String[] args) {

        char c = 'a';

        if( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
            System.out.println(c + " is an alphabet");
        else
            System.out.println(c + " is not an alphabet");
    }
}

Output - 
a is an alphabet

Fundamentals of Java Programming Class 12 Questions and Answers

Looping statement related program – 

23. Write a program to Find Factorial of a Number
n = 1 * 2 * 3 * 4 * … * n

public class Example {

    public static void main(String[] args) {

        int num = 10;
        long f = 1;
        for(int i = 1; i <= num; ++i)
        {
            f = f * i;
        }
        System.out.printf("Factorial of a number ", f);
    }
}

Output - 
Factorial of a number = 3628800

24. Write a program to print the Fibonacci series 0, 1, 1, 2, 3, 5, 8,

class Example {
  public static void main(String[] args) {

    int n = 10, first = 0, second = 1, sum = 0;

    for (int i = 1; i <= n; i++) {
      System.out.print(first + ", ");

      sum = first + second;
      first = second;
      second = sum;
    }
  }
}

Fundamentals of Java Programming Class 12 Questions and Answers

25. Write a program to check whether the string is palindrome or not.

class Example {
  public static void main(String[] args) {

    String str = "MADAM", r_str = "";
    int strLength; 
    
    int strLength = str.length();

    for (int i = (strLength - 1); i >=0; i--) {
      r_str = r_str + str.charAt(i);
    }

    if (str.toLowerCase().equals(r_str.toLowerCase())) {
      System.out.println(str + " is a Palindrome");
    }
    else {
      System.out.println(str + " is not a Palindrome");
    }
  }
}

Output - 
MADAM is a Palindrome

Fundamentals of Java Programming Class 12 Questions and Answers

26. Write a program to check whether a number is prime or not.

public class Example {

  public static void main(String[] args) {

    int num = 7;
    boolean f = false;
    for (int i = 2; i <= num / 2; i++) {
      if (num % i == 0) {
        f = true;
        break;
      }
    }

    if (!f)
      System.out.println(num + " is a prime number");
    else
      System.out.println(num + " is not a prime number");
  }
}

Output - 
7 is a prime number

Switch Statement related program – 

27. Write a program to design simple calculator using switch statement.

import java.util.Scanner;
class Example {
  public static void main(String[] args) {

    char ch;
    Double number1, number2, result;

    Scanner input = new Scanner(System.in);

    System.out.println("Choose an operator: +, -, *, or /");
    System.out.println("1. +");
    System.out.println("2. -");
    System.out.println("3. *");
    System.out.println("4. /");

    System.out.println("Select choice");

    ch = input.next().charAt(0);

    System.out.println("Enter first number");
    number1 = input.nextDouble();
    System.out.println("Enter second number");
    number2 = input.nextDouble();

    switch (ch) {

      case '+':
        result = number1 + number2;
        System.out.println(number1 + " + " + number2 + " = " + result);
        break;

      case '-':
        result = number1 - number2;
        System.out.println(number1 + " - " + number2 + " = " + result);
        break;

      case '*':
        result = number1 * number2;
        System.out.println(number1 + " * " + number2 + " = " + result);
        break;

      case '/':
        result = number1 / number2;
        System.out.println(number1 + " / " + number2 + " = " + result);
        break;

      default:
        System.out.println("Invalid choice!");
        break;
    }

    input.close();
  }
}

Output - 
1. +
2. -
3. *
4. /
Select Choice +
Enter first number 4
Enter second number 6
4 * 6 = 10

Fundamentals of Java Programming Class 12 Questions and Answers

Array

28. Write a program to Print an Array.

public class Example {

    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5};

        for (int element: array) {
            System.out.println(element);
        }
    }
}

Output - 
1
2
3
4
5

29. Write a program to find the average of given array 7, 34, 55, 82, 44.

public class Example {

    public static void main(String[] args) {
        int[] numArray = { 7, 34, 55, 82, 44 };
        double sum = 0;

        for (double num: numArray) {
           sum += num;
        }

        double average = sum / numArray.length;
        System.out.format("The average is " + average);
    }
}

Output - 
The average is: 44.4

String function related program –

30. Write a program to find the concatenate of two different string

public class Example {
    public static void main(String[] args) {
    String str1="Anurag";
    String str2="Anand"; 
    
    String str3=str1.concat(str2);
    
    System.out.println(str3);
    
    }
}

Output - 
Anurag Anand

31. Write a program to find the length of the string

public class Example {
    public static void main(String[] args) {
    String str="Anurag";
    
    int len=str.length();
    
    System.out.println(len);
    
    }
}

Output - 
6

32. Write a program to convert the string in uppercase format.

public class Example {
    public static void main(String[] args) {
    String str="anurag";
    
    String upper=str.toUpperCase();
    
    System.out.println(upper);
    
    }
}

Output - 
ANURAG

33. Write a program to convert the lowercase string to uppercase string.

public class Example {
    public static void main(String[] args) {
    String str="ANURAG";
    
    String lower=str.toLowerCase();
    
    System.out.println(lower);
    
    }
}

Output - 
anurag

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Fundamentals of Java Class 12 MCQ

Teachers and Examiners (CBSESkillEduction) collaborated to create the Fundamentals of Java Class 12 MCQ. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Fundamentals of Java Class 12 MCQ

1. JVM Stands for ___________.
a. Java Virtual Machine 
b. Java Verify Machine
c. Java Vector Machine
d. None of the above

Show Answer ⟶
a. Java Virtual Machine

2. Java programs are _____________.
a. Platform Independent
b. Highly Portable
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

3. Java support __________.
a. Compiler
b. Interpreter 
d. Assembler
e. None of the above

Show Answer ⟶
b. Interpreter

4. Java converts the program in __________.
a. Byte
b. Megabyte
c. Bytecode 
d. None of the above

Show Answer ⟶
c. Bytecode

Fundamentals of Java Class 12 MCQ

5. IDE Stands for __________.
a. Integrated Developer Environments
b. Integrated Development Environments 
c. Internal Developer Environments
d. Internal Development Environments

Show Answer ⟶
b. Integrated Development Environments

6. Java NetBeans IDE is ________ software.
a. Close source
b. Middle source
c. Open Source 
d. None of the above

Show Answer ⟶
c. Open Source

7. How we can write comments in Java programs.
a. Two forward slashes (//)
b. /* and */
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

8. In Java a group of related classes is known as _______.
a. Group
b. Package 
c. Method
d. None of the above

Show Answer ⟶
b. Package

9. In Java most common pre-built Java output methods are ___________.
a. System.out.println(); 
b. Public class
c. Public static void main(String[] args)
d. None of the above

Show Answer ⟶
a. System.out.println();

Fundamentals of Java Class 12 MCQ

10. A Variable is a placeholder for data that can change its value during program execution.
a. Constant
b. Variable 
c. Data type
d. None of the above

Show Answer ⟶
b. Variable

11. In Java, How many types of primitive Data Type.
a. 6
b. 7
c. 8 
d. 9

Show Answer ⟶
c. 8

12. In Java, Which type of datatype is used to store Integer values.
a. Byte
b. Int
c. Long
d. All of the above 

Show Answer ⟶
d. All of the above

13. Int Data Type can store ________ bit of data.
a. 8-bit
b. 16-bit
c. 32-bit 
d. 64-bit

Show Answer ⟶
c. 32-bit

14. Float Data Type can store ________ bit of data.
a. 8-bit
b. 16-bit
c. 32-bit 
d. 64-bit

Show Answer ⟶
c. 32-bit

Fundamentals of Java Class 12 MCQ

15. Double Data Type can store ________ bit of data.
a. 16-bit
b. 32-bit
c. 64-bit 
d. 8-bit

Show Answer ⟶
c. 64-bit

16. Char Datatype can store _________ bit of data.
a. 16-bit 
b. 32-bit
c. 64-bit
d. 8-bit

Show Answer ⟶
a. 16-bit

17. Boolean Data Type can store _________ bit of data.
a. 16-bit
b. 32-bit
c. 1-bit 
d. 8-bit

Show Answer ⟶
c. 1-bit

18. What are the naming rules we have to follow to declare a variable.
a. Variable names can begin with either an alphabetic character, Underscore or a dollar sign.
b. Space are not allowed in variable names
c. Reserved words cannot be used as a variable name
d. All of the above 

Show Answer ⟶
d. All of the above

19. To store more than one character, we use the _______ data type.
a. Integer
b. Character
c. String 
d. None of the above

Show Answer ⟶
c. String

Fundamentals of Java Class 12 MCQ

20. ___________ are special symbols in a programming language and perform certain specific operations.
a. Operators 
b. Variable
c. Datatype
d. None of the above

Show Answer ⟶
a. Operators

21. ++ is known as which operator.
a. Increment Operator 
b. Decrements Operator
c. Assignment Operator
d. Modulus

Show Answer ⟶
a. Increment Operator

22. Which of the following belongs to logical operators.
a. &&
b. ||
c. !
d. All of the above 

Show Answer ⟶
d. All of the above

23. Which of the following is an example of selection structures.
a. If else statement
b. Switch statement
c. Else if statement
d. All of the above 

Show Answer ⟶
d. All of the above

24. The __________ in Java lets us execute a block of code depending upon whether an expression evaluates to true or false.
a. If statements 
b. For statements
c. Array Statements
d. None of the above

Show Answer ⟶
a. If statements

Fundamentals of Java Class 12 MCQ

25. To combine two relational expressions in a program.
a. Logical OR
b. Logical AND 
c. Logical NOT
d. None of the above

Show Answer ⟶
b. Logical AND

26. If inside the if is known as _________.
a. Outer If
b. Inner If
c. Nested If 
d. All of the above

Show Answer ⟶
c. Nested If

27. The ____________ is used to execute a block of code matching one value out of many possible values.
a. If statement
b. Switch Statement 
c. For Statement
d. None of the above

Show Answer ⟶
b. Switch Statement

28. The ability of a computer to perform the same set of actions again and again is called looping.
a. Looping 
b. Actioning
c. Performing
d. None of the above

Show Answer ⟶
a. Looping

29. What are the different looping statements available in Java?
a. For loop
b. While loop
c. Do-while loop
d. All of the above 

Show Answer ⟶
d. All of the above

Fundamentals of Java Class 12 MCQ

30. The ________ statement evaluates the test before executing the body of a loop.
a. Goto
b. While loop 
c. Do-while loop
d. All of the above

Show Answer ⟶
b. While loop

31. The __________ statement evaluates the test after executing the body of a loop.
a. Goto
b. While loop
c. Do-while loop 
d. All of the above

Show Answer ⟶
c. Do-while loop

32. _________ is known as the entry control loop.
a. While loop 
b. Do-while loop
c. Goto loop
d. All of the above

Show Answer ⟶
a. While loop

33. __________ is known as the exit control loop.
a. While loop
b. Do-while loop
c. Goto loop
d. All of the above

Show Answer ⟶
b. Do-while loop

34. Which condition required for executing the loop –
a. Initial value
b. Condition
c. Counter
d. All of the above

Show Answer ⟶
d. All of the above

Fundamentals of Java Class 12 MCQ

35. __________ are variables that can hold more than one value, they can hold a list of values of the same type.
a. Loop
b. Constant
c. Variable
d. None of the above

Show Answer ⟶
c. Variable

36. __________ helps to create a tab between the numbers in the print statement.
a. \tt
b. \t
c. \tb
d. \tab

Show Answer ⟶
b. \t

37. Array addresses always start from _________.
a. 0 
b. 1
c. 2
d. 3

Show Answer ⟶
a. 0

38. OOP Stands for ____________.
a. Object Oriented Programming 
b. Outer Oriented Programming
c. Outer Object Programming
d. Oriented Object Programming

Show Answer ⟶
a. Object Oriented Programming

39. Java’s most fundamental features are _________.
a. Class
b. Objects
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

Fundamentals of Java Class 12 MCQ

40. Function declared inside the class is known as __________.
a. Member function 
b. Inner function
c. Outer function
d. None of the above

Show Answer ⟶
a. Member function

41. The body of class is enclosed within ____________.
a. Small braces
b. Curly braces 
c. Big braces
d. None of the above

Show Answer ⟶
b. Curly braces

42. The variable declared outside the class is known as ___________.
a. Local variable
b. Global variable 
c. Inner variable
d. All of the above

Show Answer ⟶
b. Global variable

43. The variable declared inside the class is known as __________.
a. Local variable 
b. Global variable
c. Inner variable
d. All of the above

Show Answer ⟶
a. Local variable

44. __________ is a data member that is declared but not initialized before using, and is assigned a default value by the compiler, usually either zero or null.
a. Class
b. Object
c. Constructors 
d. None of the above

Show Answer ⟶
c. Constructors

Fundamentals of Java Class 12 MCQ

45. __________ has the same name as the class.
a. Class
b. Object
c. Constructors 
d. None of the above

Show Answer ⟶
c. Constructors

46. Data members and method members of an object are accessed using the _________ operator.
a. Comma (,)
b. Dot (.) 
c. Modular (%)
d. Dollar ($)

Show Answer ⟶
b. Dot (.)

47. Data members of a class can be accessed from outside the class by default. Identify the access modifiers from the below list __________.
a. Private
b. Public
c. Protected
d. All of the above 

Show Answer ⟶
d. All of the above

48. Private data members of a class cannot be accessed outside the class however, you can give controlled access to data members outside the class through ____________.
a. Getter
b. Setter
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

49. To import the class from the package, you have to use ____________ keyword.
a. Insert
b. Import 
c. Add
d. None of the above

Show Answer ⟶
b. Import

Fundamentals of Java Class 12 MCQ

50. We can take input from the user using ___________ object.
a. Scanner 
b. System.out.println();
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Scanner

51. _________ function helps to convert string value to the integer value in Java.
a. parseInt(); 
b. parseDouble()
c. parseString();
d. None of the above

Show Answer ⟶
a. parseInt();

52. To sort the array of integers in ascending order _______ function required.
a. Arrange()
b. Filter()
c. Sort() 
d. None of the above

Show Answer ⟶
c. Sort()

53. __________ function helps to convert all of the characters in lower case.
a. toLowerCase() 
b. toSmallCase()
c. to BelowCase()
d. None of the above

Show Answer ⟶
a. toLowerCase()

54. __________ function helps to convert all the characters in Upper case.
a. toUpperCase() 
b. toCaptialCase()
c. touppercase()
d. None of the above

Show Answer ⟶
a. toUpperCase()

Fundamentals of Java Class 12 MCQ

55. __________ function helps to return a new string after replacing all occurrences of old string.
a. replace() 
b. Change()
c. Convert()
d. None of the above

Show Answer ⟶
a. replace()

56. ________ function helps to return the length of the string.
a. replace() 
b. isEmpty()
c. indexOf()
d. None of the above

Show Answer ⟶
a. replace()

57. _______ function helps to return the index of the first occurrence of a given substring.
a. length()
b. isEmpty()
c. indexOf() 
d. None of the above

Show Answer ⟶
c. indexOf()

58. When unexpected errors come in the program it is handled by ___________.
a. Error handling
b. Exception handling 
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Exception handling

Fundamentals of Java Class 12 MCQ

60. Which keywords handle an exception in Java programming.
a. Try
b. Catch
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

61. _________ helps to access the network services that are running on the local computer.
a. Localhost 
b. Local Network
c. network
d. None of the above

Show Answer ⟶
a. Localhost

62. What are the different ways to create threads in Java?
a. By extending the Thread class
b. By implementing the Runnable interface
c. Both a) and b) 
d. None of the above

Show Answer ⟶
c. Both a) and b)

63. A ______________ is one that can perform multiple tasks concurrently so that there is optimal utilization of the computer’s resources.
a. Resources program
b. Multithreaded program 
c. Class program
d. None of the above

Show Answer ⟶
b. Multithreaded program

64. What are the different types of passing values in Java?
a. Pass by value & not Pass by reference 
b. Pass by data & Pass by address
c. Pass by String & Pass by reference
d. None of the above

Show Answer ⟶
a. Pass by value & not Pass by reference

Fundamentals of Java Class 12 MCQ

65. What are the basic idea in exception handling ____________.
a. Denote an exception block
b. Catch the exception
c. Handle the exception
d. All of the above 

Show Answer ⟶
d. All of the above

66. ___________ a file format based on the popular ZIP file format and is used for aggregating many files into one.
a. Java ARchive (JAR) 
b. Java Bin (JB)
c. Java Method (JM)
d. None of the above

Show Answer ⟶
a. Java ARchive (JAR)

67. JDBC Stands for ___________.
a. Java Data Connection
b. Java Database Connection
c. Java Database Connectivity 
d. Java Data Connectivity

Show Answer ⟶
c. Java Database Connectivity

68. An ___________ is a useful mechanism for effectively identifying/detecting and correcting logical errors in a program. When developing your Java programs.
a. Database
b. Assertion 
c. Archive
d. None of the above

Show Answer ⟶
b. Assertion

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Operating Web Class 12 MCQ

operating web class 12 mcq

Teachers and Examiners (CBSESkillEduction) collaborated to create the Operating Web Class 12 MCQ. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Operating Web Class 12 MCQ

1. An application that can be accessed via a web browser, over a network connection is called a ___________.
a. Web-based application
b. Server-based application
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Web-based application

2. Which one of the websites has an online reservation system?
a. www.irctc.co.in
b. www.redbus.in
c. www.goibibo.com
d. All of the above

Show Answer ⟶
d. All of the above

3. What are the advantages of online reservation?
a. Convenient
b. Price comparison
c. Security
d. All of the above

Show Answer ⟶
d. All of the above

4. What are the actions that can be taken to make a password?
a. Make a password complex, like a mix case, use numbers and special characters.
b. Never use common name, date of birth and city in the password
c. Don’t share passwords with your friends or relatives.
d. All of the above

Show Answer ⟶
d. All of the above

Operating Web Class 12 MCQ

5. Give some examples of search engines.
a. Google
b. Yahoo
c. Bing
d. All of the above

Show Answer ⟶
d. All of the above

6. NICNET Stands for ___________.
a. National Satellite Based Computer Network
b. New Satellite Based Computer Network
c. National State Based Computer Network
d. None of the above

Show Answer ⟶
a. National Satellite Based Computer Network

8. NICNET is launched in _________.
a. 1986
b. 1977
c. 1987
d. 1977

Show Answer ⟶
c. 1987

9. DISNIC State for __________.
a. Digital Information System of the National Informatics Center
b. District Information System of the National Informatics Center
c. Digital Internet System of the National Informatics Center
d. None of the above

Show Answer ⟶
b. District Information System of the National Informatics Center

Operating Web Class 12 MCQ

10. DEITY Stands for __________.
a. Department of Electric and Information Technology
b. Department of Electric and Indian Technology
c. Department of Electronics and Information Technology
d. None of the above

Show Answer ⟶
c. Department of Electronics and Information Technology

11. Examples of the Central initiatives for e-governance are ___________.
a. National e-Governance Plan (NeGP)
b. National e-Governance Division (NeGD)
c. e-Governance Infrastructure
d. All of the above

Show Answer ⟶
d. All of the above

12. Which of the following is the National Portal of India website.
a. Indiagov.com
b. Indianportal.com
c. India.gov.in
d. None of the above

Show Answer ⟶
c. India.gov.in

13. ________ website provides a single window access to information and services being provided by the
various Indian Government entities.
a. india.gov.in
b. goidirectory.nic.in
c. data.gov.in
d. None of the above

Show Answer ⟶
a. india.gov.in

14. India.gov.in is a Mission Mode Project under the National E-Governance Plan, designed and maintained by ___________.
a. National Informatics Center
b. DeitY
c. MoCIT
d. All of the above

Show Answer ⟶
d. All of the above

Operating Web Class 12 MCQ

15. ____________ portal is a one point source to access all Indian Government websites at all levels and from all sectors.
a. india.gov.in
b. goidirectory.nic.in
c. data.gov.in
d. None of the above

Show Answer ⟶
b. goidirectory.nic.in

16. Online shopping is an ____________ where the customer can purchase goods over the Internet.
a. Banking application
b. e-Commerce application
c. Government application
d. None of the above

Show Answer ⟶
b. e-Commerce application

17. What are the situations where Online Shopping is useful?
a. The customer does not have enough time to visit a store and purchase goods.
b. The store where you will get what you need may be very far off.
c. The product you may require is not available at your market.
d. All of the above

Show Answer ⟶
d. All of the above

18. What are the different methods for making payment to the website?
a. Cash on delivery
b. Wire transfer
c. e-Voucher
d. All of the above

Show Answer ⟶
d. All of the above

19. Give examples of Online education sites.
a. www.eagetutor.com
b. udacity.org
c. coursera.org
d. All of the above

Show Answer ⟶
d. All of the above

Operating Web Class 12 MCQ

20. NCERT portal that provides online learning resources like _________.
a. e-Book
b. Question papers
c. Journals & Children Book
d. All of the above

Show Answer ⟶
d. All of the above

21. A web application is a program that is stored on a _________.
a. Web Server
b. Voice Server
d. Data Server
e. None of the above

Show Answer ⟶
a. Web Server

22. What characteristics are required for a new project.
a. A project requires finite resources that are required to complete the project.
b. A project has a specific time frame
c. A project is complete when its end objectives are achieved
d. All of the above

Show Answer ⟶
d. All of the above

23. What are the different phases in a Web application project?
a. Requirements Definition Phase
b. Design Phase
c. Implementation Phase & Testing Phase
d. All of the above

Show Answer ⟶
d. All of the above

24. _____________ In this phase we identify the problem statement for which the web application is to be developed. Identify the scope of the problem.
a. Requirements Definition Phase
b. Design Phase
c. Implementation Phase
d. Testing Phase

Show Answer ⟶
a. Requirements Definition Phase

Operating Web Class 12 MCQ

25. In the Requirements Definition Phase what are the feasibility required?
a. Check whether the project is technically feasible
b. Check whether the project is economically feasible
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

26. In the Requirements Definition Phase, The focus is on “What” the application must do. to define the scope of the application _____________.
a. Compile a detailed list with a clear description of application features.
b. Establish the goals that the solution must achieve.
c. Recognizing the limitations that are placed on the project.
d. All of the above

Show Answer ⟶
d. All of the above

27. What are the different keys required to design the application database?
a. Identify the database tables that will be required in the application
b. Each table we need to identify the attributes of the tables, their data types and size of the column.
c. Decide the table structures
d. All of the above

Show Answer ⟶
d. All of the above

28. _________ development means working on server-side software, which focuses on everything you can’t see on a website.
a. Front – end
b. Back – end
c. Between – end
d. None of the above

Show Answer ⟶
b. Back – end

29. __________ phase helps to test applications (Front-End and Back-End) with multiple sample sets of data.
a. Requirements Definition Phase
b. Design Phase
c. Implementation Phase
d. Testing Phase

Show Answer ⟶
d. Testing Phase

Operating Web Class 12 MCQ

30. __________ is an example of a B2B e-Commerce website.
a. Supply chain management
b. Legacy computer system
c. Sustainable supply chain
d. Electronic data interchange

Show Answer ⟶
a. Supply chain management

31. According to the volume of transactions, it is the most widely used payment method and is quickly convertible into other kinds of value without a middleman. Which payment mechanisms are meant by this statement?
a. Plastic Card
b. Credit Card
c. Cash
d. None of the above

Show Answer ⟶
c. Cash

32. Advantages of using an online website builder include-
a. Low cost
b. Easy to learn
c. Time taking
d. Both a) and b)

Show Answer ⟶
d. Both a) and b)

33. Buying and selling goods over the internet is called _________.
a. Cyber-Commerce
b. Digital-Commerce
c. E-Commerce
d. Hyper Selling

Show Answer ⟶
c. E-Commerce

34. The IRCT (Indian Railways reservation) is an example of _________.
a. Expert System
b. Transaction processing system
c. Management controls system
d. None of the above

Show Answer ⟶
b. Transaction processing system

Operating Web Class 12 MCQ

35. Which website belongs to B2C (Business to Customer).
a. Flipkart t
b. Amazon
c. eBay
d. All of the above

Show Answer ⟶
d. All of the above

36. E-Commerce stands for ___________.
a. Electronic Commerce
b. Electric Commerce
c. Entertainment Commerce
d. None of the above

Show Answer ⟶
a. Electronic Commerce

37. Which of the following products is appropriate for online sales?
a. Electronic Item
b. Books
c. Vegetables & Fruits
d. All of the above

Show Answer ⟶
d. All of the above

38. Which of the following functions is related to e-Commerce.
a. Marketing
b. Finance
c. Supply Chain
d. All of the above

Show Answer ⟶
d. All of the above

39. What precautions we have take when performing online transactions
a. Make a password complex
b. Be cautious when you are paying amount online
c. User antivirus in you device
d. All of the above

Show Answer ⟶
d. All of the above

Operating Web Class 12 MCQ

40. To make a strong password you have to use ___________.
a. Capital Letter in password
b. Use Numbers
c. Use Special symbol
d. All of the above

Show Answer ⟶
d. All of the above

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Database Concepts Class 12 Important Questions

database concepts class 12 important questions

Teachers and Examiners (CBSESkillEduction) collaborated to create the Database Concepts Class 12 Important Questions. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Database Concepts Class 12 Important Questions

1. What is data?

Answer – Data is a collection of raw facts which have not been processed to reveal useful information.

2. What is Database?

Answer – A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is usually controlled by a database management system.

Database Concepts Class 12 Important Questions

3. What are the different properties of Database?

Answer – The different properties of Database are –

1) A database is a representation of some aspect of the real world also called miniworld. Whenever there are changes in this miniworld they are also reflected in the database.

2) It is designed, built and populated with data for specific purposes.

3) It can be of any size and complexity.

4) It can be maintained manually or it may be computerized.

4. Why is a database required?

Answer – Large amounts of data may be kept in one location, which makes databases a suitable choice for data access. The data can be accessed and changed simultaneously by several individuals. You can quickly and easily find the information you need in databases since they can be searched and sorted.

Database Concepts Class 12 Important Questions

5. What are the different advantages of Database?

Answer – Advantages of database are –

1. Reduction in Redundancy: All the data is stored at one place. There is no repetition of the same data. This also reduces the cost of storing data on hard disks or other memory devices.

2. Improved Consistency: The chances of data inconsistencies in a database are also reduced as there is a single copy of data that is accessed or updated by all the users.

3. Improved Availability: Same information is made available to different users. This helps sharing of information by various users of the database.

4. Improved Security: By making use of passwords and controlling users’ database access rights, the DBA can provide security to the database.

5. User Friendly: Using a DBMS, it becomes very easy to access, modify and delete data.

6. What is a Database Management System?

Answer – A database management system is a group of applications that let users build, administer, and use databases. It permits the development of a data repository that may be created once and then accessible by various users in accordance with their needs. As a result, all application programmes have access to a single data source.

7. What are the various operations performed by Database?

Answer – The various operation of database are –
1. Defining the Database: It involves specifying the data type of data that will be stored in the database and also any constraints on that data.

2. Populating the Database: It involves storing the data on some storage medium that is controlled by DBMS.

3. Manipulating the Database: It involves modifying the database, retrieving data or querying the database, generating reports from the database etc.

4. Sharing the Database: Allow multiple users to access the database at the same time.

5. Protecting the Database: It enables protection of the database from software/ hardware failures and unauthorized access.

6. Maintaining the Database: It is easy to adapt to the changing requirements

Database Concepts Class 12 Important Questions

8 What are the different characteristics of Database?

Answer – The different characteristics of database are –

a. Self-describing Nature of a Database System – The database management system (DBMS) also includes a description of the data that it stores. Metadata refers to this description of the data. A database catalog or data dictionary is where meta-data is kept. It includes the data’s structure as well as the limitations placed on the data.

b. Insulation Between Programs and Data – Programs that access this data don’t need to be changed because the description of the data is stored separately in the database management system (DBMS) and any changes to the data’s structure are made in the catalog. The term “Program-Data Independence” refers to this quality.

c. Sharing of Data – Multiple users can access the database at once in a multi user scenario. Therefore, a DBMS must have concurrency control software to provide concurrent access to the database’s data without encountering any consistency issues.

Database Concepts Class 12 Important Questions

9. What are the different types of users of DBMS?

Answer – The different types of DBMS users are –

1. End Users – Users who use the database for querying, modifying and generating reports as per their needs.

2. Database Administrator (DBA) – The DBA is responsible for authoring access, monitoring its use, providing technical support, acquiring software and hardware resources.

3. Application Programmers – Application programmes write application programs to interact with the database.

4. System Analyst – A system analyst plays a major role in the database design and all the technical, economic and feasibility aspects.

10. What are the limitations of using DBMS?

Answer – Limitations of DBMS are –

a. High Cost – The cost of implementing a DBMS system is very high and a very time consuming process.

b. Security and Recovery Overheads – Databases protect the data from unauthorized access from the users.

Database Concepts Class 12 Important Questions

11. What is a relational Database?

Answer – A collection of data elements with pre-established relationships between them make up a relational database. These things are arranged in a series of tables with rows and columns. To store data about the things that will be represented in the database, tables are utilized.

12. What do you mean by domain constraint?

Answer – Columns with user-defined domain constraints make it easier for users to enter values that relate to the data type. Additionally, it notifies the user that the column is not properly filled in if it receives a faulty input.

Database Concepts Class 12 Important Questions

13. What is entity integrity constraint?

Answer – This constraint specifies that the primary key of a relation cannot have null value. The reason behind this constraint is that we know the primary key contains no duplicates.

14. What is the referential integrity constraint?

Answer – Foreign key constraints or referential integrity constraints. A logical rule about the values in one or more columns in one or more tables is known as a foreign key constraint, also known as a referential constraint or a referential integrity constraint.

15. How many SQL statements are used? Define them.

Answer – SQL statements are basically divided into two categories, DDL & DML.

a. Data Definition Language – Commands from the Data Definition Language (DDL) are used to specify the structure holding the data. These commands are automatically committed, which means that any database changes made by DDL commands are permanently recorded.

b. Data Manipulation Language – The database’s data can be changed using Data Manipulation Language (DML) commands. These instructions can be rolled back and are not automatically committed.

Database Concepts Class 12 Important Questions

16. Give an example of DDL & DML commands?

Answer –
Data Definition Language (DDL) commands:

  • CREATE table
  • ALTER table
  • DROP table

Data Manipulation Language (DML) commands:

  • INSERT table
  • UPDATE table
  • DELETE

Database Concepts Class 12 NCERT Solutions

17. Consider the following Employee table –

Table Name – Employee

t18

The primary key of this table is Employee_ID and Manager_ID is a foreign key that references Employee_ID.

Write SQL commands for the following:

(a) Create the above table

CREATE TABLE EMPLOYEE
(
Employee_ID INTEGER PRIMARY KEY,
Employee_Name VARCHAR(20) NOT NULL,
Job_Title VARCHAR(20),
Salary DECIMAL(10,2) DEFAULT 40000,
Bonus VARCHAR(10),
Age INTEGER,
FOREIGN KEY (Manager_ID) REFERENCES Employee(Employee_ID)
);

(b) Insert values as shown above

INSERT INTO Employee (
Employee_Id, Employee_Name, Job_Title, Salary, Bonus, Age, Manager_Id)
Values (1201, “Divya”, “President”, 50000, NULL, 29, NULL);

or

INSERT INTO Employee (
Employee_Id, Employee_Name, Job_Title, Salary, Bonus, Age, Manager_Id)
Values (1201, “Divya”, “President”, 50000, NULL, 29, NULL),
(1205, “Amyra”, “Manager”, 30000, 2500, 26, 1201),
(1211, “Rahul”, “Analyst”, 20000, 1500, 23, 1205),
(1213, “Manish”, “Salesman”, 15000, NULL, 22, 1205),
(1216, “Megha”, “Analyst”, 22000, 1300, 25, 1201),
(1217, “Mohit”, “Salesman”, 16000, NULL, 22, 1205);

(c) Delete the Employee having Employee_ID 1217.

DELETE FROM Employee WHERE Employee_Id = 1217;

(d) Update the salary of “Amyra” to 40000.

UPDATE Employee SET Salary = 40000 WHERE Employee_Name = “Amyra”;

(e) Alter the table Employee so that NULL values are not allowed for Age column.

ALTER TABLE Employee MODIFY Age INTEGER NOT NULL;

(f) Write a query to display names and salaries of those employees whose salary are greater than 20000.

SELECT Employee_Name, Salary FROM Employee WHERE Salary>20000;

(g) Write a query to display details of employees who are not getting any bonus.

SELECT * FROM Employee WHERE  Bonus IS NULL;

(h) Write a query to display the names of employees whose name contains “a” as the last alphabet.

SELECT Employee_Name FROM Employee WHERE Employee_Name LIKE “%a”;

(i) Write a query to display the name and Job title of those employees whose Manager_ID is 1201.

SELECT Employee_Name, Job_Title FROM Employee WHERE Manager_ID = 1201;

(j) Write a query to display the name and Job title of those employees whose Manager is “Amyra”

SELECT Employee_Name, Job_Title FROM Employee WHERE Manager = “Amyra”;

(k) Write a query to display the name and Job title of those employees aged between 26 years and 30 years.

SELECT Employee_Name, Job_Title FROM Employee WHERE Age BETWEEN 26 AND 30;

18. A Railway company uses machines to sell tickets. The machine details and daily sales information are recorded in two tables:

t19

The primary key of the table Machine is Machine_ID. Records in the table Sales are uniquely identified by the fields Machine_ID and Date.

(a) Create the tables Machine and Sales.

CREATE TABLE MACHINE
(
MACHINE_ID CHAR(3) PRIMARY KEY,
Station CHAR(30)
);

CREATE TABLE SALES
(
MACHINE_ID CHAR(3) NOT NULL UNIQUE,
Date DATE NOT NULL UNIQUE;
Tickets_Sold INTEGER;
Income DECIMAL(8,2)
);

(b) Write a query to find the number of ticket machines in each station.

SELECT Station FROM Machine GROUP BY Tickets_Sold;

(c) Write a query to find the total ticket income of the station “New Delhi” of each day.

SELECT Station FROM Machine where Station=”New Delhi” GROUP BY Sales HAVING SUM(Income);

(d) Write a query to find the total number of tickets sold by the machine (Machine_ID = 122) till date.

SELECT SUM(Tickets_Sold) FROM Sales WHERE Machine_ID = 122;

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Database Concepts Class 12 MCQ

Teachers and Examiners (CBSESkillEduction) collaborated to create the Database Concepts Class 12 MCQ. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Database Concepts Class 12 MCQ

1. Data is a collection of ________ facts which have not been processed to reveal useful information.
a. Raw t
b. Facts
c. Process
d. None of the above

Show Answer ⟶
a. Raw

2. Which of the following properties belong to the database _______________.
a. A database is a representation of some aspect of the real world also called miniworld.
b. It is designed, built and populated with data for specific purposes.
c. It can be of any size and complexity.
d. All of the above

Show Answer ⟶
d. All of the above

3. What are the benefits of databases ___________.
a. Data Redundancy
b. Data Inconsistency
c. Lack of Data Integration
d. All of the above

Show Answer ⟶
d. All of the above

4. A ____________is a collection of programs that enables users to rate, maintain and use a database.
a. Database management system
b. Database manageable system
c. Database updation system
d. None of the above

Show Answer ⟶
a. Database management system

5. Which of the following is not a valid SQL type?
a. FLOAT
b. NUMERIC
c. DECIMAL
d. CHARACTER

Show Answer ⟶
d. CHARACTER

6. Which of the following is not a DDL command?
a. TRUNCATE
b. ALTER
c. CREATE
d. UPDATE

Show Answer ⟶
d. UPDATE

7. What are the various operations that need to be performed on a database _____________.
a. Defining the database
b. Sharing the database
c. Manipulating the database
d. All of the above

Show Answer ⟶
d. All of the above

9. What are the different characteristics of Database management systems?
a. Self – describing Nature of a database system
b. Insulation between programs and data
c. Sharing of data
d. All of the above

Show Answer ⟶
d. All of the above

10. A multiuser environment allows multiple users to access the database simultaneously; it means ___________.
a. Sharing of data
b. Insulation between Program and data
c. Self-describing Nature of database system
d. None of the above

Show Answer ⟶
a. Sharing of data

11. any change in the structure of data would be done in the catalog and hence programs which access this data need not be modified. This property is called_____________.
a. Program-Data Independence
b. Self describing
c. Sharing of data
d. None of the above

Show Answer ⟶
a. Program-Data Independence

12. What are the different types of DBMS users ____________.
a. End users
b. Database Administrator
c. Application programmers
d. All of the above

Show Answer ⟶
d. All of the above


13. Users who use the database for querying, modifying and generating reports as per their needs. They are not concerned about the working and designing of the database known as _________.
a. End users
b. Database Administrator
c. Application programmers
d. All of the above

Show Answer ⟶
a. End users

12. How many Primary keys can there be in a table?
a. Only 1
b. Only 2
c. Depends on no of Columns
d. Depends on DBA

Show Answer ⟶
a. Only 1

13. Which of the following is not Constraint in SQL?
a. Primary Key
b. Not Null
c. Check
d. Union

Show Answer ⟶
d. Union

14. What operator tests column for absence of data
a. NOT Operator
b. Exists Operator
c. IS NULL Operator
d. None of the above

Show Answer ⟶
c. IS NULL Operator

15. __________ is responsible for authoring access, monitoring its use, providing technical support, acquiring software and hardware resources.
a. End users
b. Database Administrator
c. Application programmers
d. All of the above

Show Answer ⟶
b. Database Administrator

16. ___________ write application program to interact with the database.
a. End users
b. Database Administrator
c. Application programmers
d. All of the above

Show Answer ⟶
c. Application programmers

17. _________ determines the requirements of the end users and then develops specifications to meet these requirements
a. End users
b. Database Administrator
c. System Analyst
d. All of the above

Show Answer ⟶
c. System Analyst

18. __________plays a major role in the database design and all the technical, economic and feasibility aspects.
a. End users
b. Database Administrator
c. System Analyst
d. All of the above

Show Answer ⟶
c. System Analyst

19. Advantages of using DBMS approach.
a. Reduction in Redundancy
b. Improved consistency
c. Improved availability
d. All of the above

Show Answer ⟶
d. All of the above


20. Data in a DBMS is more concise because of the __________ of data.
a. Non availability of data
b. Central repository
c. Data is not Security
d. None of the above

Show Answer ⟶
b. Central repository

21. By making use of ___________, the DBA can provide security to the database.
a. Database access rights
b. Password
c. Controlling users
d. All of the above

Show Answer ⟶
d. All of the above

22. Limitation of using DBMS approach _________.
a. High cost
b. Security and recovery overheads
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

23. __________organize collection of data as a collection of relations where each relation corresponds to a table of values.
a. Data method
b. Database
c. Data system
d. None of the above

Show Answer ⟶
b. Database

24. A row is also called a ________.
a. Field
b. Tuple
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

25. A column is also called ________.
a. Attribute
b. Relation
c. Domain
d. Degree

Show Answer ⟶
a. Attribute

26. The data types of values in each column are called __________.
a. Attribute
b. Relation
c. Domain
d. Degree

Show Answer ⟶
c. Domain

27. The number of attributes in a relation is called the _________ of a relation.
a. Attribute
b. Relation
c. Domain
d. Degree

Show Answer ⟶
d. Degree

28. The number of rows in a relation is called the _________ of a relation.
a. Cardinality
b. Relation
c. Domain
d. Degree

Show Answer ⟶
a. Cardinality

29. Some of the examples of databases are ___________.
a. IBM DB2
b. Oracle
c. MySQL
d. All of the above

Show Answer ⟶
d. All of the above

30. __________ are restrictions on the values, stored in a database based on the requirements.
a. Method
b. Constraints
c. Properties
d. None of the above

Show Answer ⟶
b. Constraints

31. What are examples of constraints in relational models?
a. Domain constraint
b. Key constraint
c. Entity Integrity constraint
d. All of the above

Show Answer ⟶
d. All of the above

32. What are the examples of key constraints?
a. Super key
b. Candidate key
c. Primary key
d. All of the above

Show Answer ⟶
d. All of the above

33. __________ is a set of attributes in a relation, for which no two tuples in a relation state have the same combination of values.
a. Super key
b. Candidate key
c. Primary key
d. All of the above

Show Answer ⟶
a. Super key

34. _________ key helps to protect duplication in the table.
a. Super key
b. Candidate key
c. Primary key
d. All of the above

Show Answer ⟶
c. Primary key

35. ____________ is a language that is used to manage data stored in a RDBMS.
a. DDL
b. DML
c. SQL
d. None of the above

Show Answer ⟶
c. SQL

36. SQL Stands for __________.
a. System Query Language
b. Structured Query Language
c. Social Query Language
d. None of the above

Show Answer ⟶
b. Structured Query Language

37. DDL Stands for ___________.
a. Data Database Language
b. Domain Definition Language
c. Data Definition Language
d. None of the above

Show Answer ⟶
c. Data Definition Language

38. DML Stands for ___________.
a. Data Manageable Language
b. Domain Manipulation Language
c. Data Manipulation Language
d. None of the above

Show Answer ⟶
c. Data Manipulation Language

39. Database system needs to be installed on the Computer and this computer is known as ___________.
a. Database Server
b. Database storage
c. Database memory
d. None of the above

Show Answer ⟶
a. Database Server

40. _________ command is used to create a new table in the database.
a. Select command
b. Create command
c. Modify command
d. Alter command

Show Answer ⟶
b. Create command

41. Which datatype belongs to numerical type.
a. Integer
b. . Number
c. Decimal
d. All of the above

Show Answer ⟶
d. All of the above

41. What data type has a fixed length in the database.
a. Varchar(n)
b. Char(n)
c. Longvarchar(n)
d. None of the above

Show Answer ⟶
b. Char(n)

42. Which syntax is correct for creating a table _________.
a. Create table <table name> ( <column name> <data type>);
b. Create table <column name> ( <table name> <data type>);
c. Create table ( <column1 name> <data type>);
d. None of the above

Show Answer ⟶
a. Create table

( );

43. Which command is used to creating a Database;
a. Create <database name>;
b. Create Database <database name>;
c. Database Create <database name>;
d. None of the above

Show Answer ⟶
b. Create Database ;

44. Which command is used to display a Database;
a. Display DATABASE;
b. Show DATABASE;
c. Check DATABASE;
d. None of the above

Show Answer ⟶
b. Show DATABASE;

45. A command that lets you change one or more field in a table is:
a. INSERT
b. MODIFY
c. LOOK-UP
d. All of the above

Show Answer ⟶
b. MODIFY

46. How can you change “Mehta” into “Sinha” in the “LastName” column in the Users table?
a. UPDATE User SET LastName = ‘Mehta’ INTO LastName = ‘Singh’
b. MODIFY Users SET LastName = ‘Sinha’ LAST LastName = ‘Sinha’
c. MODIFY Users SET LastName = ‘Mehta’ INTO LastName = ‘Sinha’’
d. UPDATE Users SET LastName = ‘Mehta’ WHERE LastName = ‘Sinha’’

Show Answer ⟶
d. UPDATE Users SET LastName = ‘Mehta’ WHERE LastName = ‘Sinha’’

47. What are the several constraints for smooth operations in the database.
a. NOT NULL
b. DEFAULT
c. CHECK
d. All of the above

Show Answer ⟶
d. All of the above


48. If a user has not entered a value for an attribute, then the default value specified while creating the table is used; this constraint is done by using _________.
a. NOT NULL
b. DEFAULT
c. CHECK
d. All of the above

Show Answer ⟶
b. DEFAULT

49. ___________ ensures that there must always exist a valid relationship between two relational database tables.
a. Referential Integrity Constraint
b. Key Constraint
c. Default Constraint
d. None of the above

Show Answer ⟶
a. Referential Integrity Constraint

50. A foreign key constraints can reference columns within the same table. These tables are called ___________.
a. Self-referencing tables
b. Key Constraint
c. Default Constraint
d. None of the above

Show Answer ⟶
a. Self-referencing tables

51. The advantage is that named constraints can be easily _________ using the alter Table command.
a. Updated
b. Deleted
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

52. The command is used to delete tables from a database _________.
a. Delete Table
b. Remove Table
c. Drop Table
d. None of the above

Show Answer ⟶
c. Drop Table

53. ____________command is used to modify the base table definition. The modifications that can be done using this command.
a. Update Table
b. Alter Table
c. Modify Table
d. None of the above

Show Answer ⟶
b. Alter Table

54. A column can be dropped using this command but one must specify the options __________ for the drop behavior.
a. Restrict
b. Cascade
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

55. If the reference is given in another table then ________ command is not allowed to drop the table.
a. Restrict
b. Cascade
c. Both a) and b)
d. None of the above

Show Answer ⟶
a. Restrict

56. If the reference is given in another table then ________ command is allowed to drop the table.
a. Restrict
b. Cascade
c. Both a) and b)
d. None of the above

Show Answer ⟶
b. Cascade

57. A f___________key can be dropped by using the ALTER TABLE command.
a. Primary key
b. Foreign key
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

58. Insert command helps to insert _________ in the table.
a. Column
b. Row
c. Tuple
d. All of the above

Show Answer ⟶
d. All of the above

59. ___________command is used to update the attribute values of one or more tuples in a table.
a. Insert table
b. Update table
c. Alter table
d. None of the above

Show Answer ⟶
b. Update table

60. In order to delete one or more tuples, _________ command is used.
a. Drop command
b. Delete command
c. Remove command
d. Erase command

Show Answer ⟶
b. Delete command

61. The ____________ Command is used to retrieve information from a database.
a. Select command
b. Display command
c. Show command
d. None of the above

Show Answer ⟶
a. Select command

62. Where clause you can use in which of the following commands.
a. Delete command
b. Select command
c. Both a) and b)
d. None of the above

Show Answer ⟶
c. Both a) and b)

63. ________ helps to count the number of tuples in the database.
a. Count
b. Sum
c. Max
d. Min

Show Answer ⟶
a. Count

64. _______ finds the sum of all the values for a selected attribute which has a numeric data type.
a. Count
b. Sum
c. Max
d. Min

Show Answer ⟶
b. Sum

65. ________ finds the maximum value out of all the values for a selected attribute which has numeric data type.
a. Greatest
b. Maximum
c. Max
d. Minimum

Show Answer ⟶
c. Max

66. _________ helps to find the minimum value out of all values for a selected attribute which has numeric data type.
a. Minimum
b. Min
c. Lowest
d. None of the above

Show Answer ⟶
b. Min

67. _________ helps to find the average value of all the values for a selected attribute which has numeric data type.
a. Middle
b. Average
c. AVG
d. None of the above

Show Answer ⟶
c. AVG

68. Which SQL keyword is used to display the data based on certain pattern?
a. LIKE
b. IN
c. BETWEEN
d. RANGE

Show Answer ⟶
a. LIKE

69. Sagun is creating a table SALESMAN with fields Salesman number, Name, Total Sales. She doesn’t want the Total Sales column to be remain unfilled i.e. she wants to make entry in this field mandatory. Which constraint she should use at the time of creating SALESMAN table:
a. Check
b. Default
c. Not null
d. Primary key

Show Answer ⟶
c. Not null

70. Ranjana wants to delete the records where name starts with A from the table CUSTOMER having fields Name, Amount, Discount. Identify the correct command:
a. Delete CUSTOMER where name like “A%”;
b. Delete from CUSTOMER where name like “A%”;
c. Delete CUSTOMER where name = “A%”;
d. Delete from CUSTOMER where name = “A%”;

Show Answer ⟶
b. Delete from CUSTOMER where name like “A%”;

71. The ______________command is used to modify the structure of the table STUDENT in MySQL.
a. Modify table STUDENT
b. Alter table STUDENT
c. Alter STUDENT
d. Modify STUDENT

Show Answer ⟶
b. Alter table STUDENT

72. Garvit wants to change the default value of DISCOUNT in the CUSTOMER table from 10 to 15. Select the most appropriate command to do the same from the following options:
a. ALTER TABLE CUSTOMER ALTER DISCOUNT SET DEFAULT 15;
b. ALTER TABLE CUSTOMER DELETE DISCOUNT SET DEFAULT 15;
c. ALTER TABLE CUSTOMER MODIFY DISCOUNT SET DEFAULT 15;
d. ALTER TABLE CUSTOMER CHANGE DISCOUNT SET DEFAULT 15;

Show Answer ⟶
a. ALTER TABLE CUSTOMER ALTER DISCOUNT SET DEFAULT 15;

73. Consider a table: COACHING having fields CITY_NAME, ENROLMENTS. Shikhar wants to display the data of the above table in ascending order of enrolments. Choose the correct query/queries from the following:
i. Select * from coaching order by enrolments asc;
ii. Select * from coaching order by enrolments desc;
iii. Select * from coaching order by enrolments;
iv. Select * from coaching order by enrolments ascending; Select the correct option:
a. Only (i) is correct
b. Both (i) and (ii) are correct
c. Both (i) and (iii) are correct
d. Only (iv) is correct

Show Answer ⟶
c. Both (i) and (iii) are correct

74. Geeta wants to know the usage of NULL in MySQL. Help her choose in which of the following case NULL value cannot be assigned to the column Admission_Number:
a. When the Admission_Number is zero
b. When the Admission_Number is not known
c. When the Admission_Number is not available
d. When the Admission_Number is not applicable

Show Answer ⟶
a. When the Admission_Number is zero

75. Which of the following is NOT an advantage of DBMS approach:
a. All the data is stored at one place. There is no repetition of the same data.
b. There is a single copy of data that is accessed or updated by all the users.
c. The DBA can provide security to the database by controlling users’ database access rights.
d. Designing the database specifications and writing application programs is a time-consuming process.

Show Answer ⟶
d. Designing the database specifications and writing application programs is a time-consuming process.

76. An attribute A of datatype varchar(20) has the value “Keshav”. The attribute B of datatype char(20) has value ”Meenakshi”. How many characters are occupied in attribute A and attribute B?
a. 20,6
b. 6,20
c. 9,6
d. 6,9

Show Answer ⟶
b. 6,20

77. Cardinality of a table is four and degree is three. If two columns and four rows are added to the table what will be the new degree and cardinality of the given table:
a. 5,8
b. 3,4
c. 8,5
d. 4,3

Show Answer ⟶
a. 5,8

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Java Class 12 Notes

Teachers and Examiners (CBSESkillEduction) collaborated to create the Java Class 12 Notes. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Java Class 12 Notes

Java Programming Class 12 

Java is a high-level, class-based, object-oriented programming language. Java Interpreter java program to Java Bytecode. This method has the advantage that once a Java programme has been converted to bytecode, it can be executed on any platform (such as Windows, Linux, or Mac), provided the platform is running the JVM. Because of this, Java programmes are extremely portable and cross-platform.

Variables and Datatypes in Java 

variable and datatype
What is Variable?

Variables will be used to store the program’s data. A variable is a placeholder for information whose value may change as a result of a program’s execution. In a computer, a variable is the name of a memory region that stores data. All data variables in Java have to be declared and initialized before they are used. 

What is Datatype?

When declaring variables, we have to specify the data type of information that the member will hold – integer, fractional, alphanumeric, and so on. The type of a variable tells the compiler, how much memory to reserve when storing a variable of that type.

Java Datatype is divided into two types – 

  1. Primitive data types – includes byte, short, int, long, float, double, boolean and char. 
  2. Non-primitive data types – such as String, Arrays and Classes.
Primitive data types

A reserved term is used to identify a primitive type, which is predefined by the language. The Java programming language’s support eight primitive data types.

Data TypeType of valuesSize
byteInteger8-bit
shortInteger16-bit
intInteger32-bit
longInteger64-bit
floatFloating Point32-bit
doubleFloating Point64-bit
charCharacter16-bit
booleanTrue or False1-bit
Datatype in Java

Java Variables Naming rules 

  1. Variable names can begin with either an alphabetic character, an underscore (_), or a dollar sign ($).
  2. Variable names must be one word. Spaces are not allowed in variable names. Underscores are allowed. “total_marks” is fine but “total marks” is not.
  3. There are some reserved words in Java that cannot be used as variable names, for example – int.
  4. Java is a case-sensitive language. Variable names written in capital letters differ from variable names with the same spelling but written in small letters.
  5. It is good practice to make variable names meaningful. The name should indicate the use of that variable.
  6. You can define multiple variables of the same type in one statement by separating each with a comma.

String Variable 

String variables, also known as alphanumeric variables or character variables, treat their values as text. As a result, string variables may have values that are made up of letters, numbers, or symbols.

Example – 

String first_name = “Mayank”;
String last_name = “Saxena”;

Operators

In a programming language, operators are special symbols that carry out certain operations.

  1. Arithmetic Operators
  2. Relational Operators
  3. Assignment Operators
  4. Logical Operators

Athematic Operator

arithmetic operators in java

 

Relational Operators

relational operators in java

Assignment Operators

assignment operators in java

Logical Operator

logical operator in java

Selection Structures

In real life, you often select your actions based on whether a condition is true or false. Similarly in a program, you may want to execute a part of the program based on the value of an expression. Java provides two statements – 

  1. If else Statement
  2. Switch Statement

The if Else Statement

The if else statement in Java lets us execute a block of code depending upon whether an expression evaluates to true or false. The structure of the Java if statement is as below –

Syntax – 

if (expression) {
statements
}
else
{       }

Question > Write a Java program to check weather age is grater then 20 not?

if statement in java

The Switch Statement

The switch statement is used to execute a block of code matching one value out of many possible values. The structure of the Java switch statement is as follows –

Syntax – 

switch (expression) {
case 1:
System.out.println(“Case 1”);

case 2:
System.out.println(“Case 2”);

case 3:
System.out.println(“Case 3”);

default:
System.out.println(“Default case”);
}

Question > Java programme to display a Switch statement example. 

public class Example {
public static void main(String[] args) {
int number=30;
switch(number){
case 10:
System.out.println(“10”);
break;
case 20:
System.out.println(“20”);
break;
case 30:
System.out.println(“30”);
break;
default:
System.out.println(“Not in 10, 20 or 30”);
}
}
}

Repetition Structures

In real life you often do something repeatedly, for example, consider a task such as reading a book, first you open the book, and then repeatedly – read a page; flip the page – until you get to the end of the book, then close the book.

Difference between Entry control loop and Exit control loop

Entry Control LoopExit Control Loop
In entry control loop condition is checked firstIn exit control loop condition is checked last
If the condition is false, loop body will not executeIf the condition is false, loop body will execute at least once
Example of entry control loop – For & WhileExample of exit control loop – Do-while
Difference between Entry control loop and Exit control loop

The While Statement

The while statement evaluates the test before executing the body of a loop. The structure of the Java while statement is as shown –

Syntax – 

while (expression)
{
statements
}

Question > Write a Java program to print the number from 1 to 5 using while statement.

public class WhileDemo {
public static void main (String[ ] args) {
int number = 1;
while (number <= 5) {
System.out.print (“number);
number++;
} } }

The Do While Statement

The do while statement evaluates the test after executing the body of a loop. The structure of the Java do while statement is as shown –

Syntax – 

do
{
statements
} while (expression);

Question > Write a Java program to print the number from 1 to 5 using do-while statement.

public class DowhileDemo {
public static void main (String[ ] args) {
int number = 1;
do {
System.out.print (“number);
number++;
} while (number <= 5);

} }

The for Statement

The for loop is the most widely used Java loop construct. The structure of the Java for statement is as below:

Syntax – 

for (counter=initial_value; test_condition;change counter)
{
statements
}

Question > Write a Java program to print the number from 1 to 5 using for statement.

public class WhileDemo {
public static void main (String[ ] args) {
int number;
for (number=1; number <= 5; number++) {
System.out.print (“number);
} } }

Arrays in Java

Arrays are variables that can hold more than one value, they can hold a list of values of the same type.

For example, 

Normal Variable Declaration

normal variable declaration

Array Variable Declaration 

array variable declaration

User Defined Methods

A method in Java is a block of statements grouped together to perform a specific task. A method has a name, a return type, an optional list of parameters, and a body. The structure of a Java method is as below –

Syntax – 

return_type method_name(list of parameters separated by commas)
{
statements
return statement
}

Example – Let us write a method that given the length and breadth of a rectangle as parameters returns the area of the rectangle.

static double rectangle_area (double length, double breadth)
{
return (length * breadth);
}

Object Oriented Programming

A computer programming paradigm known as object-oriented programming (OOP) arranges the architecture of software around data or objects rather than functions and logic. An object is a data field with particular characteristics and behaviour.

What is Class?

A class is a collection of objects with similar characteristics. It serves as a model or blueprint from which things can be made. It makes sense as a whole. It cannot be bodily.

A class in Java can contain:

  • Fields
  • Methods
  • Constructors
  • Blocks
  • Nested class and interface

Syntax to declare a class:

class <class_name>{
field;
method;
}

What is Object?

An object is an entity with state and behaviour, such as a chair, bike, marker, pen, table, or car. It could be intellectual or physical (tangible and intangible). The banking system is an illustration of an intangible entity.

Object Definitions:

  • An object is a real-world entity.
  • An object is a runtime entity.
  • The object is an entity which has state and behavior.
  • The object is an instance of a class.

Constructors

A special method member called the constructor method is used to initialize the data members of the class (or any other initialization is to be done at time of object creation).
The constructor has the same name as the class, has no return type, and may or may not have a parameter list. Whenever a new object of a class is created, the constructor of the class is invoked automatically. We do not call the constructor explicitly.

Access Modifiers

In object-oriented languages, the accessibility of classes, methods, and other members is controlled through the use of access modifiers . Access modifiers are a particular type of syntax used in programming languages that make it easier to encapsulate components.

Public, protected, default, and private are the four types of access modifiers in Java.

Getter and Setter Methods

A class’s private data members cannot be accessed from outside the class, but you can grant getter and setter methods controlled access to data members outside the class. The value of a data member is returned by a getter method.

For example we could define a getter method in the Bookclass for the price data member as given below –

double getPrice ( ) {
return price;
}

Java Libraries

A Java library is nothing more than a selection of already created classes. You can use those classes in your code when you download them and inform your computer about them.

Java Standard Library

  • Without String, Enum, Double, etc., we cannot write any Java programme. Everything we need to write Java code is available to us through the lang library.
  • Because util class contains the definitions of all data structures and collections, it is necessary in order to use data structures and collections in Java.
  • We require the io library in order to deal with pipes and read data from files. It enables Java programmers to use files in their programmes.
Data Input

The data input helps to take input from the user, this input are by default string. There are three ways to read user input into a Java programme in a command-line environment: Java BufferedReader Class, Java Scanner Class, and Console Class.

Note – In class 12, Only Java Scanner input is given. 

Syntax for taking input from the user – 

Scanner user_input = new Scanner(System.in);

Question > Write a program to accept name from user and print them in the console.

import java.util.Scanner;
public class Datainput {
public static void main(String[] args) {
Scanner user_input = new Scanner(System.in);
System.out.println(“Enter Your Name”);
String name = user_input.next();
System.out.println(“Your name is : ” + name);
} }

Array Manipulation

The elements of an array can be any combination of integers, floating numbers, or complex numbers, and they all share the same underlying data type. Array manipulation helps to manipulate the data using predefine function, from example “binarySearch()”.

We can search for a specific element in an array using the binarySearch() function of the Arrays class. The array to be searched and the key element to be searched are the parameters required. The method returns the array’s index, which is the location of the key. The binarySearch method gives a negative value if the key cannot be found in the array.

Example – 

double[] marks = {103, 144, 256.5, 346, 387.5};
int key = 346;
int index = Arrays.binarySearch(marks,key);

String Manipulation

string manipulation in java

Exception Handling

Runtime issues such as ClassNotFoundException, IOException, SQLException, RemoteException, etc. can be handled through the Java Exception Handling mechanism. An exception is a disruptive occurrence that takes place at run time, or during the execution of a programme, which interrupts the regular flow of the program’s instructions.

Java provides the following keywords to handle an exception:

try – A try block surrounds the part of the code that can generate exception(s).
catch – The catch blocks follow a try block. A catch block contains the exception handler – specific code that is executed when the exception occurs. Multiple catch blocks following a try block can handle different types of exceptions.

Threads

A multithreaded programme can execute numerous tasks simultaneously for the best possible resource utilisation on the computer. A multithreaded programme is made up of two or more threads, each of which is capable of carrying out a particular task independently and concurrently.

In Java, threads can be created in two ways
1. By extending the Thread class
2. By implementing the Runnable interface

Wrapper Classes

Java’s primitive datatypes, including int, float, and others, are typically supplied by value rather than via reference. Primitive datatypes may occasionally need to be passed by reference. When that happens, you can use the Java wrapper classes.
These classes encapsulate the primitive datatype in an object. For instance, an int variable is held by the Integer wrapper class.

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Operating Web Class 12 Notes

operating web class 12 notes

Teachers and Examiners (CBSESkillEduction) collaborated to create the Operating Web Class 12 Notes. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Operating Web Class 12 Notes

Operating Web-based Applications

Web-based applications are those that can be accessed through a web browser and a network connection. A web-based application offers the benefit of global availability around-the-clock. Web-based applications are now utilised for a variety of tasks, including online shopping with the option of paying with credit or debit cards, e-governance, and learning through online tutorials, quizzes, and other activities.

Online Reservation Systems

A web-based reservation system enables online ticket purchase and cancellation. Online reservation systems examples are –

  • Airline ticket
  • Railway ticket
  • Bus ticket
  • Movie ticket
  • Hotel booking
  • Car rental
  • Tour and travel booking

Operating Web Class 12 Notes

Advantages of Online Reservation System

The advantages of the online reservation system are :

Advantages for consumers online reservation
  1. Convenient – The user/consumer can book tickets anytime anywhere – from home, office, while travelling, etc.
  2. Price Comparison – Online booking allows the customer to check the prices, compare them and get the best deal.
  3. Security – Most online reservation sites require the user to create their profile and provide them with a username and password. The information thus remains secure until their password is secure.
  4. Confirmation of Reservation – When a booking is done, the confirmation of the booking just takes a few seconds. It is fast and secure.
  5. Making Choices – In online booking, the user can see the arrangement of seats, select a particular seat, etc. In railway booking, selection of lower berth/upper berth, type of food required and booking for beddings is possible.
  6. Time Saving – Online reservation consumes very less time in contrast to long queues at the counter.
  7. Discount Scheme – The users can avail the special discount schemes provided by the service provider like, season discount, advance booking discount and frequent user discount.

Advantages for Providers

  1. Requires Less Staffing – Less man-power is required as every task is done through computers.
  2. No Spatial Restrictions – The physical location of the office does not really matter to a customer who
    is reserving tickets online. So, the organization, big or small, can choose their office space depending on their needs.
  3. Global Access – The scope of access to the online reservation becomes large as anyone who has access to the Internet can search for the reservation site and book the tickets.

Operating Web Class 12 Notes

Precautions while Performing Online Transactions

Some actions that can be taken to make the passwords safer are as follows –

  • Make a password complex, like mix case, use numbers and special characters. This decreases ability of automated attacks by trying different character combinations.
  • Be cautious not to leave passwords around and do not share them with friends.
  • Never use names of near and dear ones as passwords.

E-Governance

The government’s ability to give citizens access to information is made easier by the usage of ICT. The government has established ICT-enabled services, such as the registration of birth and death certificates, the purchase of train tickets, the submission of RTI requests, etc.

Initiative

The national satellite-based computer network, NICNET, was launched in India in 1987, providing the primary impetus for e-Governance. The District Information System of the National Informatics Center (DISNIC) programme, which aims to computerise all district offices across the nation, was then introduced in 1990.

The Department of Electronics and Information Technology (DEITY) and Department of Administrative Reforms and Public Grievances (DAR&PG) created the National e-Governance Plan (NeGP) in 2006, which has helped the e-Governance process.

Operating Web Class 12 Notes

E-Governance Sites

Some of the Central initiatives for e-governance include:

  • National e-Governance Plan (NeGP)
  • National e-Governance Division (NeGD)
  • e-Governance Infrastructure
  • Mission Mode Projects
  • Citizens Services
  • Business Services
  • Government Services
  • Projects and Initiatives
  • R&D in e-Governance
india.gov.in

India.gov.in went live on November 10th, 2005. It falls under the National E-Government Plan, or NeGP, as a Mission Mode Project. The National Informatics Centre, which is a division of the Ministry of Communications and Information Technology, manages the portal.

goidirectory.nic.in

All websites from the Indian Government, from all levels and throughout all sectors, can be accessed through this portal. Sites for several Indian states and union territories are also included, as are those for legislative and judicial branches of government. It also offers details about various industries, including agriculture and education.

Operating Web Class 12 Notes

Online Shopping and Bill payments

An online shopping application allows customers to make purchases of goods over the Internet. The customer can go to a number of websites to conduct online purchasing.

Benefits of Online Shopping

Online shopping is useful in many situations. Here, we discuss some of the situations :

  • The customer does not have enough time to visit a store and purchase goods.
  • The store where you will get what you need may be very far off.
  • The money spent in travelling to the store, parking the car, etc., is much more than overhead if any in online shopping.
  • The product you may require is not available at your market.
  • You want to send a product to your friend; you can do online shopping and provide the receiver’s address. You save your time and energy for delivery of the product to your friend’s house located in a different city.
  • You do not have time during the shopping hours. You can do online shopping from your office, home, a friend’s place, anywhere, any time. Thus there are no fixed shopping hours
  • Online shopping also has bargain offers for the customer delight.
  • Some online stores allow customers to rate their services and the items.

Operating Web Class 12 Notes

Project Management – Web Based Application Development

The process of generating web apps is included in web based application development. A software that is kept on a distant server is known as a web application. It is accessible online and supplied via a web browser interface. A web application could be of various types, such as a game, quiz, or calculator for bills.

A project is a task that is carried out to produce an original good, service, or outcome. The following are some of a project’s essential qualities –

  • A project has a beginning and an end. The extent of the project is defined. It has boundaries.
  • A project requires finite resources that are required to complete the project.
  • A project has a specific time frame. It has a definite beginning and end dates.
  • A project is complete when its end objectives are achieved. The objective is specific and identifiable.

Project Essentials and Tips

Phases in a Web Application Project

Web-based application development can be broadly divided into four phases. In the development

1) Requirements Definition Phase
2) Design Phase
3) Implementation Phase
4) Testing Phase

Requirement Definition Phase

In this phase we identify the problem statement for which the web application is to be developed.

Feasibility : Is the project feasible?
(i) Check whether the project is technically feasible (is it possible to do it?).
(ii) Check whether the project is economically feasible (is it profitable?).
(iii) If feasible, proceed further, otherwise there is no need to proceed with the project.

Scope : The focus is on “what” the application must do. To define the scope of the application,
(i) Compile a detailed list with a clear description of application features.
(ii) Establish the goals that the solution must achieve.
(iii) Recognizing the limitations that are placed on the project.

Operating Web Class 12 Notes

Design Phase

The focus is on “how” the application is to be designed. This consists of design of –

A Map of the Web Application Site – A site map for a web application comprises crucial details about the site’s structure, including the pages and the connections between them.

Database – Design the application database.

(i) Identify the database tables that will be required in the application.
(ii) Decide the table structures: For each table we need to identity the attributes of the tables, their data types, the size of the columns in the tables, the relationship between tables.

Page Structure – Design the structure of page. Identify the main sections of the page like header, main content and sidebar.

Implementation Phase

Create backend database, frontend and the connectivity between them.

Backend Database – Create the database and write SQL code defining tables, attributes and relationships, as per the requirement of the application.

Frontend – Identify the inputs that are required to be taken from the user in the Front-End of the application. Decide the kind of buttons you will provide to the user, to minimize the user’s typing effort, like, Radio buttons, checkbox, list and combo box.

Data Connectivity – Establish the data connectivity between the Front-End interface and Back-End Database.

Testing Phase

Test the front end and back end of the entire programme using various example data sets. Find and fix any application bug you can.

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

Database Concepts Class 12 Notes

Teachers and Examiners (CBSESkillEduction) collaborated to create the Database Concepts Class 12 Notes. All the important Information are taken from the NCERT Textbook Information Technology (802) class 12.

Database Concepts Class 12 Notes

What is Database?

A database is an organized collection of data that has been arranged and is typically kept electronically in a computer system. A database management system often oversees a database (DBMS).

database working properties

A database has the following properties:
1) A database is a representation of some aspect of the real world also called miniworld. Whenever there are changes in this miniworld they are also reflected in the database.
2) It is designed, built and populated with data for specific purpose.
3) It can be of any size and complexity.
4) It can be maintained manually or it may be computerized.

Need for a Database

Database management systems enable users to securely, efficiently, and quickly share data throughout an organization. A data management system offers quicker access to more accurate data by quickly responding to database requests.

Database approach – 

Data Redundancy – Data redundancy is the storing of the same data across many files. Space would be wasted as a result of this.

Data Inconsistency – If a file is modified, all the files that contain comparable information must also be updated, or the data will become inconsistent.

Lack of Data Integration – Because data files are unique, it is very challenging to obtain information from various files.

Database Management System (DBMS)

Data is stored, retrieved, and analyzed using software called database management systems (DBMS). Users can create, read, update, and remove data in databases using a DBMS, which acts as an interface between them and the databases.

DBMS Environment

The various operations that need to be performed on a database are as follows –

1. Defining the Database – It involves specifying the data type of data that will be stored in the database and also any constraints on that data.
2. Populating the Database – It involves storing the data on some storage medium that is controlled by DBMS.
3. Manipulating the Database – It involves modifying the database, retrieving data or querying the database, generating reports from the database etc.
4. Sharing the Database – Allow multiple users to access the database at the same time.
5. Protecting the Database – It enables protection of the database from software/ hardware failures and unauthorized access.
6. Maintaining the Database – It is easy to adapt to the changing requirements. Some examples of DBMS are – MySQL, Oracle, DB2, IMS, IDS etc.

Characteristics of Database Management Systems

Self-describing Nature of a Database System – A database system is said to as self-describing if it has metadata that defines and explains the data and relationships between tables in the database in addition to the database itself.

Insulation Between Programs and Data – Programs that access this data don’t need to be changed because the description of the data is stored separately in the database management system (DBMS) and any changes to the data’s structure are made in the catalogue. 

Sharing of Data – Multiple users can access the database. Therefore, a DBMS must have concurrency control software to provide concurrent access to the database’s data without encountering any consistency issues.

Types of Users of DBMS

Depending on their needs and how they interact with the DBMS, different types of users use the DBMS. Four main categories of users exist –

End Users – those who use the database to perform queries, make changes, and produce reports based on their requirements is a end users.

Database Administrator (DBA) – The DBA is incharge of authorising access, keeping an eye on how it’s being used, offering technical support, and acquiring hardware and software resources.

Application Programmers – To communicate with the database, application developers create application programmes. To communicate with the database, these programmes are created using high level languages like SQL.

System Analyst – A system analyst is important to the feasibility, technical, and economic elements of database architecture.

Advantages of using DBMS Approach

Following are the advantages of using a DBMS –

  1. Reduction in Redundancy – All the data is stored at one place. There is no repetition of the same data. This also reduces the cost of storing data on hard disks or other memory devices.
  2. Improved Consistency – The chances of data inconsistencies in a database are also reduced as there is a single copy of data that is accessed or updated by all the users.
  3. Improved Availability – Same information is made available to different users. This helps sharing of information by various users of the database.
  4. Improved Security – The DBA can protect the database by using passwords and restricting users’ database access rights.
  5. User Friendly – Because of its user-friendly interface, it reduces users’ dependence on computer specialists to carry out various data-related actions in a DBMS.

Limitations of using DBMS Approach

  1. High Cost – The cost of implementing a DBMS system is very high. It is also a very time consuming process. 
  2. Security and Recovery Overheads – Depending on the data stored, unauthorised access to a database can result in a threat to the individual or business. Additionally, regular data backups are necessary to guard against disasters like fires and earthquakes.

Relational Database

A collection of data elements with pre-established relationships between them make up a relational database. These things are arranged in a series of tables with rows and columns. To store data about the things that will be represented in the database, tables are utilised.

In relational model,

  1. A row is called a Tuple.
  2. A column is called an Attribute.
  3. A table is called as a Relation.
  4. The data type of values in each column is called the Domain.
  5. The number of attributes in a relation is called the Degree of a relation.
  6. The number of rows in a relation is called the Cardinality of a relation.

Relational Model Constraints

Constraints are limitations on the values that are stored in a database according to the specifications.

We describe below various types of constraints in Relational model –

Domain Constraint – User-defined columns called domain constraints allow users to enter values in accordance with the data type. Additionally, if it receives an incorrect input, it alerts the user that the column needs to be filled out correctly.

Key Constraint – A primary key constraint is a column or group of columns that shares the same characteristics as a unique constraint. Relationships between tables can be specified using a primary key and foreign key constraints.

Null Value Constraint – A column may by default contain NULL values. A column must not accept NULL values according to the NOT NULL constraint. This forces a field to always have a value, thus you cannot add a value to this field while adding a new record or updating an existing record.

Entity Integrity Constraint – The primary key cannot be null due to the Entity Integrity Constraint. Individual records in a table are identified by a primary key, and if the primary key is null, we are unable to do so. Except for the main key column, any place in the table can have null values.

Referential Integrity Constraint – Foreign key constraints or referential integrity constraints. A logical rule governing the values in one or more columns in one or more tables is known as a foreign key constraint, also known as a referential constraint or a referential integrity constraint. For instance, a group of tables presents details about the suppliers to a company.

Data types commonly used

Data typeMeaningExample
CHAR (n)Fixed length character string. ‘n’ is the number of characters.CHAR(5):“Ashok”
“Vijay”
VARCHAR(n)Variable length character string. ‘n’ is the maximum number of characters in the string.VARCHAR(15):
“Vijay Kumar”
“Ashok Sen”
DATEDate in the form of YYYY-MM-DDDATE: ‘2014-03-20’
INTEGERInteger number23
56789
DECIMAL (m, d)Fixed point number m represents the number of significant digits that are stored for values and d represents the number of digits that can be stored following the decimal point. If d is zero or not specified then the value does not contains any decimal part.DECIMAL(5,2) : 999.99
-567.78
DECIMAL (5) : 23456
99999

Structured Query Language (SQL)

RDBMS data management is done using the SQL language. It is made up of two languages: Data Definition Language (DDL) and Data Manipulation Language (DML), where DDL is a language used to specify the structure and restrictions of data and DML is used to add, alter, and delete data in a database.

Create a Database –

CREATE DATABASE School;

Create Table Command – 

CREATE TABLE<table name>
(
<column 1><data type> [constraint] ,
<column 2><data type>[constraint],
<column 3><data type>[constraint]
);

Question > Write a Query to Create a new table where the field will be Teacher_ID, First_Name, Last_Name, Gender, Date_of_Birth, Salary, Dept_No.

CREATE TABLE Teacher
(
Teacher_ID INTEGER,
First_Name VARCHAR(20),
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2),
Date_of_Birth DATE,
Dept_No INTEGER
);

Output –

Teacher_IDFirst_NameLast_NameGenderSalaryDate_of_BirthDept_No
Create Table using NOT NULL – An attribute value may not be permitted to be NULL.

CREATE TABLE TEACHER
(
Teacher_ID INTEGER,
First_NameVARCHAR(20) NOT NULL,
Last_NameVARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2),
Date_of_Birth DATE,
Dept_No INTEGER
);

Create Table using DEFAULT – If a user has not entered a value for an attribute, then default value specified while creating the table.

CREATE TABLE TEACHER
(
Teacher_ID INTEGER,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2) DEFAULT 40000,
Date_of_Birth DATE,
Dept_No INTEGER
);

Create a Table using CHECK – In order to restrict the values of an attribute within a range, CHECK constraint may be used.

CREATE TABLE TEACHER
(
Teacher_ID INTEGER,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2) DEFAULT 40000,
Date_of_Birth DATE,
Dept_No INTEGER CHECK (Dept_No<=110)
);

Create a Table using KEY CONSTRAINT – Primary Key of a table can be specified in two ways. If the primary key of the table consist of a single attribute, then the corresponding attribute can be declared primary key along with its description.

CREATE TABLE TEACHER
(
Teacher_ID INTEGER PRIMARY KEY,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2) DEFAULT 40000,
Date_of_Birth DATE,
Dept_No INTEGER
);

Create a Table using REFERENTIAL INTEGRITY CONSTRAINT – This constraint is specified by using the foreign key clause.

CREATE TABLE Teacher
(
Teacher_ID INTEGER PRIMARY KEY,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2) DEFAULT 40000,
Date_of_Birth DATE,
Dept_No INTEGER,
FOREIGN KEY (Dept_No) REFERENCES Department(Dept_ID)
);

Naming of Constraint

In the Create Table command, constraints can be named. The benefit is that using the Alter Table command, specified restrictions can be quickly altered or deleted. When naming a constraint, use the keyword CONSTRAINT followed by the constraint’s name and its specification.

For example consider the following Create Table command –

CREATE TABLE Teacher
(
Teacher_ID INTEGER,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2) DEFAULT 40000,
Date_of_Birth DATE,
Dept_No INTEGER,
CONSTRAINT TEACHER_PK PRIMARY KEY (Teacher_ID),
CONSTRAINT TEACHER_FK FOREIGN KEY (Dept_No) REFERENCES
Department(Dept_ID) ON DELETE SET NULL ON UPDATE SET NULL
);

In the above table, the primary key constraint is named as TEACHER_PK and the foreign key constraint is named as TEACHER_FK.

Drop Table Command

This command is used to delete tables. For example, suppose you want to drop the Teacher table then the command would be:

DROP TABLE Teacher CASCADE;

Thus Teacher table would be dropped and with the CASCADE option, i.e. all the constraints that refer this table would also be automatically dropped.

However if the requirement is that the table should not be dropped if it is being referenced in some other table then RESTRICT option can be used as shown below:

DROP TABLE Teacher RESTRICT;

Alter Table Command

Adding a column – Suppose we want to add a column Age in the Teacher table. Following command is used to add the column –

ALTER TABLE Teacher ADD Age INTEGER;

Dropping a column – A column can be dropped using this command but one must specify the options (RESTRICT or CASCADE) for the drop behavior. RESTRICT would not let the column be dropped if it is being referenced in other tables and CASCADE would drop the constraint associated with this column in this relation as well as all the constraints that refer this column.

ALTER TABLE Teacher DROP Dept_No CASCADE;

Dropping keys – A foreign key/primary key/key can be dropped by using ALTER TABLE command.

ALTER TABLE Teacher DROP FOREIGN KEY TEACHER_FK;

Adding a Constraint – If you want to add the foreign key constraint TEACHER_FK back, then the command would be –

ALTER TABLE Teacher ADD CONSTRAINT TEACHER_FK FOREIGN KEY (Dept_No) REFERENCES Department(Dept_ID) ON DELETE SET NULL ON UPDATE SET NULL;

Insert Command

This command is used to insert a tuple in a relation. We must specify the name of the relation in which tuple is to be inserted and the values. The values must be in the same order as specified during the Create Table command. For example, consider the following table Teacher:
CREATE TABLE Teacher
(
Teacher_ID INTEGER,
First_Name VARCHAR(20) NOT NULL,
Last_Name VARCHAR(20),
Gender CHAR(1),
Salary DECIMAL(10,2) DEFAULT 40000,
Date_of_Birth DATE,
Dept_No INTEGER,
CONSTRAINT TEACHER_PK PRIMARY KEY (Teacher_ID),
);

To insert a tuple in the Teacher table INSERT command can be used as shown below:
INSERT INTO Teacher VALUES (101,”Shanaya”, “Batra”, ‘F’, 50000, ‘1984-08-11’, 1);

Update Command

This command is used to update the attribute values of one or more tuples in a table.

UPDATE Teacher
SET Salary=55000
WHERE Teacher_ID=101;

Delete Command

In order to delete one or more tuples, DELETE command is used.

DELETE FROM Teacher
WHERE Teacher_ID=101;

Select Command

The SELECT Command is used to retrieve information from a database.

SELECT <attribute list>
FROM <table list>
WHERE <condition>

teacher table

1. Query – To retrieve all the information about Teacher with ID=101. In this query we have to specify all the attributes in the SELECT clause. An easier way to do this is to use asterisk (*), which means all the attributes.

SELECT *
FROM Teacher
WHERE Teacher_ID=101;

Output – 

t1

2. Query – To find the names of all teachers earning more than 50000.

SELECT First_Name,Last_Name
FROM Teacher
WHERE salary > 50000;

Output – 

t2

3. Query – To display Teacher_ID,First_Name,Last_Name and Dept_No of teachers who belongs to department number 4 or 7.

SELECT Teacher_ID,First_Name,Last_Name, Dept_No
FROM Teacher
WHERE Dept_No = 4 OR Dept_No = 7;

Output – 

t3

4. Query – To retrieve names of all the teachers and the names and numbers of their respective departments.
Note that the above query requires two tables – Teacher and Department. Consider the following query:

SELECT First_Name, Last_Name, Dept_ID, Dept_Name
FROM Teacher, Department;

5. Query – To retrieve names of all the teachers who belong to Hindi department.

SELECT First_Name, Last_Name
FROM Teacher, Department
WHERE Department. Dept_ID=Teacher. Dept_ID AND
Dept_Name=”Hindi”;

t4

6. Query – To retrieve names of all the teachers starting from letter ‘S’.

SELECT First_Name
FROM Teacher
WHERE First_Name LIKE “S%”;

Output – 

t5

7. Query – To retrieve names of all the teachers having 6 characters in the first name and starting with ‘S’

SELECT First_Name
FROM Teacher
WHERE First_Name LIKE “S_ _ _ _ _”;

Output – 

t6

8. Query – To retrieve names of all the teachers having at least 6 characters in the first name.

SELECT First_Name
FROM Teacher
WHERE First_Name LIKE “_ _ _ _ _ _%”;

Output – 

t7

9. Query – To list the names of teachers in alphabetical order.

SELECT First_Name, Last_Name
FROM Teacher
ORDER BY First_Name, Last_Name;

Output – 

t8

10. Query – To list the names of all the Departments in the descending order of their names.

SELECT Dept_Name
FROM Department
ORDER BY Dept_Name DESC;

Output – 

t9

11. Query – To retrieve the names and department numbers of all the teachers ordered by the Department number and within each department ordered by the names of the teachers in descending order.

SELECT First_Name, Last_Name, Dept_No
FROM Teacher
ORDER BY Dept_No ASC, First_Name DESC, Last_Name DESC;

Output – 

t10

12. Query – To retrieve all the details of those employees whose last name is not specified.

SELECT *
FROM Teacher
WHERE Last_Name IS NULL;

Output – 

t11

13. Query – To find total salary of all the teachers .

SELECT SUM(Salary) AS Total_Salary
FROM Teacher;

Output – 

t12

13. Query – To find the maximum and minimum salary.

SELECT MAX(Salary) AS Max_Salary, MIN(Salary) AS
Min_Salary
FROM Teacher;

Output – 

t13

14. Query – To count the number of teachers earning more than Rs 40000.

SELECT COUNT(Salary)
FROM Teacher
WHERE Salary > 40000;

Output – 

t14

15. Query – To retrieve the number of teachers in “Computer Science” Department.

SELECT COUNT(*) AS No_of_Computer_Science_Teachers
FROM Department, Teacher
WHERE Dept_Name = “Computer Science”AND Dept_No=Dept_ID;

Output – 

t15

Database concepts class 12 notes pdf

We are trying to provide Notes in PDF format as soon as possible.

Employability Skills Class 12 Notes

Employability Skills Class 12 MCQ

Employability Skills Class 12 Questions and Answers

Information Technology Class 12 802 Notes

Information Technology Class 12 802 MCQ

Information Technology Class 12 802 Questions and Answers

error: Content is protected !!