DBMS (Short Ques & Ans)
DBMS (Short Ques & Ans)
Table :Student
Stud id Stud name Class Fees
1 Aman IX 3000
2 Anil X 3200
Table Teacher
T Sal Stud id
T_id T_name
3210 Mr. Kumar 60000 -N 1
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.
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.
Q3. What are the two ways of creating table in OpenOffice Base.
Ans. Two ways of creating table in Open Office 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. ldentify the data type in which we can store the decimal value :
a. Boolean
b. Tinylnt
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- Tinylnt / Smallint/ Integer
d. Class - Char / Varchar
e. Email Char or Varchar
f. City Char or Varchar
Q11. Write four data types which are used to store numerical value.
Ans. Four data types which are used to store numerical value are
Smallint
Bigint
Integer
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
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 willget auto numeric value.
Q10.What do you mean by Sorting?
Ans. Soting means to arange 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.
One to One
One to Many or Many to One
Many to Many
Q14. Relationship option is available in menu.
Ans. Tool
Ans.
DDL DML
Q9. Name two clauses which can be used with Select Command.
Ans. Two clauses which can be used with Select Command are
Where Clause
Order By Clause
Q10. Write the Select command to display all the records of table "book".
Ans. Select * from book;
Q11. Write the shotcut to execute query in "Create query in SQL view" of Base.
Ans. F5
2 Sanjay 32000
3 Ravi 30000
13 Eraser 5 15
14 Notebook 15 20
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;
Ans.
Form Report
1.Itis a way of storing data into adatabase It is a way to display data in a printed fom.
2. Values entered in the form can be modified Values in the report cannot be modified.