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

Edit

Appeared in Year: 2006

Describe in Detail

Essay▾

How functional dependency is related to database table design?

Explanation

  • Normalization is the technique of breaking the complex tables into much understandable smaller one to improve the optimization of the database structure.
  • The concept of “Functional Dependency” is followed in Second Normal Form (2NF) which means all the columns in the schema should be functionally dependent on the primary key of that schema.
  • All the columns in the tables should have a relationship with the main key. In this situation, all the columns are functionally dependent.
  • Say for example, if you have an Employee table that has Empno, Ename, Salry columns.
  • Here empno is the main key.
  • Ename refers employee name and salary refers employee salary.
  • Those are functionally dependent on Empno.
  • If you include InvoiceNo in this table, it is irrelevant and it is not functionally dependent on Empno.
  • As per Second Normal Form (2NF) , all the non-functionally dependent columns to be removed from the schema and applied to the new table to increase the performance of the database.

Question 99

Edit

Describe in Detail

Essay▾

What is DML (Data Manipulation Language) ?

Explanation

Define Data Defination Language
  • Data Manipulation is:
    • retrieval of information from the database
    • insertion of new information into the database
    • deletion of information in the database
    • modification of information in the database
  • A DML is a language which enables users to access and manipulate data.
  • The goal is to provide efficient human interaction with the system.
  • There are two types of DML:
    • procedural: the user specifies what data is needed and how to get it
    • nonprocedural: the user only specifies what data is needed
      • Easier for user
      • May not generate code as efficient as that produced by procedural languages
  • A query language is a portion of a DML involving information retrieval only. The terms DML and query language are often used synonymously.

Developed by: