1.

Describe two levels of data manipulation language giving an example in each case

Answer»

Types of Data Manipulation Languages

  • Procedural Programming

In this type, the user will specify what data is required and how to get it.

  • Declarative Programming

Here, the user will only specify what data is required.

Commands

The DML section of SQL consists of following a set of commands:

  • Select/ From/ Where
  • Insert/ Into/ Values
  • Update/ Set/ Where
  • Delete/ From/ Where

The database programmers and users are allowed by this basic to enter the data and information into the database and then retrieve it by the use of several numbers of filter options.

  • Select/ From/ Where
  • Select

It is one of the basic query commands available in SQL and works in the same way as the projection operation of relational algebra. The attributes are selected by this command on the basis of the condition defined by the Where Clause.

  • From

A relation name is taken by this clause as an argument from where attributes are to be projected or selected.

  • Where

The predictions or conditions that should match for qualifying the attributes to be projected are defined by this clause.

For Example

Select author_name

From book_set

Where age> 40

The names of the authors will be yielded by the command from the relation book_set whose age is greater than 40.

Insert/ Into/ Values
Using this command, the programmers can insert values into the rows of a table. The general syntax for this command is mentioned below:

Insert into Table_Name

(column1, column2, column3….. columnN) Values ( value1, value2, value3….. valueN)



Discussion

No Comment Found

Related InterviewSolutions