DBS Final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Calculate total bytes occupied by table Table : tblCourse courseName varchar(20) Data OOPDA Data Structure Python Programming C++ Applied Database

61 (Count letters and spaces)

"MODIFY" is used with which "Query clause"? A. ALTER B. FROM C. WHERE D. ORDER BY

A

AUTO_INCREMENT columns must be NOT NULL. A. True B. False

A

How many values a function returns ? A. 1 B. 2 C. 0 D. 3

A

IP numbers can be represented as _________________ A. both integers and a string B. a string but not integers C. integers but not a string D. neither a string nor integers

A

In Sakila DB, what kind of Mapping is between Film and Film_Actor tables ? One to Many One to One Many to Many

A

MySQL cursors are used for A. Row by Row operation B. Bulk Processing C. Grouping D. None of the above

A

The IN, OUT and INOUT keywords do not apply to stored functions. A. True B. False

A

Triggers enable to enforce data integrity constraints. A. True B. False

A

Truncate statement is .. DDL DML SQL DCL

A

Using indexes optimizes query performance. A. True B. False

A

What default value gets stored in the columns of the table? A. NULL B. 0 C. 1 D. -1

A

Which clause is used to "Modify the existing field of the table"? A. ALTER B. FROM C. SELECT D. MODIFY

A

Which declaration doesn't use the same number of bytes and consumption of bytes depends on the input data? A. Varchar B. Char C. Both Varchar and Char D. None of the mentioned

A

Which declaration represents that "character data will consume the same number of bytes as declared and is right padded"? A. Char B. Varchar C. Both Char and Varchar D. None of the mentioned

A

Which of these values is not valid as an AUTO_INCREMENT value? A. 0 B. 1 C. 2 D. 3

A

Which statement is used to create a trigger? A. CREATE TRIGGER B. CREATE TRIGGERS C. PRODUCE TRIGGER D. PRODUCE TRIGGERS

A

Identify the TCL commands COMMIT ROLLBACK MarkPOINT RollPOINT

A,B

What are the different types entity mapping ? many to many many only one to one only one one to many many to one

A,C,E,F

Name the different states of a successful transaction

Active Partially Commited Commited

"Its All or nothing" which component of database has this property ?

Atomicity

Can I call a trigger directly from an application? A. Yes B. No

B

MySQL does not support Javascript Object Notation A. True B. False

B

Ross needs read-only access to Actor table under sakila db, which of the following is does the job as expected ? a. GRANT select on sakila.* to `ross`; b. GRANT select on sakila.Actor to `ross`; c. GRANT ALL Privileges on sakila.* to `ross`;

B

The AUTO_INCREMENT column attribute is best used with which type? A. FLOAT B. INT C. CHARACTER D. DOUBLE

B

To produce a new function, which statement is used? A. PRODUCE FUNCTION B. CREATE FUNCTION C. PRODUCE PROCEDURE D. CREATE PROCEDURE

B

What are the transaction logs supported by MySQL ? A. Failsafe, Recover Log B. Undo, Redo Log C. Commit, Rollback Log

B

What is def in the following statement?CREATETRIGGER xyz before insert ON def FOR EACH ROW; A. trigger name B. table name C. trigger statement D. update statement

B

What is the sequence MySQL parses a select statement ? Select fields, From, group by, having, where, order From, Select fields, where, group by, having, order From, Select fields, group by, having, where, order From, Select fields, group by, having, order

B

Which clause is used to "Filters out unwanted data"?A. FROM B. WHERE C. SELECT D. ORDER BY

B

Which clause is used to "group rows together by common columns values"? A. SELECT B. GROUP BY C. FROM D. WHERE

B

Which clause is used to "sort the rows of the final result set by one or more columns"? A. HAVING B. ORDER BY C. WHERE D. FROM

B

Which of the following query Skips first 10 rows and displays next 20 rows from actor table ? Select * from actor limit 20, 10; Select * from actor limit 10,20 ; Select * from actor and skip 10 rows and display 20 rows; Select top 20 * from actor;

B

What are the types of Loops supported by MySQL ? A. For Each B. Repeat Until C. Do While D. While Loop

B,D

A stored procedure is invoked using the statement __________ A. INVOKE B. SEE C. CALL D. RETURN

C

A view is nothing but a ________ table or a stored query A. Dynamic B. Real C. Virtual D. Static

C

In RegEx, What pattern matches this pattern $ ? A. Beginning of string B. Any single character C. End of string D. Not a valid RegEx

C

What does With GRANT Option do ? A. Grant Select access to user B. Grant Insert, Update, Delete access to user C. Make user a DBA D. None of the above.

C

What is a candidate key ? A. Identity column B. Alias for Foreign Key C. Alias for Primary Key D. Meaningless Simple Key

C

Which procedure parameter enables the caller to pass in a value and get back a value? A. IN B. OUT C. INOUT D. IN_OUT

C

Which statement is used to remove a trigger? A. REMOVE B. DELETE C. DROP D. CLEAR

C

What are the different types of Joins .. choose 3 JOIN Left Side Join Left JOIN Right JOIN Answer Join

C,D,E

For which of the following, triggers not supported?A. delete B. update C. insert D. views

D

How do I find out all databases starting with 'test'?A. SHOW DATABASES LIKE '%test%'; B. SHOW DATABASES LIKE '%test; C. SHOW DATABASES LIKE ''test'%; D. SHOW DATABASES LIKE 'test%';

D

To check how MySQL would execute a SELECT query, which statement is used? A. TELL B. SHOW C. DISPLAY D. EXPLAIN

D

What is meaning of "REFERENCES" in table definition? A. Primary key B. NULL C. Foreign Key D. A "foreign Key" belong to this particular table

D

What is not a valid join ? A. Inner Join B. Left Join C. Right Join D. Super Join

D

What is the equivalent term for "Table" in data model ? Schema Attribute TableName Entity

D

When do we use a HAVING clause? A. To limit the output of a query B. To limit the output of a query using an aggregate function only C. When GROUP by is used D. both b and c

D

Which is not a valid MySQL engine A. InnoDB B. MyIsam C. Memory D. Disk

D

Which of the following statements does not modify the table? A. INSERT B. UPDATE C. DELETE D. SELECT

D

Which of these types store the longest length of strings? A. CHAR B. VARCHAR C. TINYTEXT D. TEXT

D

Which of these can be used to generate hash values? A. AES_DECRYPT() B. AES_ENCRYPT() C. SHA1() D. MD5()

D,c?

Conditions for 1st normal form

Data should be of same domain Columns should be unique Values should be atomic

What is ER & EER diagram

ER : Entity Relationship Diagram EER : Enhanced Entity Relationship Diagram which introduces Inheritance.

We can use Salting technique with Hashing algorithms True False

False

What is wrong with this query ? SELECT c.customer_number,c.name, o.order_amount FROM customers c JOIN orders o ON c.customer_number = o.order_number WHERE c.customer_city = 'Glassboro';

It's wrong to join customer_number with order_number

Using Sakila DB Write a SUB Query or JOIN to list of First Name, Last Name and Email addresses of ACTIVE Customers who live in "Tamil Nadu" district.

SELECT customer.first_name, customer.last_name, customer.email FROM customer INNER JOIN address ON customer.address_id = address.address_id WHERE address.district = "Tamil Nadu" AND customer.active = 1;

Conditions for 2nd Normal Form

Should be in 1st NF No partial dependency

Conditions for 3rd Normal Form

Should be in 2nd NF Doesn't have Transitive Dependency.(When a non-prime attribute depends on other non-prime attributes rather than depending upon the prime attributes or primary key.)

Name the different query languages in SQL

Structured query language, data definition language, data manipulation language, data control language, transaction control language

Write 3 uses, why we need client tools to connect to mysql database. Your Answer:

The types of clients are : Graphical client, command line, and programmatic. We need these clients for security and protection, because they make things more convenient for us, and for the programmatic connection.


Kaugnay na mga set ng pag-aaral

Introduction to Sociology Ch 16 Questions

View Set

RN Adult Medical Surgical Online Practice 2023 B

View Set

ATI Knowledge and Clinical Judgement Beginning Test

View Set

Principles of Information Security (6th. Ed) - Chapter 9 Review Questions

View Set

Gen Bio 100: Chapter 6.5 Enzymes

View Set

Ch. 3 The costs of production and profit maximization

View Set