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

PreviousNext

Q. 191101 What are Keys?   
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Any row in a relation can be distinguished from other rows by using an  attribute (there may be one or more). Such attributes are called Keys.


Q. 191102 How is data security ensured in a database management system ? 
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Data is vital to any organization and some of it may be confidential. Confidential data must not be accessed by any unauthorized person. A database management system has authentication schemes laid down, giving different levels of users different permissions to access data.  According to this, user may be to allowed modify the data or simply read it without making any changes. The data that can be seen is also controlled.


Q. 191103 Explain the Set Intersection Operation.
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Using the set intersection operation, we can find tuples that are common to two relations. It is represented by the sign. Consider the example below. The two tables are A and B. The operation A B gives another relation which is the result of this operation. It is the same as writing A – (A – B). The two relations must be compatible i.e. of the same degree and the domains of the corresponding columns must be the same.                                                   

                    A                                                                 B

Class

Name

Age

    II

ASHISH

7

III

PUNIT

8

III

RAJAT

8

Class

Name

Age

II

ASHISH

7

III

RAJAT

8

             


 

 

The result of A B is

Class

Name

Age

    II

ASHISH

7

III

RAJAT

8


Q. 191104 Explain the Set Difference Operation.  
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Using the set difference operation, we can find tuples that exist in one relation but in the other.  It is represented by the – (minus) sign.  Consider the example below. The two tables are A and B. The operation A – B gives another relation which is the result of this operation. The two relations must be compatible i.e. of the same degree and the domains of the corresponding columns must be the same.                                                   

                    A                                                                 B

Class

Name

Age

    II

ASHISH

7

III

PUNIT

8

III

RAJAT

8

Class

Name

Age

II

ASHISH

7

III

RAJAT

8

             


 

 

The result of A - B is

 

Class

Name

Age

III

PUNIT

8

 

 


Q. 191105 What are views ? How are they useful ?     
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

A view is a virtual table that does not really exist in its own right but is instead derived from one or more underlying base tables. The view is a kind of table whose contents are taken upon other tables depending upon a given query condition. No stored file is created to store the contents of a view rather its definition is stored only.

The usefulness of views lies in the fact that they provide an excellent way to give people access to some but not all of the information in a table.


Q. 191106 What are the various levels of data abstraction in a database system? 
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

There are three levels of data abstraction :

1. Internal Level (Physical Level) - This level describes how the data is actually stored on the storage medium.

2. Conceptual Level - This level describes what data are actually stored in the database.

3. External Level (View Level) - This level is concerned with the way the data is viewed by individual users. 


Q. 191107 Can you think of disadvantages of using a database system? What are these? 
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

With the complex tasks to be performed by database systems, certain things may crop up as the disadvantages. These are -

1. Security may be compromised without good controls.

2. Integrity may be compromised without good controls.

3. Extra hardware may be required.

4. Performance overhead may be significant.

5. System is likely to be complex.


Q. 191108 What is meant by union-compatible?  
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

The union operation requires two relations and produces another relation that contains tuples from both the relations.  For this operation, both relations must be union compatible. That means, for a union operation AUB to be valid, the following two conditions must be satisfied by the two operands A and B :-

1. The relation A and B must be of the same degree.

2. The domains of the ith attributes of A and the ith attribute of B must be the same.  


Q. 191109 How is the project operation used ?
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

The Project operation selects attributes(columns) from a relation. It is denoted by the Greek letter pi  i.e.  Π. The result is a vertical subset of the given relation. Any duplicate rows are automatically removed. The columns appear as subscript to Π and the table name appears in parenthesis.

If we write,

                          Π Zone, Sales (SALESMEN)

the result would be, columns Zone and Sales of the relation SALESMEN. The columns appear in the result in the same order in which given in the projection expression.             


Q. 191110 Explain the terms – Relation, Entity, Domain and Degree.
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Relation – A table with rows and columns to store data. 

Entity
– It is something that exists, for which data is stored. For example a person, place, department etc.

Domain
– It is the set of permitted entries in a column. For example, a column COLOUR, may have the domain {red, green,blue} where these are the only permitted values.

Degree – It 
is the number of columns(or attributes) in a table. 

 


Q. 191111 How is a database management system different from a file processing system?  
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

In a file processing system, data is stored in various files. In order to access or modify the data in these files, programs have to be written. Some problems that commonly arise in such systems are data redundancy, data inconsistency, loss of data integrity, incorrect data, insecure data and data that is not according to set standards.

The database management system is inherently for sharing of data and provides controls so that the problems encountered in the earlier mentioned system, i.e. File Management System, are eliminated or minimized.


Q. 191112 How is the select operation used ?
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Select operation selects tuples(rows) that satisfy a certain condition(or predicate), from a relation. It gives a horizontal subset from the relation where each row satisfies the given condition. The select operation is denoted by the small Greek letter sigma
If we write, Sales>2000(SALESMEN) the result will be those rows from relation SALESMEN where Sales is more than 2000.


Q. 191113 What do you understand by the terms Candidate Keys and Cardinality of a relation in relational database?
A. the detailed database structure.
B. a vague database structure.
C. hiding of complicated details from the user.
D. laid down by Mr. E.F.Codd.

Right Answer is:

SOLUTION

Candidate Key - A candidate key is the one that is capable of becoming primary key i.e., a field or attribute that has unique value for each row in the relation.

Cardinality of a relation - It represents number of rows in the relation.


Q. 191114 The command, which is used to extract data from database, is


A. SELECT.

B. GET.

C. OPEN.

D. READ.

Right Answer is: A

SOLUTION

SELECT command is used to select or extract data from database table.


Q. 191115 The character, which is used to continue a statement in SQL* PLUS, is


A. *

B. /

C. –

D. @

Right Answer is: C

SOLUTION

- is used as a continuation character in SQL* plus.


Q. 191116 The function, which returns specific portion of a string, is


A. SUBSTR.

B. SUBSTRING.

C. INSTR.

D. STRING.

Right Answer is: A

SOLUTION

The function which returns substring of a string is SUBSTR. .


Q. 191117 The default constraint will


A. allow only null values.

B. not allow unique values.

C. display data stored by default.

D. provide a previously specified value.

Right Answer is: D

SOLUTION

The DEFAULT constraint is used to insert a default value into a column. The default value will be added to all new records, if no other value is specified.


Q. 191118 Pointer is a variable that


A. stores numeric value.

B. stores character value.

C. stores NULL.

D. stores address.

Right Answer is: D

SOLUTION

Pointer is a variable which is used to store address of another variable.This memory address is the location of another variable.


Q. 191119 Current system date can be displayed by


A. SELECT date FROM dual;

B. SELECT date( );

C. SELECT sysdate FROM dual;

D. SELECT system_date;

Right Answer is: C

SOLUTION

SELECT is used to display the date from table Dual. Oracle provides a dummy table called Dual which has just one row and one column.


Q. 191120 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

Relational operators compare two operands and determine the validity of a relationship.


Q. 191121 The constraint UNIQUE 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

It represents restriction on a set of columns in which all values must be unique. This constraint ensures that no two rows have same value in the specified column.


Q. 191122 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

Date is always stored in 'date' data type.


Q. 191123 The data type of a column storing age should be


A. number.

B. char.

C. date.

D. text.

Right Answer is: A

SOLUTION

Age is always stored in number form. For e.g., 10,12,21,32 etc.


Q. 191124 A table can be deleted if it


A. has only one column.

B. does not have primary key.

C. is empty.

D. does not have null values.

Right Answer is: C

SOLUTION

The DELETE statement allows you to delete a single record or multiple records from a table. The syntax for the DELETE statement is: DELETE FROM table WHERE predicates;


Q. 191125 A view is


A. a table that stores data from another table.

B. not defined in the data dictionary.

C. like a window to view data of a table.

D. created from only one table.

Right Answer is: C

SOLUTION

In database theory, a view consists of a stored query accessible as a virtual table composed of the result set of a query.


Q. 191126 The query statement - SELECT * FROM TAB2 WHERE name LIKE "ab%cd%" ESCAPE ""; will


A. display an error message.

B. match all strings beginning with ‘abcd’.

C. match all strings beginning with "ab%cd".

D. match all strings beginning with ‘ab%cd’.

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. To define the escape character for a LIKE comparison,we use the ESCAPE keyword.


Q. 191127 The query statement - SELECT * FROM TAB1 WHERE name LIKE 'H%!_' escape '!'; will


A. display an error message.

B. match all strings beginning with H and end with _.

C. match all strings beginning with H and ending with e.

D. will not include the _ in the output.

Right Answer is: B

SOLUTION

The SQL statement will return all names that start with H and end in _. For example, it would return a value such as 'Hello_'.


Q. 191128 To display all data from rows where name ends with ‘an’ the command is -


A. SELECT * FROM EMP WHERE name LIKE ‘%an’ ;

B. SELECT * FROM EMP WHERE name = ‘%an’ ;

C. SELECT * FROM EMP WHERE name = ‘%an’ ;

D. SELECT ALL FROM EMP WHERE name like ‘%an’ ;

Right Answer is: A

SOLUTION

The LIKE keyword is used to select rows containing columns that match a wildcard pattern.


Q. 191129 To display all data from rows where name starts with ‘An’ the command is -


A. SELECT * FROM EMP WHERE name like ‘An____’ ;

B. SELECT * FROM EMP WHERE name like ‘An%’ ;

C. SELECT * FROM EMP WHERE name = ‘An%’ ;

D. SELECT ALL FROM EMP WHERE name like ‘%An%’ ;

Right Answer is: B

SOLUTION

The LIKE keyword is used to select rows containing columns that match a wildcard pattern.


Q. 191130 One big advantage of views is that


A. data can be updated easily.

B. constraints can be discarded.

C. data can be displayed selectively.

D. data can be viewed in sequence.

Right Answer is: C

SOLUTION

A view provides
1. Simplicity - you can see exactly what you need.
2. Security - it prevents unauthorised users from seeing unrelevant information.


Q. 191131 The statement to display the number of writers whose books are in the table Books(BOOK_CODE, NAME, AUTHOR, PRICE)   is


A. SELECT count(DISTINCT author) from Books ;

B. SELECT count(DISTINCT name) from Books ;

C. SELECT DISTINCT count(author) from Books ;

D. SELECT count(author) from Books ;

Right Answer is: A

SOLUTION

The DISTINCT keyword ensures that multiple entires of the same author are ignored.


Q. 191132 The statement to display all rows and all columns from table ITEM is -


A. SELECT ALL FROM item ;

B. SELECT * FROM item ;

C. SELECT * ALL  FROM item ;

D. SELECT FROM item ;

Right Answer is: B

SOLUTION

To see the entire table i.e., every column of a table, we need not give a complete list of columns. The asterisk(*) can be substituted for a complete list of columns.


Q. 191133 A view can be updated if


A. it does not contain numeric data.

B. data in it is not ordered.

C. the primary key value is provided.

D. it is defined from a single relation.

Right Answer is: D

SOLUTION

A view is updatable if it has been defined from a single relation and the update query can be mapped on to the base table successfully.


Q. 191134 If I want to create the Customer table specified as Customer (First Name, Last Name, Address, City, Country, Birth Date), then the SQL command will be


A. CREATE TABLE Customer (First_Name, Last_Name, Address, City, Country char, Birth_Date );

B. CREATE TABLE Customer (First_Name char(25), Last_Name char(25), Address char(50), City char(25), Country char(25), Birth_Date date );

C. CREATE TABLE Customer (First_Name char(25) Last_Name char(25), Address char(50), City char(25), Country char(25),Birth_Date date (21) );

D. CREATE TABLE Customer (First_Name char(25)

Right Answer is: B

SOLUTION

|| is concatenation operator and only one column will be displayed as “ADDRESS” and the syntax of date is date. It cannot hold size of (21). It is yyyy-mm-dd.


Q. 191135 If I want to select one column named Marks from a table having duplicate rows named Student, then the correct method is


A. SELECT Marks FROM Student;

B. SELECT DISTINCT Marks from Student;

C. SELECT Marks. Student;

D. SELECT Student “ Marks ”;

Right Answer is: A

SOLUTION

DISTINCT eliminates the duplicate rows from the result of SELECT statement.


Q. 191136 The proper syntax of CREATE TABLE command is


A. CREATE TABLE < table-name > (< datatype > [ (size) ], < data type > < size > );

B. Create < tablename > < datatype > < size >,< column name > < datatype > ;

C. CREATE TABLE < tablename > (< column name1 ,< datatype > [ < size > ] ),< column name 2 >, datatype > [ < size > ]..).

D. CREATE < table-name > (< datatype > [(size)], < data type > );

Right Answer is: C

SOLUTION

When a table is created, its column names, data types and size are supplied for each column.


Q. 191137 The correct SQL query to change "Hansen" into "Nilsen" in the "LastName" column in the Persons table is


A. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'.

B. MODIFY Persons SET LastName='Hansen' INTO LastName=Nilsen.

C. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'.

D. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'.

Right Answer is: A

SOLUTION

When we need to change some values in an existing row, we can use UPDATE command. It specifies the rows to be changed using the WHERE clause.


Q. 191138 Assuming today is Monday, 10 July 2000, this is returned by the statement: SELECT to_char(NEXT_DAY(sysdate, 'MONDAY'), 'DD-MON-RR') FROM dual


A. 03 JUL 00.

B. 10 JUL 00.

C. 12 JUL 00.

D. 17 JUL 00.

Right Answer is: D

SOLUTION

NEXT_DAY returns the date of the next weekday specified in the 2nd argument.


Q. 191139 The subdivision of SQL which is used to create tables is


A. DDL.

B. TCL.

C. DML

D. DDL and DML

Right Answer is: A

SOLUTION

Data Definition Language (DDL) provides statements for creation and deletion of tables and indexes.


Q. 191140 The subdivision of SQL, which is used to put values in tables, is


A. DDL.

B. TCL.

C. DML.

D. DNL.

Right Answer is: C

SOLUTION

Data Manipulation Language (DML) provides statements to enter, update, delete data and perform complex queries on these tables.


Q. 191141 To list cities from employee table such that result does not contain duplicated city, the command is


A. SELECT (DISTINCT) FROM employee;

B. SELECT DISTINCT city FROM employee;

C. SELECT ALL city FROM employee;

D. SELECT DISTINCT city;

Right Answer is: B

SOLUTION

DISTINCT keyword ensures that the multiple entries of the same city are ignored.


Q. 191142 To count the number of employees in employee table, the sql command is


A. SELECT count (*) FROM employee;

B. SELECT count (*) employee;

C. SELECT * FROM employee;

D. SELECT count FROM employee;

Right Answer is: A

SOLUTION

COUNT is also an aggregate function used in SQL.


Q. 191143 If I want to calculate the total salary for the employees with grade 'A1', then sql query would be


A. SELECT total (salary) FROM employee WHERE grade='A1';

B. SELECT order by(salary) FROM employee WHERE grade="A1";

C. SELECT sum (salary) FROM employee WHERE grade='A1';

D. SELECT sum (salary) FROM employee HAVING (grade) ="A1";

Right Answer is: C

SOLUTION

Sum is an aggregate function that is used to find the total value. Aggregate functions can be applied to all rows or to a subset of the table specified by a WHERE clause.


Q. 191144 ALTER TABLE command


A. adds columns in a table only.

B. modifies the column size only.

C. deletes some columns in a table only.

D. can either add columns, modify the sizes or delete columns in a table.

Right Answer is: D

SOLUTION

ALTER table command is used to change the definitions of existing tables. It can modify, delete or change sizes of columns.


Q. 191145 To remove all the tuples from an employee table the sql query is


A. DELETE FROM employee;

B. DELETE ALL FROM employee;

C. DELETE * FROM employee;

D. DELETE employee;

Right Answer is: A

SOLUTION

DELETE will delete all the rows in a table and table would be empty.


Q. 191146 To remove the tuples from an employee table where salary >5000 the sql query is


A. DELETE FROM table named employee WHERE salary > 5000;

B. DELETE employee WHERE salary > 5000;

C. DELETE FROM employee WHERE salary > 5000;

D. DELETE employee having salary > 5000;

Right Answer is: C

SOLUTION

Delete command is used to remove some or all of the rows in a table.


Q. 191147 If I use command DROP VIEW names, then


A. only view names will be deleted from database.

B. view names as well as its base table will be deleted from data base.

C. only base table will be deleted.

D. either view name or base table will be deleted from database.

Right Answer is: A

SOLUTION

When a view is dropped, only view is deleted. It does not cause any change in the base table and the base table remains intact.


Q. 191148 To delete a view from database when VIEW is names and base table employee , we use the command


A. DROP VIEW names.

B. DELETE VIEW names.

C. DROP VIEW employee.

D. DROP VIEW.

Right Answer is: A

SOLUTION

DROP command deletes a view from database. Its syntax is DROP VIEW (viewname).


Q. 191149 DROP table command in sql lets you drop a table


A. if it has rows.

B. if  it is has WHERE clause.

C. if it has ORDER BY clause.

D. only if it is an empty table.

Right Answer is: D

SOLUTION

A table with rows in it cannot be dropped. First, we use a DELETE command to remove all the rows then we can drop the empty table so that it is no longer recognised in the database.


Q. 191150 When I drop a table and then use the select statement to access its dependent view, it will result


A. in creating the view.

B. in an error.

C. in showing the view table which had been created.

D. in showing the base table which was dropped.

Right Answer is: B

SOLUTION

As the table is dropped that means it has been deleted from the database, therefore, its dependent view will not generate any table and will give an error.


Q. 191151 The given SQL statement SELECT getdate() FROM Names; will return


A. an error.

B. the current system date.

C. the previous day system date.

D. the following day system date.

Right Answer is: B

SOLUTION

This function returns the current system date of your computer.


Q. 191152 The function of the following sql statement is : SELECT substr (“Aditi”, 3,3 ) FROM Names;


A. it will return iti.

B. it will return i.

C. it will return Adi.

D. it will return iti iti iti.

Right Answer is: A

SOLUTION

Substr (expn, start position, no of char) returns the given no. of chars (integer) from a character string expn starting at the specified startpos (integer).


Q. 191153 The function of the following sql statement is SELECT replicate (“ * ” ,5 ) FROM Names;


A. it will return *5.

B. it will return **55.

C. it will return *****.

D. it will return 55.

Right Answer is: C

SOLUTION

It repeats the given expression the specified number of times.


Q. 191154 INSERT statement is an example of


A. DDL.

B. DCL.

C. DML.

D. DGL.

Right Answer is: C

SOLUTION

The DML provides statements to enter, update, delete data and perform complex queries on these tables.


Q. 191155 DCL stands for


A. Data Control Language.

B. Data Convert Language.

C. Dynamic Control Language.

D. Dynamic Convert Language.

Right Answer is: A

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. 191156 A default constraint will


A. allow only null values.

B. not allow unique values.

C. display data stored by default.

D. provide a previously specified value.

Right Answer is: D

SOLUTION

A default value can be sepcified for a column using the DEFAULT clause. When a user does not enter a value for the column (having default value), automatically the defined default value is inserted in the field.


Q. 191157 Having clause


A. places conditions on rows of the table.

B. places conditions on groups.

C. can be used in absence of GROUP BY clause.

D. cannot be used with aggregate functions.

Right Answer is: B

SOLUTION

The HAVING clause is used in combination with the GROUP BY clause. It can be used in a SELECT statement to filter the records that a GROUP BY returns.


Q. 191158 CREATE Table statement is an example of


A. DDL.

B. DCL.

C. DML.

D. TCL.

Right Answer is: A

SOLUTION

It is used to create a new table. DDL identifies the type of data division such as data item, segment, record and data-base file.


Q. 191159 The data type of a column storing age should be


A. number.

B. char.

C. date.

D. text.

Right Answer is: A

SOLUTION

NUMBER stores number data type both in fixed and floating points. NUMBER(p)means just digits, for example NUMBER(8)stores 8 digits. NUMBER(p,s) stores digits and decimals. For example, NUMBER(4,2) will store 4 digits and 2 decimals.


Q. 191160 The WHERE clause


A. specifies location of the table.

B. gives the table name.

C. selects rows that meet a condition.

D. comes before the FROM clause.

Right Answer is: C

SOLUTION

The WHERE clause in SELECT statement specifies the criteria for selection of rows to be returned.


Q. 191161 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 HAVING clause is used in combination with the GROUP BY clause. It can be used in a SELECT statement to filter the records that a GROUP BY returns.


Q. 191162 DML stands for


A. Data Markup Language.

B. Data Manipulation Language.

C. Dynamic Markup Language

D. Dynamic Mapping Language.

Right Answer is: B

SOLUTION

The DML (Data Manipulation Language) provides statements to enter, update, delete data and perform complex queries on these tables.


Q. 191163 SQL stands for


A. Simple Questioning Language.

B. Sequential Query Language.

C. Simple Query Language.

D. Structured Query Language.

Right Answer is: D

SOLUTION

SQL is a language that enables you to create and operate on relational databases, which are sets of related information stored in tables.


Q. 191164 Example of DDL statement are


A. SELECT.

B. ALTER TABLE.

C. INSERT.

D. UPDATE.

Right Answer is: B

SOLUTION

SELECT, UPDATE, INSERT are examples of DML Commands and ALTER TABLE is a DDL statement.


Q. 191165 CREATE Table statement is an example of


A. DDL.

B. DCL.

C. DML.

D. DGL.

Right Answer is: A

SOLUTION

The DDL 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. 191166 The data type of a column storing names should be


A. number

B. char

C. date

D. text

Right Answer is: B

SOLUTION

The CHAR data type must be enclosed in single quotes such as 'text', 'example' etc. Two adjacent single quotes (' ') inside the string will represent one single quote. 


Q. 191167 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

The SELECT command lets you make queries on the database. A query is a command that is given to produce certain specified information from the database table(s). The SELECT statement can be used to retrieve a subset of rows or columns from one or more tables.


Q. 191168 Examples of DCL statements are


A. SELECT, DELETE.

B. CREATE, ALTER.

C. UPDATE.

D. GRANT, REVOKE.

Right Answer is: D

SOLUTION

SELECT, DELETE, UPDATE are the examples of DML Commands. CREATE and ALTER are examples of DDL Commands and GRANT, REVOKE are DCL statements.


Q. 191169 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

SQL aggregate functions return a single value, calculated from values in a column.


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


A. SELECT * FROM tab1;

B. SELECT * FROM tab1 ORDER BY marks ;

C. SELECT * FROM tab1 GROUP BY ASCENDING;

D. SELECT * FROM tab1 SET ORDER ASC ;

Right Answer is: B

SOLUTION

ORDER By is the clause which is used to order the values or data in ascending or descending order. By default, it orders the data in ascending order.


Q. 191171 The query to display all the records of table tab1 order by marks, is


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

The ORDER BY keyword is used to sort the result-set by a specified column.The ORDER BY keyword sorts the records in ascending order by default.


Q. 191172 The where clause


A. specifies location of the table.

B. gives the table name.

C. selects rows that meet a condition.

D. comes before the FROM clause.

Right Answer is: C

SOLUTION

The WHERE clause is used to extract only those records that fulfill a specified criterion.


Q. 191173 Logical operators


A. compare Boolean expressions.

B. combine the results of two conditions.

C. carry out arithmetic operations.

D. can carry out pattern matching.

Right Answer is: B

SOLUTION

Logical operators are typically used with Boolean(logical) values and return a Boolean value.


Q. 191174 One statement that can be defined under logical statement category is


A. Try to run fast.

B. Do not tell a lie.

C. I am hungry,

D. Are you going?

Right Answer is: D

SOLUTION

Logical statement is one that can result into either true or false values.


Q. 191175 The expression is said to be canonical, if and only if it consists of


A. minterms only.

B. maxterms only.

C. both minterms and maxterms.

D. either minterms or maxterms.

Right Answer is: D

SOLUTION

When a Boolean expression is represented purely as sum of minterms or product terms, it is said to be in canonical sum of products form. When a Boolean expression is represented purely as product of maxterms, it is said to be in canonical product of sum form of expressions.


Q. 191176 The table which gives the various values of output for the given value of input, is known as


A. logical table.

B. truth table.

C. combinational table.

D. binary table.

Right Answer is: B

SOLUTION

Truth table is a table, which represents all the possible values of logical variables along with all the possible results of the given combinations of values.


Q. 191177 Sum of n literals is known as


A. maxmin.

B. minmax.

C. minterm.

D. maxterm.

Right Answer is: D

SOLUTION

A maxterm in n variables x1,x2,x3,………………, xn is defined as a sum (using OR operation) of n variables.


Q. 191178 Product of n literals is known as


A. minterm.

B. maxterm.

C. minmax.

D. maxmin.

Right Answer is: A

SOLUTION

A minterm in n variables x1,x2,x3,……………., xn is defined as a product (using AND operation) of n literals (variables).


Q. 191179 The most powerful law of Boolean algebra is


A. Idempotent law.

B. Involution law.

C. Absorption law.

D. Demorgan’s law.

Right Answer is: D

SOLUTION

Demorgan’s law states (X+Y)’=X’.Y’ and (X.Y)’=X’+Y’ is used to reduce the complexity of Boolean expression.


Q. 191180 The inverse property can be described as


A. X+X’=1.

B. X+X=X.

C. X(X+Y)=X.

D. X.X=1.1.

Right Answer is: A

SOLUTION

X+X’ =1 is an inverse property and others are idemponent and involution laws.


Q. 191181 The compound statements which are always false are called


A. fallacies.

B. tautologies.

C. false statements.

D. unknown statements.

Right Answer is: A

SOLUTION

A fallacy is an argument, which may convince others but is not logically sound.


Q. 191182 The device which controls the flow of the current, is known as


A. trigger.

B. switch.

C. ammeter.

D. voltmeter.

Right Answer is: B

SOLUTION

A switch is an electrical component, which can break an electrical circuit, interrupting the current or diverting it from one conductor to another.


Q. 191183 The compound logical statements which are always true are called


A. tautologies.

B. fallacies.

C. truth values.

D. closure values.

Right Answer is: A

SOLUTION

Tautology is a statement of propositional logic, which holds for all truth-values of its atomic proposition.


Q. 191184 One of the property of Karnaugh maps is


A. map twisting.

B. map rolling.

C. map concatenation.

D. map paging.

Right Answer is: B

SOLUTION

Map rolling means roll the map i.e. consider the map as if its left edges are touching the right edges and top edges are touching bottom edges.


Q. 191185 The binary code in which each successive number differs only in one place is


A. gray code.

B. black code.

C. red code.

D. green code.

Right Answer is: A

SOLUTION

The binary code 00,01,11,10 is called gray code, as it differs only in one place.


Q. 191186 The gates which are known as universal gates, are


A. AND and OR.

B. NAND and XOR.

C. XNOR and OR.

D. NAND and NOR.

Right Answer is: D

SOLUTION

NAND and NOR are said to be universal gates as all the other gates can be made by using these two gates.


Q. 191187 A gate with just one input and one output is


A. AND.

B. OR.

C. NOT.

D. XOR.

Right Answer is: C

SOLUTION

NOT gate is also known as inverter gate as the output is just the complement of the input.


Q. 191188 A logic gate whose output is high only when one or more inputs are high, is


A. OR.

B. AND.

C. NAND.

D. NOR.

Right Answer is: A

SOLUTION

In OR gate, the output is 1 when one or more inputs are 1.


Q. 191189 The relationship which represents the dual of Boolean property x+x’y=x+y is


A. x(x’+y)=x+y.

B. x(x’+y)=xy.

C. y(x+y)=xy.

D. xyz=1.

Right Answer is: B

SOLUTION

Dual is obtained by changing each OR sign (+) to AND (.), each AND(.) sign to OR (+), replacing each 0 by 1 and 1 by 0.


Q. 191190 Minterm is the


A. product of all the literals

B. sum of all the literals

C. Substraction of all the literals

D. Multiplication of all the literals

Right Answer is: A

SOLUTION

Minterm is a product of all the literals ( with or without the bar) within the logic system.


Q. 191191 The simplification of Boolean expression (A+B)’(C+D+E)’+(A+B)’ will be


A. (A+B)'

B. AB.

C. A’+B.

D. A+B’.

Right Answer is: A

SOLUTION

This can be proved by using the property x + xy = x. Here, x = (A+B)’ = A’B’ AND y=(C+D+E)’, therefore the result obtained is (A+B)'.


Q. 191192 An equivalent representation for the Boolean expression A’+1 is


A.
A.

B. A’.

C. 1.

D. 0.

Right Answer is: C

SOLUTION

The Boolean expression A+1 is equal to 1. Now, let A = A’. Then A’+1 = 1.


Q. 191193 Simplification of Boolean expression AB+ABC+ABCD+ABCDE yields


A. ABCDE.

B. AB.

C. AB+CD+EF.

D. A+B+C+D+E.

Right Answer is: B

SOLUTION

Repeated application of absorption theorem, x + xy = x, gives the desired result.


Q. 191194 The SQL statement to create a table -  Books(BOOK_CODE, NAME, AUTHOR, PRICE)   is


A. CREATE TABLE Books(book_Code char(4), name char(15), author (15), price number(4));

B. CREATE TABLE Books(book_Code char(4), name char(15), author char(15), price number(4));

C. CREATE TABLE Books(book_Code char(4), name char(15), author char(15), price (4));

D. CREATE TABLE Books(book_Code char(4), name number(5), author char(15), price char(14));

Right Answer is: B

SOLUTION

Tables are defined with the CREATE TABLE command. When a table is created, its columns are named, data types and sizes are supplied for each column. Each table must have at least one column. 
The syntax of CREATE TABLE command is:
CREATE TABLE < table-name >
( < column name > < data type > [ ( size > ) ],
< column name > < data type > [ ( size > )... ] );


Q. 191195 Out of the following, the true 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 constraint declares a column as the primary key of the table. Only one column (or one group of columns) can be applied in this cpnstarint. The primary keys cannot allow NULL values, thus, this constraint must be applied to columns declared as NOT NULL.
For example,
CREATE TABLE student
( rollno       integer    NOTNULL PRIMARY KEY,
  sname      char(25) NOT NULL,
  grade       char(2));
 


Q. 191196 Out of the following, the false statement is -


A. A table can exist without rows and columns.

B. The WHERE and HAVING clauses are not interchangeable.

C. The INSERT statement can omit a value for any column if it allows null or has a default value defined.

D. A new table can be created from an existing table.

Right Answer is: A

SOLUTION

SQL tables are comprised of table rows and columns. Table columns are responsible for storing many different types of data, like numbers, texts, dates, and even files. A table row is a horizontal record of values that fit into each different table column.


Q. 191197 A view is


A. a table that stores data from another table.

B. not defined in the data dictionary.

C. like a window to view data of a table.

D. created from only one table.

Right Answer is: C

SOLUTION

A view is like a window through which we can view or change information in a table.
A view is a virtual table i.e.,
(i) it looks like a table, but it does not exist as such
(ii) its data are derived from base table(s)
(iii) it only stores its defintion; it does not contain any copy of the data


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


A. the MODIFY command.

B. the ALTER STRUCT command.

C. the UPDATE TABLE command.

D. the ALTER TABLE command.

Right Answer is: D

SOLUTION

The ALTER TABLE command is used to change the definitions of existing tables. It can add columns to a table.
The syntax to add a column to a table is as follows:
ALTER TABLE < table name >
ADD < column name > < size >;


Q. 191199 Values in a row can be changed by


A. the UPDATE command.

B. the ALTER TABLE command.

C. the MODIFY DATA command.

D. the INSERT command.

Right Answer is: A

SOLUTION

The UPDATE command lets us change some or all of the values in an existing row using the WHERE clause and the new data using the SET keyword. The new data can be specified constant, an expression or data from other tables.


Q. 191200 Having clause


A. places conditions on rows of the table.

B. places conditions on groups.

C. can be used in absence of GROUP BY clause.

D. cannot be used with aggregate functions.

Right Answer is: B

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 conditions can do so.


PreviousNext