MySQL Database Management System

Description

ThirdYear Third Year Quiz on MySQL Database Management System, created by Faheem Ahmed on 26/03/2018.
Faheem Ahmed
Quiz by Faheem Ahmed, updated more than 1 year ago
Faheem Ahmed
Created by Faheem Ahmed about 6 years ago
1216
0

Resource summary

Question 1

Question
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;
Answer
  • 1
  • 2
  • 4
  • 8
  • 16

Question 2

Question
The relationship between DEPARTMENT and EMPLOYEE is a
Answer
  • One-to-one relationship
  • One-to-many relationship
  • Many-to-many relationship
  • Many-to-one relationship
  • None of the above

Question 3

Question
Which of the following terms does refer to the correctness and completeness of the data in a database?
Answer
  • Data security
  • Data constraint
  • Data independence
  • Data model
  • Data integrity

Question 4

Question
Which of these field types would be best to hold a .jpg image?
Answer
  • char binary
  • nchar binary
  • text
  • blob

Question 5

Question
The result of a SQL SELECT statement is a(n) ________ .
Answer
  • report
  • form
  • file
  • table

Question 6

Question
To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
Answer
  • ONLY
  • UNIQUE
  • DISTINCT
  • SINGLE

Question 7

Question
What’s the default port for MySQL Server?
Answer
  • 8080
  • 3306
  • 3000
  • 2308

Question 8

Question
What is an index?
Answer
  • 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

Question 9

Question
What is a view?
Answer
  • 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.

Question 10

Question
The difference between the DELETE and TRUNCATE SQL clauses is:
Answer
  • 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

Question 11

Question
Which of the following statements gets the total value of the column 'Price' in the 'Sales' table?
Answer
  • SELECT ADD(Price) FROM Sales
  • SELECT SUM(Price) WHERE Sales
  • SELECT TOTAL(Price) FROM Sales
  • SELECT SUM(Price) FROM Sales

Question 12

Question
A trigger belongs to...
Answer
  • to all tables in the database
  • a single table in the database
  • more than one table in the database

Question 13

Question
A collection of related fields is called a:
Answer
  • database
  • file
  • record
  • relation
  • table

Question 14

Question
Also known as online, this type of processing occurs at the same time as the transaction occurs.
Answer
  • direct
  • immediate
  • method
  • real-time

Question 15

Question
Which of the following is correct:
Answer
  • 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

Question 16

Question
The language used in application programs to request data from the DBMS is referred to as the
Answer
  • DML
  • DDL
  • DCL
  • SDL

Question 17

Question
To delete a particular column in a relation the command used is:
Answer
  • UPDATE TABLE
  • TRUNCATE COLUMN
  • ALTER, DROP
  • DELETE COLUMN

Question 18

Question
_________ is a virtual table that draws its data from the result of an SQL SELECT statement.
Answer
  • View
  • Synonym
  • Sequence
  • Transaction

Question 19

Question
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;
Answer
  • 0 row and 4 columns
  • 3 rows and 4 columns
  • 3 rows and 5 columns
  • 6 rows and 5 columns

Question 20

Question
E-R model uses this symbol to represent weak entity set ?
Answer
  • Dotted rectangle
  • Diamond
  • Doubly outlined rectangle
  • None of these

Question 21

Question
Relational Algebra is
Answer
  • Data Definition Language
  • Meta Language
  • Procedural query Language
  • None of the above

Question 22

Question
Key to represent relationship between tables is called
Answer
  • Primary key
  • Secondary key
  • Foreign key
  • None of these

Question 23

Question
The conceptual model is
Answer
  • Dependent on hardware
  • Dependent on software
  • Dependent on both hardware and software
  • Independent of both hardware and software

Question 24

Question
The RDBMS terminology for a row is
Answer
  • Tuple
  • Relation
  • Attribute
  • Degree

Question 25

Question
A set of possible data values is called
Answer
  • Attribute
  • Degree
  • Tuple
  • Domain

Question 26

Question
In E-R Diagram derived attribute are represented by
Answer
  • Ellipse
  • Dashed ellipse
  • Rectangle
  • Triangle

Question 27

Question
The default parameter type in stored procedures is
Answer
  • IN 
  • OUT 
  • INOUT 
  • There is no default type

Question 28

Question
Consider a table OLD with few rows. The statement CREATE TABLE new AS SELECT * FROM OLD WHERE 1=2
Answer
  • 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 

Question 29

Question
Choose the correct pattern Matching sign for matching a single character
Answer
  • _ 
  • ? 
  • * 
  • %

Question 30

Question
Rollback and Commit affect
Answer
  • Only DML statements 
  • Only DDL statements 
  • Both DML and DDL 
  • All statements

Question 31

Question
What is the order of execution of SQL clauses 1. having 2. group by 3. where 4. orderby
Answer
  • 1 2 3 4 
  • 3 2 1 4 
  • 2 3 4 1 
  • 4 3 1 2
Show full summary Hide full summary

Similar

BMSC335 Lecture 3 Week 1
Maddie McIntyre
Peptic Ulcer
Miar Abdelhamid
Immunology
El Prs
Insurance Quiz
crabbette
GCSE English Literature: Of Mice and Men
mia.rigby
GCSE Biology Quiz
joannaherbert
GCSE AQA Biology 1 Adaptations, Competition & Environmental Change
Lilac Potato
GCSE Maths Quiz: Ratio, Proportion & Measures
Andrea Leyden
Frankenstein - Mary Shelley
Johnny Hammer
PSBD TEST 1
amrik.sachdeva
1PR101 2.test - Část 5.
Nikola Truong