Database-MySQL [3i Infotech Placement]: Sample Questions 142 - 144 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 142

Edit

Describe in Detail

Essay▾

What is 1 NF (Normal Form) ?

Explanation

• The domain of attribute must include only atomic (simple, indivisible) values.

1NF (First Normal Form) Rules

• Each table cell should contain a single value.
• Each record needs to be unique.

1NF Example:

• Understanding the example of above Normalization table
 Full Name Physical Address MOVIES RENTED SALTUTATION Janat First Street Plot No 4 Pirates of the Caribbean Ms. Janat First Street Plot No 4 Clash of the Titans Ms. Rohit 3rd Street 34 Forgetting Sarah Marshal Mr. Rohit 3rd Street 34 Daddy՚s Little Girls Mr. Rohit 5th Avenue Clash of the Titans Mr.

Question 143

Question

MCQ▾

A B C is a set of attributes. The functional dependency is a follows:

AB B

AC C

C B

Choice (4)

a.

Is in 3NF

b.

Is in BCNF

c.

Is in 2NF

d.

Is in 1NF

d.

Explanation

 {A, B, C}AC is the primary key Neither C is a key nor B is a prime attributeSo, it is not 3NF
• Now, B is not functionally dependent on key AC
• So, it is not in 2NF
• Hence, given functional dependency is 1 NF.

Question 144

Edit

Appeared in Year: 2006

Describe in Detail

Essay▾

What is the difference among “dropping a table” “truncating a table” and “deleting all records” from a table?

Explanation

Drop Table

• It will remove the existence of the table from the database along with its data and structure and all the constraints.
• The table will be no longer available.
• This is a DDL Statement.

Truncate Table

• It will remove all the rows from a table.
• It will not delete the table. It is a DDL statement that means the deleted rows cannot be reverted back by ROLLBACK statement.
• It will only be used if users needs to delete the entire rows from a tables.
• No conditions will be applied in Truncate.

Delete Table

• It is a DML statement which will delete rows from a table according to the matching criteria mentions in the ‘where’ clause and these rows can be reverted back by ‘ROLLBACK’ statement if ‘COMMIT’ is not fired.
• Delete statement will used in both the cases, eitehr selected rows or entire rows from tables.

Developed by: