Professional Documents
Culture Documents
PDF PDF
PDF PDF
a. postgresql
b. MySQL
c. Oracle
d. impresql
e. DB2
f. no answer
Which of the following are true about the mysql client program? (choose three) bcd
On a relational DBMS there may be multiple ___ defined. Each of them may contain
one or more ___, which in turn contain the data in the form of ___ . (choose the
proper combination to fill in the blanks) c
f. no answer
Which of the following are true regarding case sensitivity in MySQL? (choose three)
a. socket files
b. TCP/IP
c. shared memory
d. ICMP
e. named pipes
f. no answer
The SQL language contains instructions that allow a client to: (choose three) A,D, E
Which of the following are valid line terminators in the mysql command line? (choose
three) A,B,E
a. \g
b. ;
c. /G
d. \;
e. \G
f. /g
a. name
b. optional additional properties
c. SQL dialect
d. data type
e. storage engine
A,B,D
Which of the following are responsibilities of a DBMS? (choose three)BCE
If the name of a MySQL database contains a space character, how should it be used
in MySQL instructions?a
a. flat-file
b. network
c. expectational
d. hierarchical
e. relational
f. no answer
Given a database named Store that contains a table named Products which has a
column named Price, which of the following are proper ways to refer to the Price
column from within a MySQL instruction? (choose two)e,f
a. `Store`.`Products`.`Price`
b. Store.Price
c. `Store.Products.Price`
d. Products.Store.Price
e. Store.Products.Price
f. /Store/Products/Price
SQL is: e
Name VARCHAR(10)
Which of the following SQL statements will remove all the rows from a table named
Products, leaving the table's structure intact? A
a. VARCHAR
b. INT
c. DATE
d. SET
1. number
2. enumerated data
3. character string
4. temporal data
a. a – 3, b – 1, c – 2, d – 4
b. a – 2, b – 4, c – 1, d – 3
c. a – 3, b – 1, c – 4, d – 2
d. a – 1, b – 2, c – 3, d – 4
e. a – 4, b – 2, c – 1, d – 4
f. no answer
Which of the following databases exist by default in MySQL? (choose two) b,e
a. privileges
b. mysql
c. server
d. meta_inf
e. information_schema
Which of the following SQL statements could be used for adding a column to a table
named People and placing it last in the column list? b
Choosing a certain storage engine when creating a MySQL table could affect the
following aspects: (choose three) A B E
Which of the following are valid MySQL instructions for creating a database named
Products? (choose four) A D E F
a. a temporary table may not have the same name as an existing regular table
b. a temporary table will automatically be deleted when the client that created it
disconnects from the server
c. a temporary table is identical to a regular table in every way, except it is
deleted on server restart
d. if a client has created a temporary table, other clients will not be allowed to
create tables with the same name
e. a temporary table created by one SQL client can be seen by other SQL
clients
f. no answer
Which of the following SQL instructions could be used for removing a database named
Movies? (choose three) A b D
a. MERGE
b. MEMORY
c. InnoDB
d. FEDERATED
e. MyISAM
f. no answer
What MySQL instruction could be used for finding a table's storage engine? A
f. no answer
What is the proper SQL instruction for listing only MySQL databases whose names
begin with the letter h? b
Which of the following elements are part of a column definition? (choose three) A C E
Curs 3
Given the table created with the definition below, which of following statements will
correctly insert a new record having non-null values for both columns?
f. no answer
Given the SQL table having the definition below, what will be the effect of the following
SQL statement if the server is functioning in non-strict mode? d
CREATE TABLE Cellphones(
Manufacturer VARCHAR(50) NOT NULL,
DisplayType VARCHAR(20) DEFAULT 'color',
Vibration TINYINT NOT NULL DEFAULT 1
);
Which of the following is NOT true about a result set produced by a SELECT
statement? c
a. the result consists of a set of records whose order can be chosen by the
client
b. each column in a result set has a name
c. a result set has an associated storage engine
d. the name of each column in a result set can be automatically chosen by the
server or specified by the client
e. no answer
Which of the following elements may participate in an expression that specifies the
value for a column returned by a SELECT statement? (choose four)a,b,d,f
a. constant values
b. operators
c. storage engines
d. table columns
e. data types
f. predefined SQL functions
Which of the following are true about the following form of the INSERT statement?
(choose two): a b
a. the order of the specified column values must match the order of the
columns in the table definition
b. the number of column values specified must match the number of columns in
the table definition
c. the statement is not valid because the list of column names is mandatory
and must follow the table name
d. the statement is not valid because, if the list of column names is not
specified, the client is not allowed to specify any values
Given an SQL table named People that contains two columns - FullName and
DateOfBirth - which of the following SELECT statements would generate a result set
having two columns named Name and DoB? (choose three)a,b,c
a. SELECT FullName AS Name, DateOfBirth DoB FROM People
b. SELECT FullName AS Name, DateOfBirth AS DoB FROM People
c. SELECT FullName Name, DateOfBirth DoB FROM People
d. SELECT Name AS FullName, DoB AS DateOfBirth FROM People
e. SELECT FullName, DateOfBirth AS Name,DoB FROM People
The INSERT statement allows the SQL client to add new records to a table in many
ways, except: e
Given an SQL table having the contents below, what will be the result returned by the
specified SELECT query?b
SELECT Name FROM People WHERE Age>12 ORDER BY Surname DESC, Name
LIMIT 1
a. dobbs
b. john
c. joanna
d. doe
e. jerry
f. brad
g. no answer
Which of the following is true about inserting new records into an SQL table if the
MySQL server is functioning in strict mode? a
a. omitting the value for a NOT NULL column whose definition doesn't specify a
default value will generate an error
b. missing columns in INSERT statements will automatically be populated with
default values chosen by the server
c. columns declared as NOT NULL will have an implicit default value of 0
d. values that are too big to fit in their column type will be truncated to the
maximum value allowed by the column type
e. no answer
What is the correct statement for deleting all the products having a price between 30
and 100 from a table named Products that has a column named Price?f
Given an SQL table named Employees that has a column named Salary which
represents the monthly salary, which of the following statements will produce a 10%
increase for annual salaries less than 10000?f
a. UPDATE Employees SET Salary=Salary*12 WHERE Salary*1.1<10000
b. UPDATE Employees SET Salary=Salary*0.9 WHERE Salary<10000
c. UPDATE Employees SET Salary=Salary*0.1 WHERE Salary<10000
d. UPDATE Employees SET Salary=Salary*1.1 WHERE Salary>10000
e. UPDATE Employees SET Salary*1.1 WHERE Salary*12<10000
f. UPDATE Employees SET Salary=Salary*1.1 WHERE Salary*12<10000
g. no answer
a. SET
b. MODE
c. CHANGE
d. MODIFY
e. UPDATE
f. ALTER
g. no answer
Which of the following are DML (Data Manipulation Language) instructions? (choose
four)a,b,c,f
a. SELECT
b. DELETE
c. UPDATE
d. DROP
e. ALTER
f. INSERT
Given an SQL table named Rectangles that contains two columns – Width and Height –
which of the following are correct SELECT statements that return the rectangle with the
smallest area? (choose two)a,d
Curs 4
2.Which of the following SQL statements will correctly insert a new row into a table
created with the definition below, without generating any errors or warnings?
a. TIME
b. TIMESTAMP
c. YEAR
d. MICROTIME
e. DATETIME
f. DATE
g. no answer
4.What will be the set of allowed values for an SQL table column having the following
definition? e
a. 0...999
b. -2147483648...2147483647
c. 0...2147483647
d. 0...100
e. -999...999
f. no answer
5.What is the main difference between the FLOAT and DECIMAL MySQL data types? b
a. FLOAT is used for storing fixed-point numbers, while DECIMAL is used for
storing floating-point numbers
b. DECIMAL is used for storing fixed-point numbers, while FLOAT is used for
storing floating-point numbers
c. operations involving DECIMAL values run much faster than those involving
FLOAT values
d. valid values inserted into a DECIMAL column of a record may be
rounded/truncated, while FLOAT values store precise values
e. DECIMAL may store negative numbers, while FLOAT may not
f. no answer
6.Which of the following SQL statements will execute successfully (without warnings or
errors) and will insert the value 'yes' into the table with the definition below, if the server
is functioning in non-strict mode? e
7.What will be the last value inserted on column i when executing the SQL script below?
a
CREATE TABLE t(i INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t VALUES();
INSERT INTO t VALUES();
INSERT INTO t VALUES();
DELETE FROM t WHERE i>1 AND i<3;
INSERT INTO t VALUES();
a. 4
b. 0
c. 2
d. 1
e. NULL
f. 3
g. no answer
8.Which of the following is NOT a MySQL data type for representing integers?b
a. TINYINT
b. LARGEINT
c. INT
d. MEDIUMINT
e. BIGINT
f. SMALLINT
g. no answer
9.What will be the possible range of values for the column having the definition below?
d
10.Which of the following is NOT true regarding the SET data type?d
a. when inserting a value into a SET column, the value must be quoted as a
string, using '...' (single quotes)
b. each possible value for a SET column must be specified in the column
definition
c. each value stored in a SET column may be a combination of the possible
values specified in the column definition
d. the empty string "" is an invalid value and cannot be inserted on a SET
column
e. it is an enumerated data type
f. each value is represented internally by MySQL as an integer
g. no answer
11.Choosing a certain data type for an SQL table column will NOT influence:d
12.Which of the following are differences between the DATETIME and TIMESTAMP
types? (choose three)a,c,e
13.Which of the following properties does a MySQL character string have that an octet
string doesn't? (choose two)c,e
a. maximum length
b. unsigned property
c. charset
d. auto_increment value
e. collation
14.What column modifiers may be used in an INT column definition? (choose four)bcdf
a. CHARSET
b. AUTO_INCREMENT
c. ZEROFILL
d. UNSIGNED
e. ON UPDATE CURRENT_TIMESTAMP
f. NOT NULL
15.Which of the following character sets will not provide Romanian special characters?a
a. ASCII
b. UTF8
c. latin2
d. UCS2
e. no answer
16.Which of the following is true when using character strings having the collation
utf8_bin?c