Database Management Systems - Imp Q&a
Database Management Systems - Imp Q&a
[1] Mrinal wants to insert records into the OO base tables. Suggest the way to insert records in the table.
Ans.INSERT
[2] Raj is using OO base where he is typing contents directly into the table and modifying the data. In which view he is
working?
Ans.: Datasheet View
[6] Write SQL command to insert the following records in the table – customer
“C1008″,”Shiv”,4500,”2022/03/22″
Ans.: insert into customer values (‘C1008′,’Shiv’,4500,’2022/03/22′);
[7] Write SQL command to modify the records from the customer table
Change Amount to 5500 for the orders given on 22/03/2022.
Ans.: update customer set amount=5500 where orderdate=’2022/03/22′;
[8] Write SQL command to delete the records given after 22/03/2022.
Ans.: delete from customer where orderdate>=”2022/03/22″;
[9] Satyam wants to set the value for the serial number which is going to be incremented itself when a new row will be
inserted. Which option he should use for this purpose? Suggest the name of the properties.
Ans.: AutoValue is used to auto incremented value in the new row in OO base.
[11] Nirmal wants to insert a fixed value in the column stream as Science. Which field property will be useful for him?
Ans.: Default
[16] In OO Base data can be linked between two more tables. To link data what is required?
Ans.: The data can be linked between two or more tables using primary key and foreign key.
[19] Kajal wants to know the three types of relationships. Suggest their name to her.
Ans.: The 3 types of relationships are:
1. One to One
2. One to Many or Many to One
3. Many to Many
[20] Satvik wants to create a relationship. He knows this task can be done from two menus. Suggest the menus to him.
Ans. Ans.: The two menus are:
1. Insert
2. Tools
[21] How to remove the relationship?
Ans.: To delete relationship follow the given steps:
1. Select the relationship.
2. Right click and choose delete option.
[2] What do you mean by field properties? How to set the field properties?
Ans.: A field property is a particular characteristics of a field can be applied to the field to change the structure of a table.
To set field properties follow these steps:
1. Select the table
2. Right Click
3. Select the option edit
4. The Table design window appear where the different field properties are available.
[5] Explain how to create a relationship using the insert menu from the relation design window.
Ans.: To create a relationship using the insert menu from the relation design window follow these steps:
1. Click on Tools – Relationship
2. Now click on Insert – new Relationship
3. Select the appropriate options for the relationship from the window.
4. Click on OK.
[6] Enlist the options available under update and delete options in the relations window.
Ans.: The options under update and delete options are as follows:
1. No Action
2. Update Cascade
3. Set null
4. Set Default
2. One to many or Many to one: In this kind of relationship one of the table must have primary key column. It means that
one column of primary key table is associated with all the columns of associated table. As above example, emp and dept
tables, empno is primary key for the emp table.
3. Many to many relationship: In this kind of relationship no table has primary key column. It means that all the columns of
primary key table are associated with all the columns of associated table.
If you are looking for more questions follow this link:
Referential Integrity
[5] Ronit is a learning Database. Where he notices people pronounced SQL with a different word but he doesn’t
remember what it was? Suggest your answer for the same.
Ans.: Sequel
[6] Trishala is learning SQL Queries. She wants to know what a query will do in SQL, Support her by writing the answer.
Ans.: Queries are used to:
1. Define structure of database
2. Manipulate data
3. Retrieve Data
4. Control transactions
[7] Which command is mostly used to retrieve data?
Ans.: Select
[9] What are the clauses used with the SELECT command?
Ans.: With select following clauses can be used:
1. From
2. Where
3. Order by
4. Group by
[11] Hiteshi wants to execute the query from SQL view. Which key hee need to press in order to get the result?
Ans.: F5
[12] Ishika is writing a query, where she needs to display only practical marks from total marks and theory marks from
exam_results table. Write a query to get practical marks from total marks and theory marks. The column names are total
for total marks and theory for theory.
Ans.: Ishika will write this command:
select total – theory “Practical” from exam_results
[15] Write SQL query to get the result in ascending order of total marks scored by students.
Ans.: select * from exam_results order by total asc;
[16] Priya wants to sort the records of students in the descending order of marks scored by students. She knows the
command but forgets only the keyword which is used to get the result in descending order with an order by clause. Write
that keyword.
Ans.: desc
[17] Manisha is working as a team leader. She wants to update the salary of her department employees. She wants to
open SQL command window for the update command. She forgets how to open SQL command window to update the
records. Help her by suggesting the answer.
Ans.: Tools – SQL
[18] Write a command to update the centre city of students from Baroda to Ahmedabad from the table candidates.
Ans.: update candidates set centre=’Ahmedabad’ where centre=’Baroda’
[20] The SQL Command window has which button to run the query?
”Show_Answer”
[3] Explain the parts of the query design window in SQL view.
Ans.: The query design window in SQL view has following parts:
1. Output Window: It will display the output after executing the query.
2. SQL Window: This part accepts the SQL commands.
[4] Enlist some of the operators used in SQL command in where clause.
Ans.: Where clause in SQL requires various operators. These operators are:
1. Relational Operators: (=,!=,<,>,<=,>=)
2. Logical Operators: (and, or, not)
3. Pattern matching: like
4. Null Value handling: with is and is not
5. Range Searching Operator: Between…and
6. Membership operator: in, not in
4 marks questions retrieving data using queries Unit 3 Database Management System
[1] Observe the following table (examresult) structure and determine the appropriate data type and constraints for the
table as per the given specification then write a query to create a table:
Ans.:
i) select * from student where stream=’commerce’;
ii) select * from student where class in(’12B’,’12D’)
or
select * from student where class =’12B’ or class=’12D’;
iii) update percentage=64.15 where name=’Mahek’;
iv) delete from student where percentage<60;
[4] Consider the following table – candidate and write queries given below:
Ans.:
i) select * from teacher where subject = ‘Maths’ or Subject = ‘Computer Science’;
OR
select * from teacher where subject in( ‘Maths’, ‘Computer Science’);
ii) select * from teacher where salary between 45000 and 75000;
OR
select * from teacher where salary >=45000 and salary<=75000;
iii) select * from teacher where age>45;
iv) select name, 60-age “Year of retirement” from teacher;
[7] Observe the table store and write queries given below:
Ans.:
i) select * from team where name like ‘%sh’;
ii) The jobid field can be a primary key as it contains unique records. Jobid for each team member is unique.
iii) select name, department, salary from team where department =’HR’;
iv) select salary+(salary*0.5) from team where department=’Admin’;
[3] Jayshree has opened OO Base window. She wants to create a new form. Help her to select the option to create a
form.
Ans.: Jayshree need to click on Forms option under Database section in OO base window.
[4] Vanshika is looking for ways to create a form provided by OO base. Write the same for her.
Ans.: There are two ways to creare a form in OO base.
1. Create form in design view
2. Using wizard to create a form
[5] The option – “Use wizard to create form” is available under which group?
Ans.: The option use wizard to create a form is available under Tasks group.
[6] In which step does the form wizard allow you to select the field to display the field on the form?
Ans.: The Field Selection step allows you to select the field to display the field on form.
[7] Users can select specific fields or all fields for a form in the OO base. Which buttons are present to do so?
Ans.: To select a specific fields for a form > button is present and to select all fields >> button is present.
[9] In which step you can place the fields or contents to the right place on a form in form wizard?
Ans.: Arrange Controls
[10] The steps that let users set up the data entry model. Mention the step of the database form wizard.
Ans.: Set data entry
[11] Nilesh wants to set background and text colours on a form through a wizard. Which step helps him fulfil his task?
Ans.: Apply Styles
[12] Write any two features of a report.
Ans.:
1. Report helps to display the data in a summarized manner.
2. It is used to generate overall work outcome in a clear form.
[13] Aniket wants to create a report in OO Base. He is not familiar with OO base. Help him to initiate the process.
Ans.: Aniket can click on Reports option under Database section in OO base window.
[14] There is only one way to create a report in OO Base. Which it is?
Ans.The only way to create a report in OO base is Use wizard to create report.
[16] Which step of the report wizard allows to filter and display the fields according to specific fields frequencies?
Ans.: Grouping
[17] Nitin wants to set the orientation of OO Base through the wizard. Which step will help him to fulfil his task?
Ans.: Choose Layout
[18] Which types of reports can be generated through the wizard in OO Base?
Ans.: There are 2 kinds of reports:
1. Static
2. Dynamic
[2] What are the steps involved in creating a form using a wizard?
Ans.: To create a form using wizard follow these steps:
1. Field Section
2. Set up a sub form
3. Arrange Controls
4. Set Data Entry
5. Apply Styles
6. Set Name
[5] Manan is working on the form. He is going to create a form to add new records only. Enlist all the options available for
data entry in the form wizard. Write the option which helps Manan to fulfil his need.
Ans.: The form wizard in OO base provides following options for data entry:
1. The form is to be used for entering new data only. Existing data will not be displayed.
2. The form is to display data
a. Do not allow modification of existing data
b. Do now allow deletion of existing data
c. Do not allow addition of new data
Option 1 will help Manan to fulfil his need.
[6] What are the styles available for designing a form? Write any four styles.
Ans.: There are various styles available in form wizard for designing a form. Few of them are:
1. Beige
2. Violet
3. Bright Blue
4. Dark
[7] Priya wants to add a border on the form using the wizard. Help her by suggesting the border options available for the
form.
Ans.: There are three options for border in the form wizard:
a) No Border
b) 3D Look
c) Flat
[8] Shital has almost finished all the steps and she wants to continue with the form. What are the options available for her
after setting up the name of the form?
Ans.: There are two options after setting up the name of form in wizard:
a) Work with form
b) Modify the form
[10] Ritesh wants to delete a record using the form. Help him to finish this task.
Ans.: Follow these steps to delete records using form:
1. Create a new form or Open an existing form
2. Navigate the form on which record needs to be deleted
3. Find the delete record button
4. Press the delete record
[12] Kunjan wants to display data in a summarized manner from the queries and tables. Which database object will fulfil
his requirements. Define the object which is used to do this task.
Ans.: Kunjan can use reports to display data in a summarized manner from the queries and tables.
Reports refers to a database object which is used to generate the overall work outcome in a clear format.
[13] What are the main steps required to create a report through the wizard in the oo base?
Ans.: To create a report follow these steps:
1. Click on report section under database in OO Base database window.
2. Click on Use wizard to create report option under the tasks.
3. Follow the wizard steps as directed
4. Save the report
[14] Rashmi wants to create a report. She wants to customize the labels in the report. Suggest how she can fulfil the task?
Ans.: After selecting the fields in wizard the next step is labelling fields. This step allows to customize the label. It accepts
the default label as field names. Type the label text to customize the label. Repeat the procedure for all fields and move
towards the next step.
[15] Zeel is working in a domestic company and she wants to display state-wise records in the report. Write steps so she
can do this task easily.
Ans.: In report wizard, after customizing the label, next step allows to grouping the records. Select field to display the
records. Here Zeel needs to add the state field for grouping. And move further.
[17] Explain the options provided in the step choose the layout in OO base to create a report wizard?
Ans.: The choose layout step of OO Base create report wizard has following options:
1. Layout of data: This option allows to select a pre-defined layout for data in the report.
2. Layout of header and footer: It sets the header and footer of the report.
3. Orientation: It can be either portrait or landscape. User can choose as per his choice.
[18] Explain the options supported in the step create report the final step of creating report wizard.
Ans.: The final step of OO base report wizard has following options:
1. Title of report: Type the desired of the report.
2. Select the option to choose kind of report required by user.
3. User can select statics or dynamic report.
4. Finally used can modify or create the report