DBMS BCA334 - (Quiz)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

DBMS BCA334_(Quiz)

mayank.kothari@science.christuniversity.in Switch account

Draft saved

Your email will be recorded when you submit this form

Exam

Shadow paging has:

No redo

No undo

Neither redo nor undo

Redo but no undo

Clear selection

_________ state confirms the constraints and structure, that are provided in the
schema.

VALID

User friendly interfaces are used by __________ users.

NON TECHINCAL USERS


Write a query to print the customerId, and businessName of all the customers
who have made at least 5 orders; (2 Marks)

Select customerid,businessname From customers a right outer join orders b on


a.customerid = b.customerid group by customerid having count(b.customerid)> 5

The number of records in a relation is called as _________.

cardinality

The representational data model is also called as: (choose all that are applicable)

Tree data model

Record based data model

Hierarchical data model

Implementation data model

SQL permits attribute names to be repeated in the same relation.

False

True

Clear selection
For each attribute of a relation, there is a set of permitted values, called the
________ of that attribute.

domain

Display all the records if the employees are of the age: 35 - 45 years, from the
employees table. (2 Marks)

select * from employees where age between 35 and 45;

Write the DML and DDL commands to destroy all the records of “Employee”
table. (2 Marks)

DML - delete * from employee;

DDL- drop table employee ; truncate

DBA’s secondary resource, in his administration is _________.

DBMS AND REALTED SOFTWARES

An entity that is related with itself is called as __________.

recursive

When the new database is defined, it is in ____ state.

empty
In ER diagram, double lines represent ________.

Cardinality N

Weak Entity

Cardinality 1

Total Participation

Clear selection

Write a query to print the customerId, orderDate and businessName of the


customerId 1; (2 Marks)

select customerid,orderDate,businessName from ORDERS LEFT JOIN CUSTOMERS on

ORDERS.customerID=CUSTOMERS.customerID;

The total number of entities that participate in any relationship is known as


_________.

degree of a relationship set


The operation which is not considered as a basic operation of Relational Algebra
is:

Join

Union

Selection

Projection

Clear selection

Definitions of data are stored in __________.

database

Network and hierarchical data models are together known as ______.

relational model

Weak entity is represented by _______.

double rectangle

Write a query to create a table called “CS_Faculty” from the existing table
“Faculty”; CS_Faculty table should contain all the records of Computer Science
faculty only. (3 Marks)

CREATE TABLE CS_FACULTY AS SELECT * FROM FACULTY WHERE


DEPARTMENT="Computer Science"
In SQL the spaces at the end of the string are removed by _______ function.

trim

Left Join is not: (select all that are not applicable) (3 marks)

Displays all records of left table and null values from right table

Displays the cartesian product of left and right table

Left outer join

Displays all records and null values from left and right tables

Left natural join

Chooses the records that are not not matching from the right table

Does not select any null values from any table

Displays null values of left table and all records from right table

Left inner join

The person who take account of requirements of parametric end users is


considered as

Conceptual analyst

Execution analyst

System analyst

Occasional analyst

Clear selection
The foreign key allows: (select all that are applicable)

Duplicate values matching with the primary key table , null values

Duplicate values matching with the primary key table , not null values

Unique, not null values

Unique, null values

For the following relations, write a query to display the number of books each
author has published along with the author’s email and name. (3 Marks)

Your answer

_________model focuses on the exchange of data in the web.

data

____________ relational algebra operation chooses only certain attributes but


need not be all.

PROJECT
Which of the following is a DDL command.

Update

Drop

Merge

Delete

Union

Clear selection

____________ relational algebra operation chooses only certain rows but need not
be all.

PROJECT

Access path is __________.

Linear

Linear or nonlinear

non linear

neither linear nor non linear

Clear selection
Which of the following is a valid SQL statement to select the last_name and
first_name columns of the club_member table?

SELECT last_name, first_name FROM club_member

SELECT last_name AND first_name FROM club_member

SELECT club_member FROM last_name, first_name

SELECT club_member first_name and last_name

Clear selection

The default level of consistency in SQL is:

Repeatable read

Serializable

Read uncommitted

Read committed

Clear selection

The big number of concurrent transactions with not much delays are supported
by _________.

online transaction processing system

Write a query to find out and display how many different cities the employees
are from, from the employees table. (2 Marks)

select count(distinct city) from employee;


Write a query to delete the column called “Prev_Dept” from the employee table;
(2 Marks)

alter table employee drop column Prev_dept;

Write 2 MySQL queries to create the following tables with the required
constraints: (3 Marks)

create table customers (customerId int primary key, businessName varchar(40), officePhone

varchar(12));

create table orders (orderDate date, customerId int, productCode varchar(10), foreign key

(customerId) references customers (customerId));

Write the MySQL query for showing the average value of “salary” from the
employees table, with the heading as “Average Salary”, per each department.

select AVG(salary) as Average Salary from emp

Maintaining a good response time of DBMS is the responsibility of _______.

database administrator -DBA


In database approach, the insulation is between ___________ and ______________.

program and data

In SQL the statement select * from R, S is equivalent to:

Select * from R natural join S.

Select * from R inner join S.

Select * from R union join S.

Select * from R cross join S.

Clear selection

What are the constraints to use the natural join? (2 Marks)

column name and data type shoud be same

Which of the following is not a property of transactions?

Atomicity

Concurrency

Durability

Isolation

Clear selection
A table can have : (select all that apply) (2 Marks)

Many foreign keys but no primary key

No primary and foreign key

One primary key many foreign key

Many primary and one foreign key

One primary key but no foreign key

One foreign key and many primary keys

Write the MySQL query for showing the highest value of “salary” from the
employees table, with the heading as “Highest Salary”.

select max(salary) as Highest Salary from emp

Relational Algebra is:

Procedural query Language

Meta Language

Data Manipulation Language

Data Definition Language .

Clear selection

DBA’s primary resource, in his administration is _________.

database
If two relations R and S are joined, then the non-matching tuples of both R and S
are ignored in ________.

Right outer join

Inner join

Left outer join

Clear selection

In ER diagrams attributes can be available for: (select all that apply)

Strong entity

Weak entity

Relationship

Connecting line

Display all the records if the employees are from any of the cities: Bangalore,
Mumbai, Delhi, Chennai and Kolkata, from employees table. (2 Marks)

select * from employees where city in ('Bangalore','Mumbai','Delhi','Chennai','Kolkata');

_____ helps in the efficient search of particular database records.

select
Not a Relational Algebra operation.

Division operator.

Aggregation operators.

Projection operator.

Selection operator.

Clear selection

Which of the following is not a consequence of concurrent operations?

Lost update problem.

Update anomaly.

Dirty read

Unrepeatable read.

Clear selection

Create a table called “Employee” with the fields EID, Name, City, Age, phoneNum;
EID number should be auto generated. City, if not inserted by the user then it
should be “Bangalore” as most of the employees are from Bangalore. Validate
that the age of each of the employee is above 35 years; Ensure that no two
employees have the same phone number. (4 marks)

create table Employee (EID int auto increment = 1, Name varchar(30), City varchar(20)

default = 'Bangalore' ,Age int check (Age>=35), phoneNum varchar(10) unique);


__________ database, organises data in tree structure.

BTree

Tree-strucure

Hierarchical

Network

Binary Tree

Relational

Clear selection

SQL command that deletes all the records but retains the structure ________.

truncate table table_name

________ keyword sorts the records in an ascending way, by default.

order by

Page 2 of 2

Back Submit Clear form

Never submit passwords through Google Forms.

This form was created inside of Christ University. Report Abuse

 Forms

You might also like