0% found this document useful (0 votes)
349 views6 pages

IT-402 - DBMS Que & Ans - 3

The document discusses database concepts like filtering, queries, DDL and DML commands, and the SELECT, INSERT, UPDATE, DELETE statements. It also talks about creating forms and reports in a database, differentiating between them, and prerequisites for creating forms and reports. Examples are provided to explain concepts like the UPDATE command.

Uploaded by

Krish Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
349 views6 pages

IT-402 - DBMS Que & Ans - 3

The document discusses database concepts like filtering, queries, DDL and DML commands, and the SELECT, INSERT, UPDATE, DELETE statements. It also talks about creating forms and reports in a database, differentiating between them, and prerequisites for creating forms and reports. Examples are provided to explain concepts like the UPDATE command.

Uploaded by

Krish Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

STD : 10 SUB : IT-402

DATABASE MANAGEMET SYSTEM ( W/S-3)


(33) What do you mean by filtering?
Ans. Filtering means , while extracting data from table hiding some
data and presenting only what we want

(34) What is the purpose of using queries?


Ans. A database query is used to access data of the table or to
modify structure of the table. Query can be used to retrieve, insert,
update or delete data from the table. Using query data can be
retrieve from one table or more tables

(35) Write difference between DDL and DML commands


Ans.
DDL Command DML Command
1. it is known as Data definition It is known as Data
language or Data description Manipulation Language
language
2. These commands are used to These commands are used
define, modify or remove the to access and manipulate
structure of various objects of data in a database
database e.g. Table
3. e.g. CREATE , ALTER , DROP e.g. SELECT , INSERT ,
UPDATE , DELETE

(36) Explain some DML commands


Ans.
• SELECT : to retrieve data from database
• INSERT: To insert data in a table
• UPDATE: Updates existing data in a database
• DELETE: Deletes record from the table according to condition

(37) Which clause of Select statement helps to display specific data?


Ans. To display records containing same type of values “WHERE”
clause can be used with the select SQL Command
To get the list of students whose favourite colour is blue, the
command is ,
Select * from Student_Details where colour = ‘Blue’;
Here table name = Student_Details
Field name = colour

(35) Differentiate between Where and Order by clause of SQL


statements.
Ans.
• The SQL Order by clause is used to sort the data in ascending or
descending order based on one or more columns. The columns
used for sorting should be in the table
• The SQL Where clause is used to specify a condition while
retrieving data from a single table or multiple tables. If the
given condition is satisfied then only it returns specific records
from the table.
(36) State the purpose of Update Command with the help of an
example.
Ans. The SQL Update query is used to modify the existing records in a
table. We can use where clause with the update query to update the
selected rows, otherwise all the rows would be updated.
e.g. Customer table has following records
ID NAME AGE ADDRESS SALARY
1 RAMESH 16 SURAT 20000
2 JAY 20 DELHI 15000

The following query will update the ADDRESS for a customer whose
ID is 2
UPDATE Customer SET ADDRESS = ‘PUNE’ where ID = 2;

(37) a) The structure of a table “ITEM” is given below. Suggest


suitable data type and size of each column.

Column name Type Size


Itemno ____________ ______
Iname ____________ ______
Price ____________ ______
Quantity ____________ ______
Ans.
Itemno integer (10)
Iname varchar(15)
Price decimal(5,2)
Quantity integer(3)

(38) Consider the following table “ITEM”:


Table: Item
Itemno Iname Price Quantity
11 Soap 40 80
22 Powder 80 30
33 Face cream 250 25
44 Shampoo 120 100
55 Soap box 20 50
Write queries to
i. Display the total amount of each item. The amount must be
calculated as the price multiplied by quantity for each item.
ii. Display the details of items whose price is less than 50.

Ans.
i. Select price * quantity from item;
ii. Select * from item where price < 50;
(39) remember the syntax of different queries and do practice

(1) select * from <table name>;


(2) select field name from table name;
(3) select * from table name where condition;
(4) select * from table name order by fieldname ASC;
(5) select * from table name order by fieldname DESC;
(6) Select * from table name where condition order by asc/desc;
(7) insert into <table name> (comma separated list of fields) values
(comma separated list of values)
(8) update <table name> set <field name> = value where <criteria>
(9) Delete from <table name> where <criteria>
(10) create TABLE <table name> ( <field name> <datatype> , ….. );

(40) Why there is a need to create Forms?


Ans. A form provides the user a systematic way of storing
information into the database. It is an interface in a user specified
layout that lets users to view, enter, and change data directly in
database objects such as tables

(41) What is the purpose of creating Reports?


Ans. A report helps to display the data in a summarized manner. It is
used to generate the overall work outcome in a clear format. You can
create reports in the database.

(42) What are the prerequisites ( things required ) to create a Form


and Reports?
Ans. Forms allows to View , Add , Delete and Modify data of table or
query
While Report represents data from table or query.

(43) Differentiate between Forms and Reports.


Ans.
Form Report
1. Form is primarily used for Report is used for presenting
entering data data
2 Form is also used for Report is used for displaying
displaying records but one whole records of table or query
record at a time
3 Data can be modified Data can not be modified
through the form through report
4 Form is designed to be Report are designed to be
used on screen printed

(44) Can a form displays data from queries?


Ans. Yes
(45) In how many ways Forms and Reports can be created in a
database?
Ans.
Form:
• Design view: create the form specifying the record source ,
controls and control properties
• Wizard: The wizard will guide through steps to create a form
Report:
• Wizard: The wizard will guide through steps to create a report

You might also like