INT-306 CA1 Previous Year & Mock Test Questions

Previous Year Questions

1. A relational database consists of a collection of

(a) Tables    (b) Fields    (c) Records    (d) Keys

2. A _____ in a table represents a relationship among a set of values.

(a) Column    (b) Key    (c) Row    (d) Entry

3. Not a Part of ACID Properties of Data Base Transaction?

(a) Atomicity    (b) Consistency    (c) Isolation    (d) Database

4. Which level of abstraction describes what data are stored in the database?

(a) Physical level    (b) View level    (c) Abstraction level    (d) Logical level

5. Conceptual design

(a) Is a documentation technique.

(b) Needs data volume and processing frequencies to determine the size of the database.

(c) Involves modelling independent of the DBMS

(d) Is designing the relational model.

6. Relational Algebra is

(a) DDL    (b) Meta Language    (c) Procedural query Language    (d) None of the above

7. ______ produces the relation that has attributes of RI and R2

(a) Union    (b) Cartesian product    (c) Difference    (d) Intersection

8. Which of the following is a unary operation?

(a) Intersection    (b) projection    (c) join    (d) Cartesian Product

9. The ______ defines a set of operations on relations, paralleling the usual algebraic operations such as addition, subtraction or multiplication, which operates on numbers.

(a) Relational Calculus    (b) Referential Integrity    (c) Relational Algebra    (d) Relations

10. A tuple in relation DBMS is a equivalent to

(a) Record    (b) Field    (c) File    (d) Database

11. A set of possible data values is called

(a) Attribute    (b) Degree.    (c) Tuple    (d) Domain.

12. Database _____, which is the logical design of the database, and the database _____,which is a snapshot of the data in the database at a given instant in time.

(a) Instance, Schema     (b) Relation, Schema    (c) Relation, Domain    (d) Schema, Instance

13. Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database ?

(a) DML    (b) DDL    (c) Query    (d) Relational Schema

14. Select * from employee where dept_name="Comp Sci";
In the SQL given above there is an error . Identify the error .

(a) dept_name    (b) employee    (c) "Comp Sci"    (d) where

15. To remove a relation from an SQL database, we use the _____ command.

(a) Delete    (b) Purge    (c) Remove    (d) Drop table


Answer Key:

1. (a), 2. (c), 3. (d), 4. (d), 5. (c), 6. (a), 7. (a), 8. (b), 9. (c), 10. (a), 11. (d), 12. (d), 13. (a), 14. (c), 15. (d)


Questions from Mock Test

Section A (MCQ)

1. Which of the following query is correct to fetch all the employee details from the employee table

(a) select * from employee;

(b) extract name from employee;

(c) select name from employee;

(d) All of the Mentioned

2. With Oracle, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

(a) SELECT * FROM Persons WHERE FirstName='%a%'

(b) SELECT * FROM Persons WHERE FirstName='a'

(c) SELECT * FROM Persons WHERE FirstName LIKE 'a%'

(d) SELECT * FROM Persons WHERE FirstName LIKE '%a'

3. Which of the below queries displays employees' name and new salary after the increment of 1000?

(a) SELECT ename,sal FROM emp;

(b) SELECT ename,sal=sal+1000 FROM emp;

(c) SELECT ename,sal+1000 FROM emp;

(d) SELECT ename,1000 FROM emp;

4. Can "SELECT" clause be used without the clause "FROM"?

(a) YES

(b) NO

(c) DEPENDS

(d) None of the mentioned

5.  With Oracle, how do you select a column named "FirstName" from a table named "Persons"?

(a) SELECT Persons,FirstName

(b) EXTRACT FirstName FROM Persons

(c) SELECT FirstName FROM Persons

(d) None of the mentioned

6. With Oracle, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

(a) SELECT [all] FROM Persons WHERE FirstName='Peter'

(b) SELECT * FROM Persons WHERE FirstName='Peter'

(c) SELECT Persons where FirstName='Peter'

(d) None of the mentioned

7. What needs to be added when user want to show results by Descending Order?

(a) Descending order cannot be possible

(b) User can add DESC with Order By clause

(c) User can add 'ASC' with Order By clause

(d) None of the mentioned

8. What will be the output of a query given below?

SELECT * FROM person
WHERE person_name='Rani';

(a) Show all columns but only those rows which belongs to person_name'Rani'

(b) Show all columns and rows

(c) Shows only columns person_id

(d) None of the mentioned

9. 

employee_idNameSalary
1001Annie6000
1009Ross4500
1018Zeith7000

above are the Employee table details.
Select * from employee where employee_id>1009;

Which of the following employee id will be displayed?

(a) 1009, 1001, 1018

(b) 1009, 1018

(c) 1001

(d) 1018

10. The Oracle WHERE clause:
A. Limits the column data that are returned.
B. Limits the row data are returned.

(a) A is True

(b) B is True

(c) A and B are correct.

(d) Neither A nor B are correct.

Section B (Query Writing)

Image Source: E-Box


1.  Write a query to display all the building details in which building_type named 'Library'. Display the records in ascending order based on their owner_name.

Note:
1.Display all the column present in the building table where building_type name is 'Library'. Use subqueries to achieve this.
2. Tables involved are building_type and building
3. Order by is mandatory.

Solution:

select * from building where building_type_id = (select id from building_type where name = 'Library') order by owner_name;

2. Write a query to display all the contact number of the building_type named 'Police Station'. Display the records in ascending order based on the contact number.

Note:
1. Display only the contact_number column present in the building table where building_type name is 'Police Station'. Use subqueries to achieve this.
2. Tables involved are building_type and building
3. Order by is mandatory.

Solution:

select contact_number from building where building_type_id = (select id from building_type where name = 'Police Station') order by contact_number;

3. Write a query to display the total_units and payable_amount of the particular meter number 'SG934826'.

Note:
1. Display only the total_units and payable_amount columns present in the bill table where meter_number is 'SG934826'. Use subqueries to achieve this.
2. Tables involved are bill and meter.

Solution:

select total_units,payable_amount from bill where meter_id = (select id from meter where meter_number = 'SG934826');

4. Write a query to display the payment_date from the bill table for the meter_number 'SG288942'.

Note:
1. Display only the payment_date from the bill table for the meter_number 'SG288942'.
2. Tables involved are bill and meter.

Solution:

select payment_date from bill where meter_id in (select id from meter where meter_number = 'SG288942');

5. Write a query to display the meter_number from the meter table whose electricity_reading registered on a particular day of '2018/05/07'. Display the records in ascending order based on their meter_number.

Note:
1. Display only the meter_number from the building table whose electricity_reading registered on a particular day of '2018/05/07'.
2. Tables involved are meter and electricity_reading
3. Order by is mandatory.

Solution:

select meter_number from meter where id in (select meter_id from electricity_reading where day like '07-MAY-18%') order by meter_number;


[EXPIRED]
If you want to practice more questions, you can attempt mock test on E-Box platform.
Navigation to Mock Test: E-Box Home > DBMS - Unit II > MOCK CA TEST WITH SEB MODE ENABLED

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.