CBSE - MCQ Question Banks (के. मा. शि. बो . -प्रश्नमाला )

PreviousNext

Q. 191201 Current system date can be displayed by


A. SELECT date FROM dual;

B. SELECT date( );

C. SELECT getdate() FROM dual;

D. SELECT system_date;

Right Answer is: C

SOLUTION

The query SELECT getdate() FROM dual; will return current system date of our computer.


Q. 191202 Aggregate functions


A. give one result per group.

B. cannot be used with ORDER By clause.

C. can output only one function in a query.

D. do not take arguments.

Right Answer is: A

SOLUTION

The aggregate functions operate on aggregate of tuples. The results of an aggregate function is a single value. Some of the aggregate functions that SQL includes are avg, min, max, sum etc.


Q. 191203 Pattern matching is done using


A. characters  * and _

B. characters  * and %

C. characters % and _

D. characters  * and %

Right Answer is: C

SOLUTION

In order for patterns to include the special pattern characters (that is, %, _), SQL allows the specific of an escape character. The escape character is used immediately before a special pattern character to indicate that the special pattern character is to be treated as a normal character.


Q. 191204 The output can be seen in ascending order by


A. SELECT * FROM tab1;

B. SELECT * FROM tab1 ORDER BY marks ;

C. SELECT * FROM tab1 ORDER BY ASCENDING;

D. SELECT * FROM tab1 SET ORDER ASC ;

Right Answer is: B

SOLUTION

To sort the results or a query in a specific order, we use ORDER BY clause. The ORDER BY clause allows sorting of query results by one or more columns. The sorting can be done either in ascending or descending order, the default order is ascending.


Q. 191205 Relational operators


A. compare values in a condition.

B. combine the results of two conditions.

C. carry out arithmetic operations.

D. can carry out pattern matching.

Right Answer is: A

SOLUTION

To compare two values, a relational operator is used. The result of the comparison is true or false. The SQL recognizes following relational operators : =, >, <, >=, <=, <> (not equal to)


Q. 191206 Logical operators


A. compare values in a condition.

B. combine the results of two conditions.

C. carry out arithmetic operations.

D. can carry out pattern matching.

Right Answer is: B

SOLUTION

The logical operators OR, AND and NOT are used to connect search conditions in the WHERE clause.


Q. 191207 To disregard repeated entries we use


A. DISTINCT.

B. ALLOW REPEAT.

C. ALL.

D. NOT UNIQUE.

Right Answer is: A

SOLUTION

The DISTINCT keyword eliminates duplicate rows from the results of a SELECT statement.


Q. 191208 A UNIQUE constraint will


A. not allow duplicate values in a column.

B. allow only one column in the table.

C. apply only to Primary key column.

D. allow only unique rows in a table.

Right Answer is: A

SOLUTION

Unique constraint ensures that no two rows have the same value in the specified column(s). This constraint can be applied only to columns that have also been declared NOT NULL, however, this condition is implementation dependent.


Q. 191209 In SQL, NULL is a


A. name of the table.

B. comment.

C. special keyword.

D. data type.

Right Answer is: C

SOLUTION

NULL is a special keyword in SQL that depicts an empty value. A column having NULL is not empty but stores an empty value. Two NULLs cannot be added, subtracted or compared.


Q. 191210 The data type of a column storing date of admission should be


A. number.

B. char.

C. date.

D. text.

Right Answer is: C

SOLUTION

The date data type stores year, month and day values.


Q. 191211 Data Dictionary is


A. data types and meanings.

B. keywords and meanings.

C. data about data.

D. list of data operations.

Right Answer is: C

SOLUTION

A data dictionary is a file that contains "metadata" i.e., "data about data".


Q. 191212 Examples of DCL statements are


A. SELECT and UPDATE.

B. SELECTand CREATE.

C. CREATE and DELETE.

D. GRANTand REVOKE.

Right Answer is: D

SOLUTION

Data control language (DCL) refers to the subgroup of SQL statements that controls access to database objects and data. These statements begin with one of the following keywords: GRANT, or REVOKE.


Q. 191213 Examples of DDL statements are


A. SELECT, INSERT and UPDATE.

B. CREATE, DROP and ALTER TABLE.

C. SELECT, INSERT and CREATE.

D. CREATE, INSERT and DROP.

Right Answer is: B

SOLUTION

The DDL provides a set of definitions to specify the storage structure and access methods used by the database system.


Q. 191214 Describe the Order By clause.
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

The ORDER BY clause  allows you to impose an order on your output. Using this clause will display your query results in a sorted manner, by one or more columns. The sorting can be done either in ascending or descending order, ascending being the default order.  When  writing the query, it is generally placed last.

The example below – 
         SELECT name, marks 
         FROM student 
         ORDER BY marks;  

displays output as –

          NAME           MARKS

Bina                60.5

Abhishek        65.5

Garima           78.8

Dhruv             79.5

Ankush           88.5

 

The output is in ascending order of marks.          

     
     
SELECT * 
FROM student
      ORDER BY name DESC;

 

The above query displays data in descending order of names i.e., alphabetically.


Q. 191215 Describe the Primary Key constraint used on a table.
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

The Primary Key uniquely identifies each row.  It can not have NULL values or repeated values in it.  A table can have only one Primary Key.  When it is placed as a constraint on a column (or a set of columns), the column has to store values in keeping with these rules. 

Example :               CREATE TABLE student (rollno number (2) NOT NULL PRIMARY KEY,
                            name char(15), marks number(5,1),  grade char(1), class char(5));   


Q. 191216 How can rows be inserted into a table from another table ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Data rows are added to a table using the INSERT command. INSERT command can also be used to take values from one table and add them to another.  In place of the values clause, an appropriate query is given and the resulting rows are added into the target table.  

Example :  INSERT INTO  temp SELECT name, class
                 FROM student
WHERE marks>75;  

Here, rows where marks > 75 will be considered from table STUDENT and the NAME and CLASS columns will be inserted into table TEMP.  
To insert using a query, keep in mind that :
(i) Both the tables must be already created.
(ii)The columns of the tables being inserted into, must match the columns output by the sub query.

 


Q. 191217 Describe the Primary Key constraint used on a table ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

The Primary Key uniquely identifies each row.  It can not have NULL values or repeated values in it.  A table can have only one Primary Key.  When it is placed as a constraint on a column (or a set of columns), the column has to store values in keeping with these rules.  
Example : CREATE TABLE student (rollno number (2) NOT NULL PRIMARY KEY, name char(15), marks number(5,1),  grade char(1), class char(5));


Q. 191218 How can a table be created from an existing table ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

A new table can be created from an existing one by using the CREATE and SELECT statements in a query.   
Example :
 

CREATE TABLE newtab AS ( SELECT EmpCode, ProjCode FROM employ WHERE Job = ‘Manager’); 
Table newtab will have 2 columns, EmpCode and ProjCode, and data picked up from rows where Job was Manager, in the table employ. If the WHERE clause is left out, data from all the rows will be inserted.


Q. 191219 Give the SQL statement to create a table EMPLOYEE with the structure as given below -
 
EmpCode                  4 digit number EmpName                 up to 10 characters long Job                             up to 10 characters long Salary                       7 digits including 2 decimal digits ProjCode                   6 characters  
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

CREATE TABLE employee (EmpCode number(4), EmpName varchar2(10), Job varchar2(10), Salary number(7,2), ProjCode varchar2(6));


Q. 191220 What is the difference between WHERE and HAVING clause ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

The HAVING clause places conditions on groups in contrast to WHERE clause that places conditions on individual rows. While WHERE conditions cannot include aggregate functions, HAVING condition can do so.

This means you can not do some thing like the following-

SELECT Grade, MAX(marks) FROM student WHERE MAX(marks)>75 GROUP BY Grade;

 
WHERE would apply to individual rows like –

SELECT Grade, marks FROM student WHERE marks>75;  

To see the maximum marks for each grade, if over 75, you would use the HAVING clause. The HAVING clause defines the criteria to select the output of certain groups.  
SELET Grade, MAX (marks) FROM student GROUP BY grade Having MAX (marks)>75;


Q. 191221 What is a view?  How is it different from a table?  What are the advantages of using views?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

A view is a logical table that contains no data of its own. Its contents are taken from other tables through the execution of a query.The table on which  a view is based is called a base table. Views are like windows through which you view information that is actually stored in a base table. 


Advantages of using a VIEW – 

1)Views display data selectively and so restrict access to data.

2)Views are used to get results of complicated queries, especially where multiple tables are used.

3)One view can be used to display data from several tables.


Q. 191222 What are the different operators and how are they used in SQL statements?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

At times, you would like to see only certain rows according to your requirement instead of all the rows all the time. The WHERE clause lets you give a condition which restricts the rows.  

While specifying the condition, operators are used. There are three types of operators –

¨       Relational Operators

¨       Logical operators

¨       Special operators

 

Relational Operators are used for comparison between two values. 

 

Operator

Meaning

=

Equal to

>

Greater than

>=

Greater than or equal to

<

Less than

<=

Less than or equal to

<>

Not equal to

 

Example

SELECT * FROM student

WHERE marks>75;

 

Here, output rows will be selected based on the condition marks>75,  > being a relational operator.

 

Logical Operators are used to combine two or more conditions to produce a single result. The conditions are evaluated to True or False and a row is considered only if the final result is True. Logical operators may also be used to negate the results of a single condition.  

 

Operator

Meaning

AND

Returns True if both component conditions are True

OR

Returns True if any one  component condition is True

NOT

Returns True if the condition is False

 

Example

SELECT * FROM student

WHERE grade=’A’ AND class='XII A';

 

Here, the first condition is  grade = ‘A’  and the second condition is class='XII A'.  The AND between them means that all the rows for which both conditions are true will be part of the result.

 

Example

SELECT * FROM student

WHERE grade=’A’ OR class='XII A';

 

Here, the first condition is  grade = ‘A’  and the second condition is class='XII A’.  The OR between them means that all the rows for which any one condition is true will be part of the result.   

 

Example

SELECT * FROM student

WHERE NOT grade='A'

 

Here, the condition  grade = ‘A’  is to be negated.  The rows where grade is not ‘A’ are seen in the output.

 

Special operators are used to give other comparison conditions.

 

Operator

Meaning

BETWEEN … AND …

Between two values (inclusive)

IN (set)

Match any value in the list

LIKE

Match a character pattern

IS NULL

Is a null value

 

Using BETWEEN:- It displays rows based on a range of values.

 

Example

SELECT * FROM student

WHERE marks BETWEEN 75 AND 90;

 

The output will be rows that have the value for column marks between 75 and 90.

 

Using IN:- It tests for a value in a specified set of values.

 

Example

      SELECT * FROM student

WHERE name IN(‘Brij’, ‘Dhruv’, ‘Anu’, ‘Surbhi’);

The output rows have the value in column name as one of those given in the list within parenthesis.

 

Using  LIKE:- LIKE can be applied only to columns of  CHAR datatype.  LIKE searches  character data to see if part of it matches a pattern .  Two symbols are used to make the search string –

%(Percent)      - it represents any sequence of zero or more characters.

_(Underscore)  - it represents any single character

To look at the details of all students whose name starts with ‘A’ we can give –


SELECT *
FROM student

WHERE name LIKE ‘A%’;

 

Here, we have specified only ‘A’ which may be followed by any character, as implied by the % sign.

 

To look at the details of all students whose name starts with an unknown letter but is followed by ‘aurav’  we can give –

SELECT * FROM student

WHERE name LIKE ‘_aurav’;


Q. 191223 What is a view?  How is it different from a table and what are the advantages of using views?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

A view is a logical table that contains no data of its own. Its contents are taken from other tables through the execution of a query. As the values in those tables change, so automatically, will the values in the view.  
 

The table on which  a view is based is called a base table.  Views are like windows through which you view information that is actually stored in a base table. 

Advantages of using a VIEW –

·    Views display data selectively and so restrict access to data

·    Views are used to get results of complicated queries, especially where multiple tables are used.

·    One view can be used to display data from several tables.            


Q. 191224 What are DDL, DML and DCL?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Data Definition Language (DDL) is one of the major components of the Structured Query Language (SQL). It is used to create data structures like databases, tables, views and indexes. Some of the commands comprising DDL are CREATE TABLE, DROP TABLE and CREATE INDEX.

Data Manipulation Language (DML) is a category of SQL used to manipulate data – query, insert, update etc.  Examples of DML commands are SELECT, INSERT, DELETE.

Data Control Language DCL is a subset of SQL, used to control access to data in a database. Examples of DCL commands include:  GRANT - to allow specified users to perform specified tasks, REVOKE to cancel previously granted or denied permissions.

 


Q. 191225 What are DDL, DML and DCL ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Data Definition Language (DDL)  is one of the major components of the Structured Query Language (SQL). It is used to create data structures like databases, tables, views and indexes. Some of the  commands comprising DDL are CREATE TABLE, DROP TABLE and CREATE INDEX.  
Data Manipulation Language (DML) is a category of SQL used to manipulate data – query, insert, update etc.  Examples of DML commands are : SELECT, INSERT, DELETE .  
Data Control Language (DCL) is a subset of SQL, used to control access to data in a database. Examples of DCL commands include: GRANT - to allow specified users to perform specified tasks,  REVOKE to cancel previously granted or denied permissions.  


Q. 191226 How is pattern matching carried out using SQL statements ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

LIKE searches character data to see if part of it matches a pattern . The character pattern-matching operation is called wildcard search.  Two symbols are used to make the search string – 
%  - it represents any sequence of zero or more characters.

 _  - it represents any single character.

To look at the details of all students whose name starts with ‘A’ we can give:

SELECT *FROM studentWHERE name LIKE ‘A%’ ;

Output –

ROLLNO

NAME

MARKS

GRADE

CLASS

2

Ankur

88.5

A

XII A

3

Abhinav

65.5

B

XII A

 

The query gives ‘A%’  as a pattern to match in column name - ‘A’ which may be followed by any character.

 

To look at the details of all students whose name starts with one unknown letter that is followed by ‘aurav’  we can give – 

SELECT *FROM studentWHERE name LIKE ‘_aurav’;

Output –

ROLLNO

NAME

MARKS

GRADE

CLASS

9

Gaurav

78.8

A

XII B

11

Saurav

77.7

B

XII C

The underscore character, ‘_’, represents one character, followed by ‘aurav’.


Q. 191227 Describe the Order By clause.
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

The ORDER BY clause allows you to impose an order on your output. Using this clause, will display your query results in a sorted manner, by one or more columns. The sorting can be done either in ascending or descending order, ascending being the default order. When writing the query, it is generally placed last.  

Example :–

SELECT name, marks FROM student ORDER BY marks;  

Displays output as – 
NAME          MARKS

Brij                60.5

Abhinav          65.5

Gaurav           78.8

Dhruv            79.5

Ankur            88.5


The output is in ascending order of marks.          


SELECT * 
FROM student ORDER BY name DESC; 

The above query displays data in descending order of names i.e., alphabetically.


Q. 191228 What is a ‘Constraint’?   Discuss the different constraints in brief.
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Constraint is a restriction or a check that is applied to the columns of the table. They prevent invalid data entry into tables as the data they store must satisfy the checks or conditions placed. Constraints are specified when the table is defined. Constraints may be defined at the column level or the table level.

Some commonly used constraints that may be applied are – 

  NOT NULL                - column cannot contain null values
  UNIQUE                   - value must be unique in all rows
  PRIMARY KEY           -  uniquely identifies each row
  FOREIGN KEY           - establishes a relationship between columns of 
different tables.
  CHECK                    - gives a condition that must be true

          
          CREATE TABLE student
          (rollno number (2) NOT NULL PRIMARY KEY, name char(15),
          marks number(5,1) CHECK (marks >25),  grade char(1),
          class char(5) DEFAULT = ‘KG’);

 

On giving this command, a table named STUDENT will be created. When data is entered, it will not allow BLANK OR duplicate values in ROLLNO column, marks should be greater than 25  and  default value for class will be ‘KG’. Here, we have applied column level constraints. 

To apply constraint to the table as a whole, put it at the end of the table definition.

          
           CREATE TABLE employee (empcode number (4) NOT NULL,
           name char(15), salary number(5,1),  dept char(4),
           joindate date, birthdate date, CHECK ( joindate > birthdate);

 

On giving this command, a table named EMPLOYEE will be created. When data is entered, it will not allow BLANK values in empcode column and ensure that joining date is after date of birth.


Q. 191229 Give the name and purpose of the different aggregate functions used in SQL ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Aggregate  functions are applied to all rows in a table or to a subset of the table specified by a WHERE clause. Aggregate functions produce a single value for the entire group of table entries. These functions are :
COUNT produces the number of rows.

SUM produces the arithmetic sum of all selected values of a given column.

AVG produces the average (mean) of all selected values of a given column.

MAX produces the largest of all selected values of a given column.

MIN produces the smallest of all selected values of a given column.

Aggregate functions are used like column names in the SELECT clause of queries. The functions SUM and AVG are used only with numeric columns.  COUNT, MAX, MIN can be used with numeric, date or character.

The name of the column on which the function is to be applied, is placed within parenthesis. Give only one column within a pair of parenthesis at a time. To use more than one  function, write them and separate them  by commas. To apply the same function to many columns, repeat the function giving a different column name every time in the same statement.


Q. 191230 Give the name and purpose of the different aggregate functions used in SQL.
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Aggregate  functions are applied to all rows in a table or to a subset of the table specified by a WHERE clause. Aggregate functions produce a single value for the entire group of table entries. These functions are : 

Ø       COUNT produces the number of rows

Ø       SUM produces the arithmetic sum of all selected values of a given column

Ø       AVG produces the average (mean) of all selected values of a given column

Ø       MAX produces the largest of all selected values of a given column

Ø       MIN produces the smallest of all selected values of a given column

Aggregate functions are used like column names in the SELECT clause of queries. The functions SUM and AVG are used only with numeric columns. COUNT, MAX, MIN can be used with numeric, date or character.

 

The name of the column on which the function is to be applied, is placed within parenthesis. Only one column within a pair of parenthesis should be given at a time. To use more than one function, write them and separate them by commas. To apply the same function to many columns, repeat the function giving a different column name every time in the same statement.


Q. 191231 What are the different operators and how are they used in SQL statements ?
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

At times, you would like to see only certain rows according to your requirement instead of all the rows all the time. The WHERE clause lets you give a condition which restricts the rows.  
While specifying the condition, operators are used. There are three types of operators –

Relational Operators

Logical operators

Special operators  

Relational Operators are used for comparison between two values. 

 

Operator

Meaning

=

Equal to

>

Greater than

>=

Greater than or equal to

<

Less than

<=

Less than or equal to

<>

Not equal to

 

Example

SELECT * FROM student

WHERE marks>75;

 

Here output rows will be selected based on the condition marks>75,  > being a relational operator.

 

Logical Operators are used to combine two or more conditions to produce a single result. The conditions are evaluated to True or False and a row is considered only if the final result is True. Logical operators may also be used to negate the results of a single condition.  

 

Operator

Meaning

AND

Returns True if both component conditions are True

OR

Returns True if any one  component condition is True

NOT

Returns True if the condition is False


Example:-

SELECT *FROM student

WHERE grade=’A’ AND class=’XII A’;


Here, the first condition is  grade = ‘A’  and the second condition is class=’XII A’. The AND between them means that all the rows for which both conditions are true will be part of the result.

 

Example:-

SELECT * FROM student

WHERE grade=’A’ OR class=’XII A’;

 

Here, the first condition is  grade = ‘A’  and the second condition is class=’XII A’. The OR between them means that all the rows for which any one condition is true will be part of the result.  

 

Example:-

SELECT *FROM student

WHERE NOT grade=’A’ ;

Here, the condition  grade = ‘A’  is to be negated. The rows where grade is not ‘A’ are seen in the output.

Special operators are used to give other comparison conditions.

 

Operator

Meaning

BETWEEN … AND …

Between two values (inclusive)

IN (set)

Match any value in the list

LIKE

Match a character pattern

IS NULL

Is a null value


Using BETWEEN

It displays rows based on a range of values.

 

Example:-

SELECT *FROM student

WHERE marks BETWEEN 75 AND 90;

 

The output will be rows that have the value for column marks between 75 and 90.

 

Using IN

It tests for a value in a specified set of values.

 

Example

SELECT *FROM student

WHERE name IN(‘Brij’, ‘Dhruv’, ‘Anu’, ‘Surbhi’);


The output rows have the value in column name as one of those given in the list within parenthesis.

 

Using  Like

LIKE can be applied only to columns of  CHAR datatype.  LIKE searches  character data to see if part of it matches a pattern .  Two symbols are used to make the search string –

% - it represents any sequence of zero or more characters.

_ - it represents any single character


To look at the details of all students whose name starts with ‘A’ we can give –

SELECT *FROM student

WHERE name LIKE ‘A%’;


Here, we have specified only ‘A’ which may be followed by any character, as implied by the % sign.

To look at the details of all students whose name starts with an unknown letter but is followed by ‘aurav’  we can give –

SELECT *FROM student

WHERE name LIKE ‘_aurav’; 


Q. 191232 What is a Constraint? Discuss the different constraints in brief.
A. SELECT, INSERT and UPDATE.
B. CREATE, DROP and ALTER TABLE.
C. SELECT, INSERT and CREATE.
D. CREATE, INSERT and DROP.

Right Answer is:

SOLUTION

Constraintis a restriction or a check that is applied to the columns of the table. They prevent invalid data entry into tables as the data they store must satisfy the checks or conditions placed.  Constraints are specified when the table is defined.  Constraints may be defined at the column level or the table level. 
Some commonly used constraints that may be applied are –  
          NOT NULL            - column cannot contain null values 

          UNIQUE               - value must be unique in all rows

          PRIMARY KEY       - uniquely identifies each row

          FOREIGN KEY       - establishes a relationship between columns of different tables.
          CHECK                - gives a condition that must be true.

 
CREATE TABLE student
(rollno number (2) NOT NULL PRIMARY KEY,
 name char(15),
 marks number 5,1)          
 CHECK (marks >25), 
 
grade char(1),
 class char(5) DEFAULT = ‘KG’);
 

On giving this command, a table named STUDENT will be created.  When data is entered, it will not allow BLANK OR duplicate values in ROLLNO column, marks should be greater than 25  and  default value for class will be ‘KG’.  Here, we have applied column level constraints. 

To apply constraint to the table as a whole, put it at the end of the table definition.

CREATE TABLE employee
(empcode number (4) NOT NULL,
 name char(15), salary number(5,1),
 dept char(4),
 joindate date,
 birthdate date,
 CHECK ( joindate > birthdate);
On giving this command, a table named EMPLOYEE will be created.  When data is entered, it will not allow BLANK values in empcode column, and ensure that joining date is after date of birth.


Q. 191233 The OR gate


A. outputs 1 if any input is 1.

B. outputs 1 only if all inputs are 1.

C. outputs 0 if any input is 0.

D. outputs 0 if all inputs are 1.

Right Answer is: A

SOLUTION

The OR gate has two or more input signals but only one output signal. If any of the input signals is 1, the output signal is 1.


Q. 191234 To eliminate redundant data, we use


A. DISTINCT.

B. NO REPEAT.

C. DEFAULT.

D. NOT UNIQUE.

Right Answer is: A

SOLUTION

The DISTINCT keyword eliminates duplicate rows from the results of a SELECT statements.The syntax is:- SELECT DISTINCT city FROM Suppliers;


Q. 191235 The data type of a column storing names should be


A. number.

B. char.

C. date.

D. text.

Right Answer is: B

SOLUTION

To store alphanumeric text such as letters, numbers, spaces, symbols and punctuation, use the Character data type.


Q. 191236 SQL statements are an example of


A. DDL.

B. DCL.

C. DML.

D. TCL.

Right Answer is: C

SOLUTION

Individual SQL statements are declarative as they describe what the program should accomplish.


Q. 191237 DCL stands for


A. Data Control Language.

B. Data Convert Language.

C. Dynamic Control Language.

D. Dynamic Convert Language.

Right Answer is: A

SOLUTION

It is a computer language which is used to control the access to data in a database. The examples of DCL Commands are: GRANT and REVOKE.


Q. 191238 DML stands for


A. Data Markup Language.

B. Data Manipulation Language.

C. Dynamic Markup Language

D. Dynamic Mapping Language.

Right Answer is: B

SOLUTION

It is used to insert, delete and update data in database.


Q. 191239 DDL stands for


A. Dynamic Data Language.

B. Data Delimiting Language.

C. Data Definition Language.

D. Detailed Data Language.

Right Answer is: C

SOLUTION

DDL is a computer language for defining data structures. The result of compilation of DDL statements is a set of tables which are stored in a special file called data dictionary (or directory).


Q. 191240 SQL stands for


A. Simple Questioning Language.

B. Sequential Query Language.

C. Simple Query Language.

D. Structured Query Language.

Right Answer is: D

SOLUTION

It is a database computer language designed for managing data in relational database mangement system.


Q. 191241 IN operator is used to specify


A. list of values.

B. list of commands.

C. list of NULL.

D. none of these.

Right Answer is: A

SOLUTION

In SOL, there are different operators that you can use in the expressions. IN opearator is used to find out the list of values.It selects values that match any value in a given list of values.


Q. 191242 Data dictionary is


A. data types and meanings.

B. keywords and meanings.

C. data about data.

D. list of data operations.

Right Answer is: C

SOLUTION

Data dictionary is a "centralised repository of information about data such as meaning, relationships to other data, origin, usage and format." Data dictionary is the file that contains "metadata". i.e., data about data.


Q. 191243 A view is a


A. table that physically exists.

B. physical table, where trigger and index can be defined.

C. virtual table, where trigger and index can be defined.

D. virtual table, where trigger and index can not be defined.

Right Answer is: D

SOLUTION

A SQL view is a virtual table, which is based on SQL SELECT query.It does not really exist in its own right but is instead derived from one or more underlying base tables.


Q. 191244 The correct statement is :


A. A table can have only one column with unique values.

B. There can be only one Primary Key for a table.

C. By default output is displayed in ascending order.

D. Aggregate functions work on individual rows.

Right Answer is: B

SOLUTION

The primary key of a relational table is unique, which identifies each record in a table. There cannot be more than one primary key in a table.


Q. 191245 A new column can be added to the table by


A. MODIFY command.

B. ALTER STRUCT command.

C. TABLE command.

D. ALTER TABLE command.

Right Answer is: D

SOLUTION

The ALTER TABLE statement allows you to rename an existing table. It can also be used to add, modify or drop a column from an existing table.


Q. 191246 The statement to display only NAME and PRICE of all rows from table ITEM is


A. SELECT * from item ;

B. SELECT name, price from item ;

C. SELECT name, price from table item ;

D. SELECT name, price from tablename item ;

Right Answer is: B

SOLUTION

Here, 'name' and 'price' are the column names and 'item' is the name of the table.


Q. 191247 One big advantage of views is that


A. data can be discarded easily.

B. constraints can be discarded.

C. data can be displayed selectively.

D. data can be viewed in sequence.

Right Answer is: C

SOLUTION

The main advantage of using view is that it increases the accessing speed, as data can be displayed selectively.


Q. 191248 DDL stands for


A. Dynamic Data Language.

B. Data Delimiting Language.

C. Data Definition Language.

D. Detailed Data Language.

Right Answer is: C

SOLUTION

The DDL (Data Definition Language) provides a set of definitions to specify the storage structure and access methods used by the database system. It provides statements for the creation and deletion of tables and indexes.


Q. 191249 The number of columns that are presented after executing this query
 SELECT address1
A. 1.
B. 2.
C. 3.
D. 0.

Right Answer is: A

SOLUTION

Only one column appears as || is the concatenation operator.


Q. 191250 Before a table is dropped,


A. it must be completely filled.

B. it should have some data.

C. it should have data in one row and one column.

D. it must be empty.

Right Answer is: D

SOLUTION

The DROP table command of SQL lets us drop a table from the database. The SQL requires us to empty a table before we eleminate from the database. But there is a condiiton for dropping a table ; it must be an empty table.


Q. 191251 To display the average salary of employees with grades 'E2' or 'E4', the sql command is


A. SELECT avg(salary) FROM employee WHERE (grade='E2' OR grade='E4');

B. SELECT avg(salary WHERE (grade='E2' OR grade='E4');

C. DISPLAY avg(salary) FROM employee WHERE (grade='E2' OR grade='E4');

D. SELECT avg(salary) FROM employee HAVING (grade='E'’ AND grade='E4');

Right Answer is: A

SOLUTION

AVERAGE is an aggregate function used in SQL and is used with WHERE clause.


Q. 191252 A table can be deleted if


A. it has only one column.

B. it does not have Primary Key.

C. it is empty.

D. it does not have null values.

Right Answer is: C

SOLUTION

To remove all the rows from the table, we use DELETE command. A table with rows in it cannot be dropped.


Q. 191253 Give the statement to display the number of employees with job as ‘Clerk’ from table EMPLOYEE ?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

SELECT COUNT(EmpName)
FROM Employee
WHERE Job = ‘Clerk’ ;


Q. 191254 What is NULL ?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

Null is a keyword implying an empty value. Two NULLs cannot be added, subtracted or compared. A NULL can not be equated with 0 or blank spaces. 
To use it in a query, write it as given below – 
SELECT * FROM student
WHERE grade IS NULL;


Q. 191255 How is pattern matching carried out using SQL statements?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

LIKE searches character data to see if any part of it matches a pattern. The character pattern-matching operation is called wildcard search. Two symbols are used to make the search string–

 

%(Percent)       - it represents any sequence of zero or more characters.

_(Under Score)  - it represents any single character.

To look at the details of all students whose name starts with ‘A’, we can give:

SELECT * FROM student

WHERE name LIKE ‘A%’ ;

Output –

ROLLNO

NAME

MARKS

GRADE

CLASS

2

Ankur

88.5

A

XII A

3

Abhinav

65.5

B

XII A

 

The query gives ‘A%’  as a pattern to match in column name - ‘A’ which may be followed by any character.

 

To look at the details of all students whose name starts with one unknown letter that is followed by ‘aurav’, we can give –

SELECT * FROM student

WHERE name LIKE ‘_aurav’;

Output –

ROLLNO

NAME

MARKS

GRADE

CLASS

9

Gaurav

78.8

A

XII B

11

Saurav

77.7

B

XII C

The underscore character, ‘_’, represents one character, followed by ‘aurav’.  


Q. 191256 Give the statement to display the number of employees with job as ‘Clerk’  from table EMPLOYEE.
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

SELECT COUNT(EmpName)
FROM Employee
where Job = ‘Clerk’;

 


Q. 191257 Write a query on table EMP to display output as below-   

EmpName      is on Project              ProjCode Raman            is on Project              Del112 Saran              is on Project              Jai122
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

SELECT EmpName, ' is on Project ', ProjCode  FROM emp;


Q. 191258 What is NULL?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

Null is a keyword implying an empty value. Two NULLs cannot be added, subtracted or compared. A NULL can not be equated with 0 or blank spaces. To use in query, write it as given below – 
 

          SELECT * FROM student

              WHERE grade IS NULL;


Q. 191259 What is Data Dictionary?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

A Data Dictionary is a database containing data about all the databases and objects therein, that make up a database system. It is often thought of as “data about the data” or “metadata”.


Q. 191260 Write a query on table EMP to display output as below- 
EmpName is on Project    ProjCode Raman is on Project               Del112 Saran  is on Project                Jai122
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

SELECT EmpName, 'is on Project', ProjCode  FROM emp;


Q. 191261 Give the statement to add a row of data to table EMPLOYEE as given -  ‘A101’ as Empcode, ‘Shyam’ as Empname, ‘Clerk’ as Job, 5000 as Salary and ‘LUC222’ as ProjCode .
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

INSERT INTO employee (EmpCode, EmpName, Job, Salary, ProjCode) VALUES(‘A101’, ‘Shyam’, ‘Clerk’, 5000, 'LUC222');


Q. 191262 What is the difference between – count(),  count(*),  count(code),  count(DISTINCT dept)  and  count(ALL dept)?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

They are as follows:-
count() – is a function to count, non null values in a column.
count(*) – to count the number of rows in a table. 
count(code) –  to count the number of Non-null values in column code .
count(DISTINCT dept) - to count the number of distinct entries, i.e. to count a   particular  entry only once even if it appears many times.
count(ALL dept) –  to count the number of non-null values in column dept, i.e. counting repetitions too.


Q. 191263 How is a table deleted?  Under what condition can a table be deleted ?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

Only empty tables can be deleted. We can remove the entire table and once removed, the table cannot be retrieved. The command to remove the table student permanently from the database is :
DROP TABLE student;


Q. 191264 Describe the Having clause ?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

The HAVING clause places conditions on groups in contrast to WHERE clause that places conditions on individual rows. While WHERE conditions cannot include aggregate functions, HAVING condition can do.

EXAMPLE:-   
SELET Grade, MAX (marks) FROM student GROUP BY grade Having MAX (marks) >75;

 


Q. 191265 What is Data Dictionary ?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

A Data Dictionary is a database containing data about all the databases and objects therein, that make up a database system. It is often thought of as “data about the data” or “metadata”.


Q. 191266 How can a table be created from an existing table?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

A new table can be created from an existing one by using the CREATE and SELECT statements in a query.  Example :


              CREATE TABLE newtab AS

              (

              SELECT EmpCode, ProjCode FROM employ WHERE Job = ‘Manager’
              );

 

Table newtab will have 2 columns, EmpCode and ProjCode and data picked up from rows where Job was Manager, in the table employ. If the WHERE clause is left out, data from all the rows will be inserted.


Q. 191267 How can rows be inserted into a table from another table?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

Data rows are added to a  table using the INSERT command. INSERT command can also be used to take values from one table and add them to another.  In place of the values clause, an appropriate query is given and the resulting rows are added into the target table. 


Example :

 

         INSERT INTO   temp

         SELECT name, class

         FROM student

         WHERE marks>75;

 

Here, rows where marks > 75 will be considered from table STUDENT and the NAME and CLASS columns will be inserted into table TEMP. 


To insert using a query, keep in mind that :

(i) Both the tables must be already created.
(ii)The columns of the tables being inserted into, must match the columns output by the sub query.


Q. 191268 Give the statement to add a row of data to table EMPLOYEE as given-
‘A101’ as Empcode, ‘Shyam’ as Empname, ‘Clerk’ as Job, 5000 as Salary and ‘LUC222’ as ProjCode.
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

INSERT INTO employee (EmpCode, EmpName, Job, Salary, ProjCode) VALUES (‘A101’, ‘Shyam’, ‘Clerk’, 5000, 'LUC222’);


Q. 191269 What is the difference between – count(),  count(*),  count(code),  count(DISTINCT dept)  and  count(ALL dept)?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

The functions can be distinguished as follows:

  1. count() – is a function to count, it needs an argument.
  2. count(*) – to count the number of rows in a table.
  3. count(code) –  to count the number of non-null values in column code.
  4. count(DISTINCT dept)   - to count the number of distinct entries, i.e. to count a   particular  entry only once even if it appears many times.
  5. count(ALL dept) –  to count the number of non-null values in column dept, i.e. counting repetitions too.


Q. 191270 Give the SQL statement to create a table EMPLOYEE with the structure as given below -                                                                                        
            EmpCode                  4 digit number EmpName                 up to 10 characters long Job                             up to 10 characters long Salary                        7 digits including 2 decimal digits             ProjCode                    6 characters
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

                         CREATE TABLE employee
                               (EmpCode number(4), EmpName char(10), 
                               Job char(10), Salary number(7,2), 
                               ProjCode char(6));


Q. 191271 How is a table deleted?  Under what condition can a table be deleted?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

We can not delete a table until it is empty as we can delete only empty tables. We can remove the entire table using DROP TABLE command. Once a table is removed, it cannot be retrieved. The command to remove the table student permanently from the database is:

                 DROP TABLE student;                    


Q. 191272 What is the difference between WHERE and HAVING clause?
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

The HAVING clause places conditions on groups in contrast to WHERE clause that places conditions on individual rows. While WHERE conditions cannot include aggregate functions, HAVING condition can do so.

This means we can not do some thing like the following-

 

   SELECT Grade, MAX(marks)

   FROM student

          WHERE MAX(marks)>75 

   GROUP BY Grade;

 

WHERE would apply to individual rows like –

 

   SELECT Grade, marks

   FROM student

          WHERE marks>75  ;

 

 

To see the maximum marks for each grade, if over 75, you would use the HAVING clause. The HAVING clause defines the criteria to select the output of certain groups.

 

   SELET Grade, MAX(marks)

   FROM student

   GROUP BY grade

          Having MAX (marks)>75;         


Q. 191273 Describe the Having clause.
A. it has only one column.
B. it does not have Primary Key.
C. it is empty.
D. it does not have null values.

Right Answer is:

SOLUTION

The HAVING clause places conditions on groups in contrast to WHERE clause that places conditions on individual rows. While WHERE conditions cannot include aggregate functions, HAVING condition can.

       SELET Grade, MAX (marks)

FROM student
GROUP BY grade

       Having MAX (marks)>75;


Q. 191274 the decision which results into either YES(TRUE) or NO(FALSE) is called


A. Unary decision

B. Ternary decision

C. Binary decision

D. redundant decision

Right Answer is: C

SOLUTION

Binary decision results either into YES(TRUE) or the NO(FALSE). There are only two possible answers.


Q. 191275 In Boolean expression a single variable or complement of variable is known as


A. Constant

B. Literals

C. Qualifier

D. None of these

Right Answer is: A

SOLUTION

Boolean Expression is combination of variables and complement of variables.A single variable or complement of variable is known as Literal.


Q. 191276 The Boolean expression which is algebraically complete is


A. F=xy.

B. F=x+y.

C. F=x’.

D. F=x+y’.z.

Right Answer is: D

SOLUTION

F(x,y,z)= x+y’.z can generate AND, OR and NOT functions. Therefore, this expression is algebraically complete.


Q. 191277 A literal is


A. a Boolean element.

B. a complement of boolean variable.

C. a notation for representing a fixed value in source code.

D. an actual understanding of Boolean expression.

Right Answer is: C

SOLUTION

A literal is some specific piece of data, taken literally from a computer system.


Q. 191278 The difference between the distributive laws of Boolean algebra and the distributive laws of ordinary algebra is


A. first distributive law of Boolean algebra is not available in the ordinary algebra.

B. first indempotent law of Boolean algebra is not available in the ordinary algebra.

C. second distributive law of Boolean algebra is not available in the ordinary algebra.

D. first commutative law of Boolean algebra is not available in the ordinary algebra.

Right Answer is: C

SOLUTION

The distributive law states that:  X.(Y+Z) = X.Y +X.Z and X+Y.Z = (X+Y).(X+Z).The second distributive law of the Boolean algebra is not available in the ordinary algebra.


Q. 191279 The Involution law states that


A. (X’)’ = X’.

B. (X’) = X.

C. (X)’ = X.

D. (X’)’ = X.

 

Right Answer is: D

SOLUTION

  If X = 1, then X’ = 0   (X’)’ = 1 = X.


Q. 191280 The canonical SOP form of P+QR’ is  


A. P’QR + P’QR’ + P’Q’R + PQR’ +P’Q’R’.

B. P’Q’R + P’QR’ + P’Q’R + PQR’ +P’Q’R’.

C. P’QR + P’Q’R’ + P’Q’R + PQR’ +P’Q’R’.

D. P’QR + P’QR’ + P’Q’R + P’QR’ +P’Q’R’.

Right Answer is: A

SOLUTION

 P+QR’ 
   = P’[Q+Q’][R+R’] + QR’[P+P’]    = P’QR + P’QR’ + P’Q’R + P’Q’R’ + PQR’ + P’QR’     = P’QR + P’QR’ + P’Q’R + PQR’ + P’Q’R’.


Q. 191281 The Indempotence law states


A. X+X = X’ and X.X = X.

B. X+X = X and X.X = X.

C. X+X = X and X.X = X’.

D. X+X = X’ and X.X = X’.

Right Answer is: B

SOLUTION

If X = 1, then
X + X = 1 + 1 = 1 = X   
X.X = 1.1 = 1 = X.


Q. 191282 The following property of the boolean algebra is called
(p+q)’ = p’q’


A. commutative law.

B. DeMorgan’s law.

C. associative law.

D. logical law.

Right Answer is: B

SOLUTION

In formal logic, De Morgan's laws are rules relating the logical operators "and" and "or" in terms of each other via negation, namely:
NOT (P OR Q) = (NOT P) AND (NOT Q) 
NOT (P AND Q) = (NOT P) OR (NOT Q).


Q. 191283 The simplification of the following Boolean function is
F = y(wz’ + wz) + xy


A. y(w+x).

B. w(x+y).

C. x(w+y).

D. xy’+w.

Right Answer is: A

SOLUTION

  F = y(wz’ + wz) + xy = yw(z+z’) + xy   = yw + xy = y(w+x).


Q. 191284 The canonical SOP form of P+Q’R is


A. PQR + PQ’R + PQR’ + PQ’R’ + P’Q’R’.

B. P’Q’R + PQ’R + PQR’ + PQ’R’ + P’Q’R’.

C. PQ’R + PQ’R + PQR’ + PQ’R’ + P’Q’R’.

D. PQR’ + PQ’R + PQR’ + PQ’R’ + P’Q’R’.

Right Answer is: A

SOLUTION

  P+Q’R = P(Q+Q’)(R+R’)+Q’R(P+P’)   = (PQ + PQ’)(R+R’)+PQ’R + P’Q’R = PQR + PQ’R + PQR’ +PQ’R’+P’Q’R = PQR + PQ’R + PQR’ +PQ’R’ +P’Q’R’.


Q. 191285 The number of rows in the truth table of a logic system having n input binary variable, is


A. nn

B.  2n

C. 10n

D. 22n

Right Answer is: B

SOLUTION

The number of rows in the truth table is 2n ,i.e., 2 raise to the power of input binary variable.


Q. 191286


A. .

B. .

C. .

D. .

Right Answer is: D

SOLUTION

Using duality principle, changing (+) to (.) and vice-versa and by replacing 0’s with 1’s and1’s with 0’s, the dual of the expression can be obtained.


Q. 191287 The property in the given expression – (x+1=1 and x*0=0) can be explained with the help of principle of


A. absorption.

B. indempotence.

C. involution.

D. duality.

Right Answer is: D

SOLUTION

Any algebraic equality is derived from the axioms of Boolean algebra remains true when the operators OR and AND are interchanged and identity elements 0 and 1 are interchanged. This property is known as duality principle.


Q. 191288 The decision which results into either yes or no is called


A. binary decision.

B. logical decision.

C. compound decision.

D. symbolic decision.

Right Answer is: A

SOLUTION

A decision between only two alternatives is called binary decision.


Q. 191289 The expression X(Y+Z)=XY+XZ can be stated under


A. Commutative law.

B. Associative law.

C. Distributive law.

D. DeMorgan’s law.

Right Answer is: C

SOLUTION

The above expression is a distributed law, which can be proved with the help of truth tables. Both columns X(Y+Z) and XY+YZ in the truth table will be identical.


Q. 191290 The expression [(x+y)’+(x+y)’]’ can be simplified as


A. x+y.

B. xy.

C. x’y.

D. xy’.

Right Answer is: A

SOLUTION

The above expression can be simplified by using the DeMorgan’s first theorem :(A+B)' = A'.B'


Q. 191291 The complement of the Boolean expression F= AB’+C’D’ is given by


A. A’B’CD.

B. A+B+C’+D’.

C. (A’+B).(C+D).

D. (A+B’).(C+D).

Right Answer is: C

SOLUTION

This can be proved by using DeMorgan’s first and second law.


Q. 191292 The law which explains the given expression – X+XY=X, is


A. an absorption law.

B. a distributive law.

C. a complemetary law.

D. a commutative law.

Right Answer is: A

SOLUTION

The expression can be proved with the help of truth table. The values of X AND X+XY are the same and this law is known as Absorption Law.


Q. 191293 The double inversion law is also known as


A. idempotence law.

B. involution law.

C. commutative law.

D. associative law.

Right Answer is: B

SOLUTION

It is involution law as it is stated, firstly by inverting the expression and then inverting it all over again. For example - ((A')') = A


Q. 191294 XOR gate followed by an inverter is known as


A. XOR GATE.

B. XNOR.

C. NXOR.

D. NOR.

Right Answer is: B

SOLUTION

Combination of XOR and NOT is XNOR. In this, inputs must have an even number of 1’s to get a 1 (high) output.


Q. 191295 A diagram that represents AND using two intersecting circles is known as


A. venn diagram.

B. truth table.

C. veitch diagram.

D. K-map.

Right Answer is: A

SOLUTION

Venn diagrams or set diagrams, developed by John Venn, show all hypothetically possible logical relation between a finite collection of sets.


Q. 191296 A group of 1’s on k-map, whose all 1’s are overlapped by other groups, is known as


A. canonical group.

B. redundant group.

C. octet group.

D. quad group.

Right Answer is: B

SOLUTION

Redundant group is a group in which all 1’s are overlapped by pairs, quads, octets. The removal of redundant group leads to much simpler expression.


Q. 191297 A group of two adjacent 1’s on a K-map is called a


A. pair.

B. quad.

C. octet.

D. triplet.

Right Answer is: A

SOLUTION

To reduce Boolean expression, adjacent 1’s are encircled. If, 2 adjacent 1’s are encircled, then it makes a pair.  


Q. 191298 A graphical display of fundamental products in a truth table is known as


A. maxterm.

B. minterm.

C. non-canonical expression.

D. veitch diagram.

Right Answer is: D

SOLUTION

Veitch diagram is also known as karnaugh maps. Karnaugh map is nothing but a rectangle made up of certain number of squares, each square representing a Maxterm or Minterm.


Q. 191299 The group of wires carrying digital signals is


A. gate.

B. quad.

C. redundant group.

D. bus.

Right Answer is: D

SOLUTION

The bus carries signals, which are in the form of 0’s and 1’s.


Q. 191300 The logic gate, whose output is high when all the inputs are high, is the


A. AND gate.

B. OR gate.

C. NOT gate

D. NAND gate.

Right Answer is: A

SOLUTION

The AND gate can have two or more than two inputs and produces an output signal. When all the inputs are 1, then the output is also 1 otherwise output is 0 only.


PreviousNext