Database-MySQL [3i Infotech Placement]: Sample Questions 10 - 12 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 10

Edit

Write in Short

Short Answer▾

How to run SQL script from a Unix Shell?

Explanation

Run SQL script file

  1. Open a command prompt window.
  2. In the Command Prompt window, type: sqlcmd -S myServer⧵instanceName -i C: ⧵myScript. sql
  3. Press ENTER.

Question 11

Edit

Describe in Detail

Essay▾

How can you find the minimal key of relational schema?

Explanation

  • Minimal key can identify each tuple of the relation schema uniquely.
  • For finding the minimal key- find the closure that is the set of all attributes dependent on any given set of attributes under the given set of functional dependency.

Algo I

I Determining , closure for X, given set of FDs F

1. Set

2. Set Old

3. For each FD Y Z in F and if Y belongs to then add Z to

4. Repeat steps 2 and 3 until Old

Algo. II

Determining minimal K for relation schema R, given set of FDs F

1. Set K to R that is make K a set of all attributes in R

2. For each attribute A in K

a. Compute with respect to

b. If then set

Question 12

Edit

Describe in Detail

Essay▾

What is system catalog or catalog relation? How is better known as?

Explanation

Definethe System Catalog
  • A DBMS maintains information about each of relation and index that it contains.
  • The metadata is the information stored in a collection of relations maintained by the system
  • It is also called data dictionary.
  • The catalog relations are also called the system catalog or the data dictionary.
  • The system catalog is sometimes also referred to as metadata (data about data) .
  • The system catalog is generally used only for query optimization.
  • It is also known as metadata.

Developed by: