34 questions
What does SQL stand for?
a) Structured Question Language
b) Strong Question Language
c) Structured Query Language
d) Structured Query Layout
Which SQL statement is used to extract data from a database?
a) OPEN
b) SELECT
c) EXTRACT
d) GET
Which SQL statement is used to update data in a database?
a) SAVE
b) MODIFY
c) UPDATE
d) SAVE AS
Which SQL statement is used to delete data from a database?
a) REMOVE
b) COLLAPSE
c) DELETE
d) DROP
Which SQL statement is used to insert new data in a database?
a) INSERT NEW
b) ADD RECORD
c) INSERT INTO
d) ADD NEW
With SQL, 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) SELECT ONLY FirstName FROM Persons
With SQL, how do you select all the columns from a table named "Persons"?
a) SELECT Persons
b) SELECT [all] FROM Persons
c) SELECT * FROM Persons
d) SELECT *.Persons
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?
a) SELECT * FROM Persons WHERE FirstName<>'Peter''
b) SELECT * FROM Persons WHERE FirstName='Peter'
c) SELECT [all] FROM Persons WHERE FirstName='Peter'
d) SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter
With SQL, 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 LIKE 'a%'
b) SELECT * FROM Persons WHERE FirstName='a'
c) SELECT * FROM Persons WHERE FirstName LIKE '%a'
d) SELECT * FROM Persons WHERE FirstName='%a%'
With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
a) SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
b) SELECT FirstName='Peter', LastName='Jackson' FROM Persons
c) SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'
d) SELECT FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'
Which SQL keyword is used to sort the result-set?
a) ORDER
b) SORT
c) ORDER BY
d) SORT BY
With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
a) SELECT * FROM Persons ORDER FirstName DESC
b) SELECT * FROM Persons ORDER BY FirstName DESC
c) SELECT * FROM Persons SORT 'FirstName' DESC
d) SELECT * FROM Persons SORT BY 'FirstName' DESC
With SQL, how can you insert a new record into the "Persons" table?
a) INSERT ('Jimmy', 'Jackson') INTO Persons
b) INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
c) INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
d) INSERT ('Jimmy', 'Jackson') INTO table Persons
With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?
a) INSERT ('Olsen') INTO Persons (LastName)
b) INSERT INTO Persons (LastName) VALUES ('Olsen')
c) INSERT INTO Persons ('Olsen') INTO LastName
d) INSERT INTO Persons INTO LastName ('Olsen')
How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
a) UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
b) MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
c) MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
d) UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?
a) DELETE FROM Persons WHERE FirstName = 'Peter'
b) DELETE FirstName='Peter' FROM Persons
c) DELETE ROW FirstName='Peter' FROM Persons
d) DROP ROW FirstName='Peter' FROM Persons
With SQL, how can you return the number of records in the "Persons" table?
a) SELECT COUNT(*) FROM Persons
b) SELECT LEN(*) FROM Persons
c) SELECT NO(*) FROM Persons
d) SELECT COLUMNS(*) FROM Persons
Which operator is used to select values within a range?
a) RANGE
b) WITHIN
c) BETWEEN
D) None
Which operator is used to search for a specified pattern in a column?
a) FROM
b) LIKE
c) GET
d) Such as
Which SQL statement is used to create a table in a database?
a) CREATE TABLE
b) CREATE DATABASE TAB
c) CREATE DB
d) CREATE DATABASE TABLE
Which of the following is NOT an example of Data Manipulation Language?
SELECT
INSERT
UPDATE
CREATE
The _____________ is used for creating and destroying tables, indexes, and other forms of structures
data manipulation language.
data control language.
transaction control language.
Data Definition Language.
Which of the following type of database management systems stores objects rather than data such as integers, strings, or real numbers?
Relational
Flat-File
Hierarchical
Object-Oriented
In order to delete data from a database, which of the following SQL statements would you use?
COLLAPSE
DELETE
REMOVE
UPDATE
DBMS languages have different syntaxes. However, which of the following is an example of deleting a database?
drop database database_name
delete database_name
delete database database_name
drop database_name
_________ level describes what data is stored in the database and the relationships among the data.
Physical
Logical
Conceptual
None of the Above
In the ER model, what denotes a Relationship between the entities?
Double ellipse.
Diamond
Rectangle.
Circle
Which of the following data models defines WHAT the system contains?
Physical
Conceptual
Logical
UML
Which of the following model describes HOW the system will be implemented using a specific DBMS system?
Physical
Conceptual
Logical
UML
The primary goal of using data model is
to organize, scope and define business concepts and rules.
to develop technical map of rules and data structures.
actual implementation of the database.
To ensure that all data objects required by the database are accurately represented.
Which of the following represents the data in a tree-like structure in which there is a single parent for each record?
A Relational Database
Hierarchical Database
Network Database
Object Oriented Database
In this type of database model, the schema, is represented using nodes and relationship types and is not restricted to being a hierarchy or lattice
Relational Database
Hierarchical Database
Network Database
Object Oriented Database
In a relational database a relationship between entities is implemented by storing the primary key of one entity as a pointer or __________ in the table of another entity.
primary key
foreign key
unique key
not null key
A ______________ is a database that subscribes to a model with information represented by objects
Relational Database
Hierarchical Database
Network Database
Object Oriented Database