0% found this document useful (0 votes)
70 views25 pages

Unit-3 - RDBMS (I.T)

Computer chapter 3

Uploaded by

vijayraji98765
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)
70 views25 pages

Unit-3 - RDBMS (I.T)

Computer chapter 3

Uploaded by

vijayraji98765
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/ 25

T.J.S.

PUBLIC SCHOOL(CBSE)
(Affiliated to CBSE, New Delhi - Affi. No.1931271 & School Code: 56259)
TJS NAGAR, PERUVOYAL 601 206
CLASS WORK NOTES 2023 -24

Session 1 : Appreciate the concept of Database Management System

MCQ on RDBMS Class 10 IT 402 UNIT -3


Q1. A database is an organized collection of _______________.
a. data b. Attributes c. Record d. None of the above
Ans. a (data)

Q2. Which of the following software is appropriate to store data about school students?
a. MS-Access b. Writer c. Calc d. Impress
Ans. a. MS-Access

Q3. Which of the following is not a database programs?


a. MySQL b. Oracle c. Writer d. OObase
Ans. c. Writer

Q4. __________ store data in Single table.


a. Flat File b. Relational c. Single File d. One File
Ans. a. Flat File

Q5. ___________ are dedicated computers that hold the actual databases and run only
DBMS and related Software.
a. Main Server b. Web Server c. Database Server d. Non Database
Server
Ans. c. Database Server

Q6. GUI act as front end and database server act as _____
a. Container b. Back End c. End d. None of the above
Ans. b. Back End

Q7. Duplication of data is called _________.


a. Inconsistency b. Consistency c. Redundancy d. Foreign Key
Ans. c. Redundancy
Q8. Which of the following is not the advantage of database?
a. Sharing of Data b. Reduce Data Redundancy
c. Increase Data Inconsistency d. Data Security
Ans. c. Increase Data Inconsistency

Q9. Data Integrity means that data is accurate and consistent in the database.(T/F)
a. True b. False
Ans. a. True

Q10. A database can have only one table.(T/F)


a. True b. False
Ans. b. False

Q11. Which of the following will help to maintain unique record in the table?
a. Foreign Key b. Primary Key c. Composite Key d. Alternate Key
Ans. b. Primary Key

Q12. Which of the following field of table “Book” can act as primary key?
a. Book_number b. Subject c. price d. Author_name
Ans. a. Book_number

Q13. When primary key is made up of two or more columns then it is called __ primary key.
a. Mixed b. Reference c. Composite d. Compost
Ans. c. Composite

Q14. Duplicate values can be entered in primary key.(T/F)


a. True b. False
Ans. False

Q15. A key which is referring to the primary key of another table is called _______
a. Alternate Key b. Primary Key
c. First Primary Key d. Foreign Key
Ans. d. Foreign Key

Q16. A field which is ______ for each and every record is called Primary key.
a. Common b. Same c. Unique d. None of the above
Ans. c. Unique
Q17. When data is stored, maintained and retrieved from multiple tables then special
database software are required called ______
a. DBMS b. RDBMS c. Special DBMS d. All of the above
Ans. b. RDBMS

Q18. Identify the Foreign Key from table “Sales”


Table Client:
ClientID (primary Key)
clientname
clientphone

Table : Sales
SalesID (Primary Key)
ClientID
Profit
a. SalesID b. Profit c. Clientphone d. ClientID
Ans. d. ClientID

Q19. Which of the following is not valid field of table “Student”


a. admno b.name c. fees d. salary
Ans. d. salary

Q20. There can be multiple primary key in a table.(T/F)


a. True b. False
Ans. False

Q21. In RDBMS, data is organized in the form of __________________


a. Table b. Record c. Field d. None of the above
Ans. a. Table

Q22. SQL stands for _________________


a. Structured Queue Language b. Structured Query Language
c. Structured Query Lang d. None of the above
Ans. b. Structured Query Language

Q23. All the values in ________ are of same type.


a. Records b. Table c. Database d. Fields
Ans. d. Fields
Q24. ___________ represent a single data item in a table.
a. Tuples b. Attributes c. Relation d. All of the above
Ans. a. Tuples

Q25. In tables, data is organized in the form of rows and columns.(T/F)


a. True b. False
Ans. True

Q26. Every row in a table has the same structure.(T/F)


a. True b. False
Ans. True

Q27. Open Office base is not an open source software.(T/F)


a. True b. False
Ans. False

Q28. _______________ are the basic building blocks of a database.


a. Tables b. Record c. Fields d. All of the above
Ans. a. Tables

Q29. We can create table :


a. in design view b. use Wizard c. Both of the above d. None of the above
Ans. c. Both of the above

Q30. By default data type of fields is.


a. Text[Varchar] b. Text[Char] c. Int d. Long
Ans. a. Text[Varchar]

Q31. Base automatically adds the column as Primary Key if we don’t add.(T/F)
a. True b. False
Ans. True

Q32. By default the length of Varchar data type is __


a. 20 b. 30 c. 40 d. 50
Ans d. 50

Q33. By default the name of the table is ______


a. Tab 1 b. Table 1 c. First Table d. Untitled 1
Ans b. Table 1
Q34. __________ are used to identify which type of data we are going to store in the
database.
a. Datatype b. Record c. Table d. Attributes
Ans. a. Datatype

Q35. Which data type will be appropriate to store information as Salary, Fees, Price etc
a. Alphanumeric Data types b. Numeric Data type
c. Binary Data types d. Date Time
Ans a. Numeric Data type

Q36. Which of the following is not a numeric data type?


a. Tinyint b. Smallint c. Boolean d. Date
Ans d. Date

Q37. Which of the following data types can not store decimal values?
a. Decimal b. Real c. Numeric d. Boolean
Ans d. Boolean

Q38. Which of the following will occupy more space in computer memory?
a. Bigint b. Integer c. Smallint d. Boolean
Ans a. Bigint

Q39. _______ data types are used for storing photos, music files etc
a. Binary b. Alphanumeric c. Numeric d. Special
Ans a. Binary

Q40. Char is a ______ length data type and varchar is a ______ length data type.
a. Fixed, Variable b. Variable, Fixed c. Variable, Variable d. Fixed, Fixed
Ans. a. Fixed, Variable

Q41. Which field is suitable for storing records of employees?


a. EmpNo b. Empname c. Salary d. All of the above
Ans. d. All of the above

Q42. Auto Value is a property of __ data type .


a. Numeric b. Character c. Binary d. Date
Ans. a. Numeric
Q43. Which of the following property help to set the number of characters in Varchar type.
a. Auto value b. Required c. Default Value d. Length
Ans. d. Length

Q44. Which property ensures that field can not be left blank?
a. Entry required b. Format c. Required Entry d. Required
Ans. a. Entry required

Q45. By default the length of the Integer data type is ______________


a. 10 b. 15 c. 20 d. 25
Ans. a. 10

Q46. Which of the following property to be turned “yes” so that value will be auto
incremented?
a. Default b. Format c. Auto value d. Length
Ans. c. Auto value

Q47. Which of the following is not the binary data types?


a. Longvarbinary b. Varbinary c. Binary d. Charbinary
Ans. d. Charbinary

Q48. Which of the following is not the date time data types?
a. Date b. Time c. Datestamp d. Timestamp
Ans. c. Datestamp

Q49. Which data type is used to store value of fields like “Date of Birth”?
a. Date Time b. Varchar c. Integer d. Other
Ans. a. Date Time

Q50. A record in table is also known as Attribute.(T/F)


a. True b. False
Ans. b. False

Q51. We can ____________________ data in table.


a. modify b. insert c. delete d. all of the above
Ans. d. all of the above

Q52. In which view data can be entered in table?


a. Datasheet view b. Design view c. Both of the above d. None of the above
Ans. a. Datasheet view
Q53. In which mode we can change the structure of table?
a. Datasheet view b. Design view c. Structure view d. All of the above
Ans. b. Design view

Q54. After inserting records in table, we can not modify the structure of table.(T/F)
a. True b. False
Ans. b. False

Q55. Sorting means to arrange data in _______________ order.


a. increasing b. decreasing c. increasing or decreasing d. None of the above
Ans. c. increasing or decreasing

Q56. Referential Integrity is used to maintain accuracy and consistency of data in a


relationship.(T/F)
a. True b. False
Ans. a. True

Q57. In Base data can be linked between two or more tables with the help
of _________________
a. primary key b. foreign key c. primary and foreign key d. None of the above
Ans. c. primary and foreign key

Q58. Relationship can be created between


a. two tables only b. one table only c. two or more tables d. none of the above
Ans. c. two or more tables

Q59. Relationship between tables can be created from _____________________ menu.


a. View b. Insert c. Windows d. Tools
Ans. d. Tools

Q60. There are __________________ types of relationship which can be created between
tables.
a. three b. two c. four d. infinite
Ans. a. three

Q61. Which language help to extract/fetch data from table?


a. MySQL b. Python c. OOBase d. HTML
Ans. a. MySQL
Q62. We can create query (in Open Office Base) in _______________________
a. In design view b. Using wizard c. Both of the above d. None of the above
Ans. c. Both of the above

Q63. Queries are commands that are used to define the structure and modify the data in a
table.(T/F)
a. True b. False
Ans. a. True

Q64. We can not delete the data using queries.(T/F)


a. True b. False
Ans. b. False

Q65. SQL stands for __________________


a. Structural Query Language b. Structured Query Language
c. Skeletal Query Language d. None of the above
Ans. b. Structured Query Language

Q66. ___________ statement is used to retrieve data from table.


a. Delete b. Update c. Print d. Select
Ans. d. Select

Q67. ____________ is the most common DML command.


a. Delete b. Update c. Select d. All of the above
Ans. c. Select

Q68. DML stands for ____________


a. Data Manipulation Language b. Database Manipulation Language
c. Data Modify Language d. None of the above
Ans. a. Data Manipulation Language

Q69. Which of the following clause return specific rows?


a. Order By b. Where c. Having d. Specific
Ans. b. Where

Q70. Which of the following clause return records in ascending order?


a. Order By b. Where c. Order Asc d. Order Inc
Ans. a. Order By
Q71. Command to display all the data in the table “emp” is.
a. Select * from emp b. Select * from emp;
c. Select all from emp d. Select all from emp;
Ans. b. Select * from emp;

Q72. Which command is used to create table?


a. Select b. Create c. Open d. New
Ans. b. Create

Q73. Shortcut to execute query in Create Query in SQL View is __


a. F7 Key b. F5 Key c. F8 Key d. F6 Key
Ans. b. F5 Key

Q74. Which command is used to display the salary of all the employees after incrementing
by 1000.
a. Select b. Update c. Modify d. Change
Ans. a. Select

Q75. Select “salary” from emp;


a. will display all the records of table emp
b. will display only particular columns of table emp;
c. will display only salary column of table emp;
d. None of the above
Ans. c. will display only salary column of table emp;

Q76. Select “empname”, “salary” * 3 from emp;


a. will increase the salary three times of all employees in table
b. display name and three times salary
c. give error
d. None of the above
Ans. b. display name and three times salary

Q77. To get details about the list of students whose favorite color is blue. Query for this is :
a. select all from Stud where fav_Color=’Blue’;
b. select name from Stud where fav_Color=’Blue’;
c. select * from Stud where fav_Color=’Blue’;
d. select all from Stud where fav_Color is ’Blue’;
Ans. c. select * from Stud where fav_Color=’Blue’;
Q78. select * from Stud order by “Rollno” ASC;
a. display all the records of table.
b. display records in increasing order of roll number.
c. both of the above
d. none of the above
Ans. b. display records in increasing order of roll number.

Q79. Which command is used to modify data in table?


a. delete b. select c. modify d. update
Ans. d. update

Q80. Which command is used to delete data from table?


a. select b. delete c. insert d. remove
Ans. b. delete

Q81. Update statement is used to modify data in a table.(T/F)


a. True b. False
Ans. a. True

Q82. Command to increase the salary of all employees by 15000.(table name emp and
column name sal)
a. update emp set sal = sal + 15000; b. update emp set sal = 15000;
c. update set sal = sal + 15000; d. None of the above
Ans. a. update emp set sal = sal + 15000;

Q83. By default data is arranged in _____ order using order by clause.


a. Ascending b. Descending c. Primary Key d. None of the above
Ans. a. Ascending

Q84. Which of the following is DML commands?


a. Insert b. Update c. Delete d. All of the above
Ans. d. All of the above

Q85. A ________ provides a systematic way of storing information into the database.
a. Report b. Query c. Form d. None of the above
Ans. c. Form

Q86. Which of the following act as an interface to view, enter and change data in database?
a. Report b. Table c. Query d. Form
Ans. d. Form
Q87. A _____________ helps to display the data in a summarized data.
a. Report b. Form c. Query d. None of the above
Ans. a. Report

Q88. A _______ helps to collect specific information from the pool of data.
a. Query b. Report c. Form d. None of the above
Ans. a. Query

Q89. Which of the following is to be created first?


a. Report b. Query c. Form d. Table
Ans. Table

Q90. Which of the following field is invalid for storing information of “Library” Table?
a. Cost b. Booknumber c. Authorname d. Dateofbirth
Ans. d. Dateofbirth

Q91. Which of the following is suitable to act as a primary key in table student?
a. Rollno b. Name c. Class d. Section
Ans. a. Rollno

Q92. A foreign key is a reference of the ________ key in another table.


a. Alternate b. Primary c. Candidate d. None of the above
Ans. b. Primary

Q93. A table is a collection of logically related data.(T/F)


a. True b. False
Ans. a. True

Q94. _______ tables can be created in a database.


a. 1 b. 2 c. 3 d. More than 3
Ans. d. More than 3

Q95. In primary key we can enter NULL values.(T/F)


a. True b. False
Ans. b. False

Q96. Only numeric fields can act as a primary key in a table.(T/F)


a. True b. False
Ans. b. False
Q97. Primary key increases data redundancy.(T/F)
a. True b. False
Ans. b. False

Q98. In a table we can have only ______ primary key.


a. 1 b. 2 c. 3 d. more than 3
Ans. a. 1

Q99. A foreign key is a primary key in other table.(T/F)


a. True b. False
Ans. a. True

Q100. Duplicate values can be entered in Foreign key.(T/F)


a. True b. False
Ans. a. True

Important DBMS Questions and Answers( IT 402- Class 10)


Q1. What is database?
Ans. A database is an organized collection of data.
Q2. What is DBMS?
Ans. DBMS stands for Database Management system. It is a software that controls the
creation, maintenance and use of a database.
Q3. Name two DBMS Software.
Ans. Two DBMS Software are :
1 MySQL
2. Oracle
3. Microsoft SQL Server
4. Microsoft Access.
Q4. What is the difference between Flat file and Relational ?

Flat File Relational

Data is stored in a single table. Data is stored in multiple tables.


It is suitable for less amount of data. It is suitable for large amount of data

Q5. What do you mean by database servers?


Ans. Database servers are dedicated computers that hold the actual databases and run
only the DBMS and related software.

Q6. Write four advantages of database.


Ans. Four advantages of database are
1 It reduces Data Redundancy
2. It allows sharing of data.
3. It help to maintain data integrity.
4. It provides Data Security.
Q7. What do you mean by Data Redundancy?
Ans. Duplication of data in a database is known as data redundancy.
Q8. What do you mean by Data Integrity?
Ans. Data integrity means that the data is accurate and consistent in the database.
Q9. What is Data Consistency?
Ans. Data Consistency means there should be multiple mismatching copies of the same
data in a database.
Q10. Write two features of database.
Ans. Two features of database are :
1. A database can have one or many tables.
2. Every table in a database has a primary key field which ensures 00% unique values
in the database.
Q11. What do you mean by RDBMS.
Ans. RDBMS stands for Relational Database Management System. When data is to be
stored, maintained, and retrieved from multiple tables then special database software
are required known as RDBMS.
Q12. What is Primary Key?
Ans. A field which is unique for each and every record in a table is called primary key.
Q13. What do you mean by Composite Primary key?
Ans. When primary key constraint is applied on one or more columns then it is known
as Composite Primary Key.
Q14. What is Foreign Key?
Ans. A Foreign Key is a field in one table that refers to the primary key of another
table. It is used to link two tables.
Q15. Answer the following questions on the basis of following table:
Table : Student

Stud_id Stud_name Class Fees

1 Aman IX 3000

2 Anil X 3200

Table :Teacher

T_id T_name T_Sal Stud_id

3210 Mr. Kumar 60000 1

3211 Mr. Sethi 70000 2

1. Identify the primary key in Student and Teacher table.


2. Identify the foreign key in Teacher table.
Ans. 1. Primary Key in Student table : Stud_id
Primary key in Teacher table is : T_id
2. Foreign key in Teacher table is : Stud_id
Session 2 : Create and Edit Tables using Wizard and SQL Commands
Q1. What do you mean by RDBMS?
Ans. RDBMS stands for Relational Database Management System. It is a database
management system which is based on relational model.
Q2. Define the following terms :
1 Table
2. Fields
3. Records
Ans.
Table : A table is a set of data elements that is organized in vertical columns and
horizontal rows.
Fields : A field is a set of data values of a particular simple type, one for each row of
the table.
Records : A row also called a Record or Tuple represents a single, data item in a table.
Database Management System Class 10
Q3. What are the two ways of creating table in OpenOffice Base.
Ans. Two ways of creating table in OpenOffice Base are :
a. Create table in design view
b. Use Wizard to create table.
Q4. What do you mean by Data type? Give example of two data type used in OpenOffice
Base.
Ans. Datatypes are used to identify which type of data (value) we are going to store in
the database.
Q5. Identify the data type in which we can store the decimal value :
a. Boolean
b. TinyInt
c. Decimal
d. Real
e. Double
f. Smallint
Ans. Data types in which we can store the decimal value are :
c. Decimal
d. Real
e. Double
Q6. What is the difference between Char and Varchar data type?
Ans. Char is a fixed length data type and Varchar is a variable length data type.
Q7. Write the data type suitable for the following fields.
a. DateofBirth
b. Name
c. Rollno
d. Class
e. Email
f. City
Ans.
a. DateofBirth – Date
b. Name – Char or Varchar
c. Rollno – TinyInt / Smallint / Integer
d. Class – Char / Varchar
e. Email – Char or Varchar
f. City – Char or Varchar
Q8. Write four data types available in Alphanumeric Data types.
Ans. Four data types available in Alphanumeric Data types :
1. LongVarchar
2. Char
3. Varchar
4. Varchar_Ignorecase
Q9. Data in a (RDBMS) is organized in the form of __________________.
Ans. Tables.
Q10. In RDBMS table is also known as ________________
Ans. Relation
Q11. Write four data types which are used to store numerical value.
Ans. Four data types which are used to store numerical value are
1. Smallint
2. Bigint
3. Integer
4. Float
Q12. Write four appropriate field names and their data types to store record of student.
Ans. Four appropriate field names and their data types to store record of students are :
1 Name —————— Char / Varchar
2. Admno —————- Integer
3. Fees ——————–Float/Double
4. DOB ——————-Date
Q13. Write four appropriate field names and their data types to store record of book.
Ans. Four appropriate field names and their data types to store record of book are :
a. Author_name ————- Char / Varchar
b. Price ———————– Float / Decimal / Double
c. Class ———————– Char / Varchar
d. Subject ———————Char / Varchar
Q14. What is the default data type of a field while creating table in design view?
Ans. Varchar
Q15. _______________ are the basic building blocks of a database.
Ans. Tables
Q16. Write the expanded form of SQL
Ans. SQL : Structured Query Language
Q17. A table has __________________ (horizontal / Vertical) row and
____________________ columns (horizontal / Vertical).
Ans. Horizontal , Vertical
Q18. OpenOffice Base is an open source _________________ (DBMS / RDBMS )
Ans. RDBMS
Q19. ________________ (Database / Table ) wizard helps you to create a new database.
Ans. Database
Q20. Multiple tables can be created in a database. (T / F)
Ans. True

Session 3: Perform Operations on Table


Q1. What do you mean by Datasheet View?
Ans. A view in which new data can be inserted and inserted data can be modified or
removed in a table is called datasheet view
Q2. What do you mean by design view?
Ans. A view in which we can change the structure of the table is called design view.
Q3. Write steps to open table in design view.
Ans. Steps to open table in design view are :
1. Open the Open Office Base
2. Right click on the table which we need to open.
3. Select option Edit from popup menu.
4. Required table will open in design view
Q4. What do you mean by Field Property in Base?
Ans. Those properties which determine the characteristics and behavior of fields are
called field property.
Q5. Name two properties of Numeric type data.
Ans. Two properties of Numeric type data are :
1. Auto Value
2. Length
Q6. Name two properties of Character type data.
Ans. Two properties of Character type data are :
1. Entry Required
2. Length
Q7. What is the default length of Integer data type?
Ans. The default length of Integer data type is 10.
Q8. What is the default length of Varchar data type?
Ans. The default length of Varchar data type is 50.
Q9. Define the following field properties in reference to Open Office Base.
1. Default Value
2. Format
3. Auto Value
Ans.
1. Default Value : A value which automatically appears when we enter the new record.
2. Format : This property helps to set the format of the data entered in the field.
3. Auto Value : This is the property of Numeric Field type. If this property is set to Yes
then numeric field will get auto numeric value.
Q10. What do you mean by Sorting?
Ans. Sorting means to arrange the data in either ascending or descending order.
Q11. What is Referential Integrity?
Ans. Referential Integrity is used to maintain the accuracy and consistency of data in
relationship.
Q12. What do you mean by relationship between tables?
Ans. A relationship refers to an association or connection between two or more tables.
Q13. How many types of relationship can be created between tables? Name them.
Ans. Three types of relationship can be created between tables.
1. One to One
2. One to Many or Many to One
3. Many to Many
Q14. Relationship option is available in _____________ menu.
Ans. Tool
Q15. Write two advantages of relationship created between two tables.
Ans. Two advantages of relationship created between two tables are :
1. It reduces data entry errors.
2. It help to summarize data from related tables

SESSION 4: RETRIEVE DATA USING QUERY


Q1. What do you mean by query in Open Office Base?
Ans. A query is a request to collect specific information from a table or combination of
tables.
Q2. In how many ways you can create query in Open Office Base?
Ans. We can create query in Open Office Base by three ways which are :
1. Create query in Design view
2. Create query using Wizard
3. Create query in SQL view
Q3. Name the Query language which is used in Base?
Ans. SQL
Q4. Which command is used to retrieve data from the table?
Ans. Select command is used to retrieve data from the table.
Q5. Name two categories of SQL Commands.
Ans. Two categories of SQL Commands are :
1. DDL
2. DML
Q6. Differentiate between DDL and DML Commands.
Ans.

DDL DML

It stands for Data Definition Language It stands for Data Manipulation Language

Example : Create, Alter, Drop Example : Insert, Update, Delete


Q7. Identify the DML Commands from the following :
1. Create
2. Alter
3. Insert
4. Delete
Ans. Insert and Delete are DML Commands
Q8. __________ is the most commonly used Data Manipulation Language(DML) command.
Ans. Select
Q9. Name two clauses which can be used with Select Command.
Ans. Two clauses which can be used with Select Command are :
1. Where Clause
2. Order By Clause
Q10. Write the Select command to display all the records of table “book”.
Ans. Select * from book;
Q11. Write the shortcut to execute query in “Create query in SQL view” of Base.
Ans. F5
Q12. What is the purpose of Where clause in Select Command?
Ans. Where Clause is used to retrieve specific record from the table.
Q13. What is the purpose of Order by clause in Select Command?
Ans. Order by clause is used to arrange the records in ascending or descending order.
Q14. Write the queries for the following table : Emp

Emp_id Ename Salary

1 Suman 20000

2 Sanjay 32000

3 Ravi 30000

a. Display the salary of all the employees after incrementing by Rs 1000.


Ans. Select Salary +1000 from Emp;
b. Display the Employee id and salary of all the employees after decreasing by Rs 500.
Ans. Select Emp_id, Salary – 500 from Emp;
c. Display the Name and salary of all the employees after incrementing it as thrice the
amount of present salary.
Ans. Select Ename, Salary * 3 from Emp;
d. Display the Employee id, Name and salary of all the employees after decrementing it as
half the amount of present salary.
Ans. Select Emp_id, Ename, Salary/2 from Emp;
e. Display the Employee id and Name of all the employees.
Ans. Select Emp_id, Ename from Emp;
SQL Commands Class 10 IT Code 402
Q15. Write the queries for the following table : Student

Admno Name Class House

1001 Sonam 9 Blue

1002 Ravi 10 Yellow

1003 Poonam 10 Green

a. Display the entire table


Ans. Select * from Student
b. Display the list of students whose house color is blue.
c. Display the admission number of students whose house color is green.
Ans. Select Admno from Student where House = “Yellow”
d. To view records in ascending order of Admission Number.
Ans. Select * from Student order by Admno Asc;
e. Display the records of Class 10 Students.
Ans. Select * from students where Class = 10;
f. Display the class of ‘Ravi’
Ans. Select Class from Student where Name = ‘Ravi’
g. Insert the given record : 1004, “Aman”, 11, “Blue”
Ans. Insert into Student values( 1004, “Aman”, 11, “Blue”)
Q16. Which command is used for the following task in database?
1. To insert a new record
2. To modify the existing data.
3. To delete a record
4. To display record
Ans.
1. Insert
2. Update
3. Delete
4. Select
Q17. Write the queries for the following table : Item

Itemno Iname Price Qty

12 Pen 10 17

13 Eraser 5 15

14 Notebook 15 20

a. Write a query to insert a new record of following details


15, “Pencil”, 20, 10
Ans. Insert into Item values(15, “Pencil”, 20, 10)
b. Write a query to display detail of items whose quantity is more than 10.
Ans. Select * from Item where Qty > 10
c. Write a query to change the quantity of Item number 13 to 25.
Ans. Update Item set Qty = 25 where Itemno = 13
d. Display the total amount of each item. The amount must be calculated as the price
multiplied by quantity for each item
Ans. Select Price * Qty from Item.
e. Display the name of item whose price is 10.
Ans. Select Iname from Item where price = 10
f. Display all the records in ascending order of price.
Ans. Select * from Item order by Price asc.
g. Identify the Primary key from table Item.
Ans. Itemno
h. Write the suitable data type of field “Iname”.
Ans. Char or Varchar
i. Write a query to increase the price of all items by Rs2.
Ans. Update Item set Price = Price + 2;
j. Write a query to decrease the price of all items by Rs2 whose price is less than 20.
Ans. Update Item set Price = Price – 2 where Price < 20;
Q18. By default, data is arranged in _________ order using ORDER BY clause.
Ans. Ascending Order
Q19. Which clause is used for the following:
a. To display specific record.
b. To display records in a particular order.
Ans.
1. Where Clause
2. Order by Clause
Q1. What is Form in OpenOffice Base?
Ans. A form provides the user a systematic way of storing information into the
database.
Q2. Name the interface which lets users to view, enter, and change data directly in database.
Ans. Form
Q3. Write two ways of creating form in Open Office Base.
Ans. Two ways of creating form in Open Office Base are :
a. Create form in design view
b. Use Wizard to create form
Q4. Can we enter the data in table using forms?
Ans. Yes
Q5. What do you mean by Report in Open Office Base?
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.
Q6. Differentiate between Forms and Report.
Ans.

Form Report

1. It is a way of storing data into a It is a way to display data in a


database printed form.

2. Values entered in the form can be Values in the report can not be
modified modified.

Q7. Name the two types of report created in OpenOffice Base.


Ans. Two types of report created in OpenOffice Base are:
a. Static Report
b. Dynamic Report
Q8. What do you mean by static report?
Ans. A report which do not show any change if we make any changes in the data of the
table.
Q9. What do you mean by dynamic report?
Ans. A report which shows the corresponding changes which we make in the data of
the table.
Q10. Can we enter records by report?
Ans. No

You might also like