Font size
WorksheetsDBMS Quiz - I
Total questions: 66
Worksheet time: 33mins
Here which of the following displays the unique values of the column?
SELECT ________ dept_name
FROM instructor;
from
like
unique
distinct
Which of the following statements contains an error?
Select * from emp where empid = 10003;
Select empid from emp where empid = 10006;
Select empid from emp;
Select empid where empid = 1009 and lastname = ‘GELLER’;
In the given query which of the keyword has to be inserted?
INSERT INTO employee _____ (1002,'Joey',2000);
table
values
from
relation
CREATE TABLE employee (name VARCHAR, id INTEGER)
What type of statement is this?
view
ddl
dml
tcl
SELECT * FROM employee
What type of statement is this?
integrity constraint
ddl
dml
view
To remove a relation from an SQL database, we use the ______ command.
delete
drop
remove
none of these
DELETE FROM r;
where r is relation. This command performs which of the following action?
Remove relation
Clear relation entries
Delete fields
Delete all rows
A DBMS query language is designed to
Support end users who use English-like commands.
Support in the development of complex applications software.
Specify the structure of a database.
all of the above
Which of the following language is used to specify database Schema?
Data Manipulation language
Data Definition language
Database Development language
Database Design language
In SQL, which command(s) is (are) used to change a table’s storage characteristics?
Modify Table
Change Table
Alter Table
All of these
In SQL, which command is used to SELECT only one copy of each set of duplicate rows
SELECT DISTINCT
SELECT UNIQUE
SELECT DIFFERENT
ALL OF THE ABOVE
What operator tests column for the absence of data?
EXISTS operator
NOT operator
IS NULL operator
None of these
In SQL, which command is used to add new rows to a table?
alter
add
insert
all of the above
Which of the following is not included in DML
insert
update
delete
create
DDL stands for__________.
Data Definition language
Database Development language
Database Design language
None of the above
Which of the following is an example of a DBMS
SQL
Microsoft Office
PHP
Oracle
Which of the following is a property of database
Represents some aspect of the real world
Logically related collection of data
Built, and populated with data for a specific purpose
All the above
A database management system (DBMS) is a collection of programs that enables users to
create a database
manipulate a database
both create and manipulate a database
for storing data only
Which of the following are characteristics of a DBMS
Self-Describing
Support Multiple Views
Single user systems
Data Sharing
Who is responsible for authorizing access to the database, coordinating and monitoring its use
Database programmer
System Analyst
DBA
Specialised user
DBA stands for
Data Bank Access
Database Access
Data Bank Administration
Database Administrator
This is an authorization command of SQL
Access
Grant
Allow
None of these
The statement in SQL which allows to change the definition of a table is
Alter
Update
Create
Select
SQL is
Structured Query Language
Simple Query Language
Structured Question Language
Structure Quality Language
DML
(a)
To remove a record from a table which SQL statement would you use?
Remove
Cancel
Delete
Eradicate
Which statement is used to extract data from a database?
Extract
Get
Open
Select
Which statement allows us to add a record to a table?
Add To
Update To
Add Into
Insert Into
Which word is missing from the following SQL statement?
Select * table_name
With
Where
From
And
Which SQL statement would add a record to the database?
INSERT INTO Designer VALUES ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456')
INSERT VALUES ('SMI01', 'M Smith', 'mail@msmith.com', 01224123456') INTO Designer
INSERT ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456') INTO Designer
INSERT Designer INTO VALUES (''SMI01', 'M Smith', 'mail@msmith.com', '01224123456')
It is a DML command that is used to display record.
DISPLAY
STRUCTURE
WHERE
SELECT
______________ constraint prevents NULL values
UNIQUE
NOT NULL
NULL
FOREIGN KEY
A primary key can be NULL in the table? TRUE or FALSE
TRUE
FALSE
A clause in the SELECT command that specifies the condition the records must satisfy.
Table_name
WHERE
LIKE
Database name
This symbol is an SQL wildcard that can substitute for one or more characters when searching for data in a database.
$
%
=
*
You are required to update the phone number for only the DesignerID "SMI01" in the "Designer" table. Which of these would successfully do that?
UPDATE Designer SET PhoneNo = '01224123456'
UPDATE Designer (PhoneNo) VALUES ('01224123456')
UPDATE Designer SET PhoneNo = '01224123456' WHERE DesignerID = 'SMI01'
UPDATE PhoneNo = '01224123456' FROM Designer WHERE DesignerID = 'SMI01'
If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default
ASC
DESC
There is no default value
None of the mentioned
Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70
With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?
SELECT * FROM Persons WHERE FirstName=’a’
SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
SELECT * FROM Persons WHERE FirstName=’%a%’
Here which of the following displays the unique values of the column?
SELECT ________ dept_name
FROM instructor;
from
like
unique
distinct
The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.
Where, from
From, select
Select, from
From, where
SELECT * FROM sales WHERE amount > 200.
the query will display all the sales records with amounts starting from 200 and above
the query will display all the sales records with amounts less than 200
the query will display all the sales records with amounts greater than 200
the query will output sales records with the amount equal to 200.
SELECT * FROM cars WHERE Doors > 3
would return how many records?
1
2
3
4
SELECT * FROM Students WHERE Gender="Female" AND Class=2.2
would return how many records?
1
2
3
4
DCL stands for ?
Dataset Control Function
Data Compact Language
Data Control Language
Data Compact Level
This symbol is placed immediately after the SELECT command to display all the fields.
$
%
=
*
In order to modify data in a database we would use which SQL statement?
Update
Amend
Alter
Modify
Less than or equal to?
>=
=>
=<
<=
The _____ command is used to completely remove a table from the database.
INSERT
ALTER
DROP
CREATE
(a) SQL command to view structure of the table named ‘STUDENT ‘.
A key which allows unique or null values.
Unique
Null key
Primary key
Alternate key
(a) SQL command used to destroy the table named ‘STUDENT ‘.
Write SQL command to create the given table.
Write the SQL command to change the datatype of the column SubjectName form char(10) to varchar(50).
A database is a tool whose purpose is to collect and organize information.
False
True
Using Excel is preferred
Text files are also worth for this
What is a table?
grid made up of rows and columns used to store information.
collection of information that is stored on a computer.
sheet that has controls that are used to view and enter information
group of information about a person, thing, or event.
(a) means duplication of data
____________ are known as rows and _______ are known as columns
(a)
______________ is named collection of data items which represents a complete unit of information.
Field
Record
Table
Data base
_____________ is a key uniquely identifies a record in a table.
Primary key
candidate key
Alternate key
A collection of related data.
Information
Valuable information
Database
Metadata
Which name must be unique within a database ?
Table
Field
Record
Character
Column header is refer as
Table
Relation
Attributes
Domain
Expand DBMS...
Data base machine system
Data basic machine system
Data basically mode system
Data base management system
Using which word allows you to specify that more than one condition must be met in a query?
Also
And
Or
Where
