Questão 1
Questão
What is output by the SQL below?
DROP TABLE IF EXISTS foo;
CREATE TABLE foo (a INT, b INT, c INT);
INSERT INTO foo VALUES (1,2,3);
INSERT INTO foo SELECT * FROM foo;
INSERT INTO foo SELECT * FROM foo;
SELECT sum(b) FROM foo;
Questão 2
Questão
The relationship between DEPARTMENT and EMPLOYEE is a
Questão 3
Questão
Which of the following terms does refer to the correctness and completeness of the data in a database?
Responda
-
Data security
-
Data constraint
-
Data independence
-
Data model
-
Data integrity
Questão 4
Questão
Which of these field types would be best to hold a .jpg image?
Responda
-
char binary
-
nchar binary
-
text
-
blob
Questão 5
Questão
The result of a SQL SELECT statement is a(n) ________ .
Questão 6
Questão
To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
Responda
-
ONLY
-
UNIQUE
-
DISTINCT
-
SINGLE
Questão 7
Questão
What’s the default port for MySQL Server?
Questão 8
Questão
What is an index?
Responda
-
An index is a special way to join 2 or more tables.
-
An index is a database table attribute, which speeds-up data search within a table.
-
An index is the same as alias.
-
No such thing in MySQL
Questão 9
Responda
-
A view is a virtual table which results of executing a pre-compiled query.
-
A view is a special stored procedure executed when certain event occurs.
-
A view is a database diagram.
Questão 10
Questão
The difference between the DELETE and TRUNCATE SQL clauses is:
Responda
-
The DELETE clause deletes all rows in a database table, while the TRUNCATE clause can have a WHERE condition and might or might not delete all rows in a table.
-
The TRUNCATE clause deletes all rows in a database table, while the DELETE clause can have a WHERE condition and might or might not delete all rows in a table.
-
The TRUNCATE clause is identical to the DELETE clause
Questão 11
Questão
Which of the following statements gets the total value of the column 'Price' in the 'Sales' table?
Responda
-
SELECT ADD(Price) FROM Sales
-
SELECT SUM(Price) WHERE Sales
-
SELECT TOTAL(Price) FROM Sales
-
SELECT SUM(Price) FROM Sales
Questão 12
Questão
A trigger belongs to...
Responda
-
to all tables in the database
-
a single table in the database
-
more than one table in the database
Questão 13
Questão
A collection of related fields is called a:
Responda
-
database
-
file
-
record
-
relation
-
table
Questão 14
Questão
Also known as online, this type of processing occurs at the same time as the transaction occurs.
Responda
-
direct
-
immediate
-
method
-
real-time
Questão 15
Questão
Which of the following is correct:
Responda
-
a SQL query automatically eliminates duplicates.
-
SQL permits attribute names to be repeated in the same relation.
-
a SQL query will not work if there are no indexes on the relations
-
None of these
Questão 16
Questão
The language used in application programs to request data from the DBMS is referred to as the
Questão 17
Questão
To delete a particular column in a relation the command used is:
Responda
-
UPDATE TABLE
-
TRUNCATE COLUMN
-
ALTER, DROP
-
DELETE COLUMN
Questão 18
Questão
_________ is a virtual table that draws its data from the result of an SQL SELECT statement.
Responda
-
View
-
Synonym
-
Sequence
-
Transaction
Questão 19
Questão
A relational database contains two tables student and department.
Student table has columns (roll_no, name and dept_id )and Department table has columns (dept-id and dept-name).
Department table has 3 records and Student table has 2 records.
How many rows and columns will be retrived by the following SQL, statement?
Select * from student, department;
Responda
-
0 row and 4 columns
-
3 rows and 4 columns
-
3 rows and 5 columns
-
6 rows and 5 columns
Questão 20
Questão
E-R model uses this symbol to represent weak entity set ?
Questão 21
Questão
Relational Algebra is
Questão 22
Questão
Key to represent relationship between tables is called
Responda
-
Primary key
-
Secondary key
-
Foreign key
-
None of these
Questão 23
Questão
The conceptual model is
Questão 24
Questão
The RDBMS terminology for a row is
Responda
-
Tuple
-
Relation
-
Attribute
-
Degree
Questão 25
Questão
A set of possible data values is called
Responda
-
Attribute
-
Degree
-
Tuple
-
Domain
Questão 26
Questão
In E-R Diagram derived attribute are represented by
Responda
-
Ellipse
-
Dashed ellipse
-
Rectangle
-
Triangle
Questão 27
Questão
The default parameter type in stored procedures is
Responda
-
IN
-
OUT
-
INOUT
-
There is no default type
Questão 28
Questão
Consider a table OLD with few rows. The statement CREATE TABLE new AS SELECT * FROM OLD WHERE 1=2
Responda
-
copies all the rows from OLD to NEW
-
creates a dummy NEW table
-
creates an empty NEW table with column definitions same as OLD
-
creates a table NEW that acts as a synonym for OLD
Questão 29
Questão
Choose the correct pattern Matching sign for matching a single character
Questão 30
Questão
Rollback and Commit affect
Responda
-
Only DML statements
-
Only DDL statements
-
Both DML and DDL
-
All statements
Questão 31
Questão
What is the order of execution of SQL clauses
1. having 2. group by 3. where 4. orderby
Responda
-
1 2 3 4
-
3 2 1 4
-
2 3 4 1
-
4 3 1 2