Este Quiz é cronometrado.
Você tem 45 minutos para completar as 31 questões deste quiz..
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;
1
2
4
8
16
The relationship between DEPARTMENT and EMPLOYEE is a
One-to-one relationship
One-to-many relationship
Many-to-many relationship
Many-to-one relationship
None of the above
Which of the following terms does refer to the correctness and completeness of the data in a database?
Data security
Data constraint
Data independence
Data model
Data integrity
Which of these field types would be best to hold a .jpg image?
char binary
nchar binary
text
blob
The result of a SQL SELECT statement is a(n) ________ .
report
form
file
table
To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
ONLY
UNIQUE
DISTINCT
SINGLE
What’s the default port for MySQL Server?
8080
3306
3000
2308
What is an index?
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
What is a view?
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.
The difference between the DELETE and TRUNCATE SQL clauses is:
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
Which of the following statements gets the total value of the column 'Price' in the 'Sales' table?
SELECT ADD(Price) FROM Sales
SELECT SUM(Price) WHERE Sales
SELECT TOTAL(Price) FROM Sales
SELECT SUM(Price) FROM Sales
A trigger belongs to...
to all tables in the database
a single table in the database
more than one table in the database
A collection of related fields is called a:
database
record
relation
Also known as online, this type of processing occurs at the same time as the transaction occurs.
direct
immediate
method
real-time
Which of the following is correct:
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
The language used in application programs to request data from the DBMS is referred to as the
DML
DDL
DCL
SDL
To delete a particular column in a relation the command used is:
UPDATE TABLE
TRUNCATE COLUMN
ALTER, DROP
DELETE COLUMN
_________ is a virtual table that draws its data from the result of an SQL SELECT statement.
View
Synonym
Sequence
Transaction
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;
0 row and 4 columns
3 rows and 4 columns
3 rows and 5 columns
6 rows and 5 columns
E-R model uses this symbol to represent weak entity set ?
Dotted rectangle
Diamond
Doubly outlined rectangle
Relational Algebra is
Data Definition Language
Meta Language
Procedural query Language
Key to represent relationship between tables is called
Primary key
Secondary key
Foreign key
The conceptual model is
Dependent on hardware
Dependent on software
Dependent on both hardware and software
Independent of both hardware and software
The RDBMS terminology for a row is
Tuple
Relation
Attribute
Degree
A set of possible data values is called
Domain
In E-R Diagram derived attribute are represented by
Ellipse
Dashed ellipse
Rectangle
Triangle
The default parameter type in stored procedures is
IN
OUT
INOUT
There is no default type
Consider a table OLD with few rows. The statement CREATE TABLE new AS SELECT * FROM OLD WHERE 1=2
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
Choose the correct pattern Matching sign for matching a single character
_
?
*
%
Rollback and Commit affect
Only DML statements
Only DDL statements
Both DML and DDL
All statements
What is the order of execution of SQL clauses 1. having 2. group by 3. where 4. orderby
1 2 3 4
3 2 1 4
2 3 4 1
4 3 1 2