Information Technology
Class-10
Unit- 3(B) Database Management System (Advanced) PART-II
D. Short Answer Type Questions:
1. Distinguish between number and auto number data type fields.
Answer:
Number: It stores lengthy text or combinations of text and numbers. It stores 63,999 characters. It was previously known as a memo.
Auto Number: It takes a unique sequential number or random number assigned by Microsoft Access whenever a new record is added to a table.
2. What are the views available in MS Access?
Answer:
Datasheet View: Datasheet view shows the data in the database. It also allows you to enter and edit the data. It does not let you change the format of the database, other than minor changes.
Design View: Design view allows you to create or change the table, form, or other database object, an configure the fields. You can also set keys and restrict the values entered here. But you can't change the database data in design view.
3. What are the steps to open MS Access?
Answer: Steps to open MS Access:
1. Click on Start button.
2. Click on All programs.
3. Click on MS Office.
4. Click on MS Access.
4. What is a Query?
Answer: Query is an object that provides a custom view of data from one or more tables. Queries are a way of searching for and compiling data from one or more tables.
5. Name the data types used in MS Access.
Answer: Data types in MS Access:
1. Short text
2. Long text
3. Number
4. Date/Time
5. Currency
6. Yes/No
7. Attachment
8. Lookup wizard
9. Hyperlink
10. AutoNumber
6. What are select queries used for?
Answer: The SELECT command is used to select data from a database. This is the most basic command used in SQL.
Syntax: SELECT * FROM tablename;
7. How can a record be deleted from database in MS Access?
Answer: To delete a record from a database in Microsoft Access, you can:
1. Open the table in Datasheet view or the form in form view.
2. Select the record or records to delete.
3. Press Delete, or select Home>Records>Delete.
4. Click yes in the dialog box to confirm the deletion.
8. What is a Primary key?
Answer: The primary key is the most important key in the database. There can be only one primary key in a table. It will not allow duplicate or null values. The primary key contains unique values.
9. What is a lookup wizard?
Answer: Lookup Wizard: The lookup wizard entry in the Data Type column in the Design view is not actually a data type. When you choose this entry, a wizard starts to help you define either a simple or complex lookup field.
10. What is the difference between datasheet view and design view?
Answer:
Datasheet View: Datasheet view shows the data in the database. It also allows you to enter and edit the data. It does not let you change the format of the database, other than minor changes.
Design View: Design view allows you to create or change the table, form, or other database object, an configure the fields. You can also set keys and restrict the values entered here. But you can't change the database data in design view.
11. What is the Default value property?
Answer: Default value property is used to set the default value that is automatically entered in a field, when a new record is inserted in the table.
12. Differentiate between Flat file and Relational Database.
Answer:
Flat File: A flat file database is a database that stores data in a plain text file. It is the simple but most important type of database that is used to store data in a plain text file.
Relational Database: A relational database refers to a database that stores data in a structured format, using rows and columns. This makes it easy to locate and access specific values within the database. It is relational because the values within each table are related to each other.
13. What is the use of report? Write the steps to open report wizard.
Answer: Report is an object in desktop database designed for formatting, calculating, printing, and summarizing the selected data.
Steps to open report wizard:
1. Open your database management software.
2. Go to the Reports section
3. Select Report Wizard.
14. What is the use of a query?
Answer: Query is an object that provides a custom view of data from one or more tables. Queries are a way of searching for and compiling data from one or more tables.
15. What are the types of queries?
Answer: Types of queries are:
1. Select query
2. Crosstab query
3. Parameter query
4. Transactional query
5. Make table query
6. Informational query
7. Navigational query
16. Write the steps to open simple query wizard?
Answer: Steps to open simple query wizard:
1. Open the database
2. Click the create tab
3. Click query wizard
4. Select simple query wizard and click ok
5. In the simple query wizard dialog box, select the tables to use
6. Use the arrow buttons to choose the fields to use in the query
7. Click next
8. Name the query and click finish.
17. What is the use of WHERE clause in an SQL statement?
Answer: The WHERE clause specifies the search condition which is used to determine the data which will appear in the result table.
Comparison operators used in the WHERE clause are:
= Equal, < Less than, > Greater than, <= Less than equal, >= Greater than equal, <> not equal.
18. What is the use of a form?
Answer: Form is an object in a desktop database designed primarily for data input or display or for control of application execution. You use forms to customize the presentation of data that your application extracts from queries or tables.
19. What is the use of Auto Form command or wizard?
Answer: The Auto Form command is used to generate a data entry form based on a selected table or query. It can be used to quickly create forms for prototyping or forms that don't require customization.
20. What is the use of Design View of a form?
Answer:
Design View: Design view allows you to create or change the table, form, or other database object, an configure the fields. You can also set keys and restrict the values entered here. But you can't change the database data in design view.
21. How can you open the database in Design view?
Answer: To open a database in Design view in MS Access you can:
1. Open the database you want to analyze
2. Right click the table you want to explore in the navigation pane
3. Click Design view on the shortcut menu.
22. How can you modify a form in Design view?
Answer: A way to modify a form in Design view:
* Add or remove fields: Drag fields from the field list pane onto the form. To add multiple fields at once, hold down Ctrl and click the fields you want to add.
23. State the purpose of UPDATE command with the help of an example.
Answer: The purpose of the UPDATE command in SQL is to update the data in a table in a database. It can be used to update single or multiple columns in a table.
Example:
* UPDATE table_name SET column1=value1,column2,.....Where condition
* table_name: The name of the table
* column1: The name of the first column
* value1: The new value for the first column
* condition: The condition to select the rows to update
24. Define the following:
Table, Primary key, Foreign key
Answer:
Table: A table is a collection of row and column.
Primary Key: The primary key is the most important key in the database. There can be only one primary key in a table. It will not allow duplicate or null values. The primary key contains unique values.
Foreign Key: A foreign key can be a common key in two database tables.
E. Long Answer Type Questions:
1. What do you understand by Query? Explain its types.
Answer: Query is an object that provides a custom view of data from one or more tables. Queries are a way of searching for and compiling data from one or more tables.
Types of queries:
Select queries: A select query is the most common type of query. It retrieves data from one or more tables and displays the results in a datasheet where you can update the records.
Parameter queries: A parameter query is a query that when runs displays its own dialog box prompting you for information, such as criteria for retrieving record or a value you want to insert in a field.
Crosstab queries: You can use crosstab queries to calculate and restructure data for easier analysis of data.
Action queries: An action query is a query that makes changes to or deletes many records in just one operation.
2. What are the steps for setting a Primary key?
Answer: To set a primary key in a table, you can:
1. Open the table in Design view.
2. Select the field or fields you want to use as the primary key.
3. Click the primary key button in the tools group.
You can also right click the selected field and choose primary key from the shortcut menu.
3. What is the difference between Short text and Long text, Number and auto number.
Answer:
Short Text: It stores text or combinations of text and numbers, including numbers that do not require calculating. It stores upto 255 characters.
Long Text: It stores lengthy text or combinations of text and numbers. It stores upto 63999 characters. It was previously known as a memo.
4. Define field properties.
Answer: Field properties are a set of rules that define how data is stored and displayed in a field in a database.
* Data type: Determines the type of data that can be stored in the field.
* Field size: Sets the maximum number of characters that can be entered in a text field.
* Format: Controls how data is displayed in the field.
* Input mask: Sets rules for entering data to ensure its entered correctly.
* Default value: Sets the default value that appears in the field when a new record is entered.
* Required: Sets whether a value is required to be entered in the field.
5. State and explain any three types of DDL commands.
Answer:
1. CREATE Command: This command is used to create new databases, tables, indexes, views and schemas.
Syntax: CREATE Database name _of __ database;
2. DROP Command: This command is used to delete a database or delete a column from a database.
Syntax: DROP Database name _of__ database;
3. ALTER Command: This command is used to add a new column, drop column, modify the existing columns.
Syntax: ALTER TABLE name __of__ table
ADD name _of _column datatype _of_ column;
6. What is Data Definition Language and Data Manipulation Language? Give one example of each.
Answer: DDL(Data Definition Language) and refers to SQL commands used to create, modify, and delete database structures such as tables, indexes, and views.
CREATE Command: This command is used to create new databases, tables, indexes, views and schemas.
Syntax: CREATE Database name _of __ database;
DML(Data Manipulation Language) refers to SQL commands used to insert, update, and delete data within a database.
Insert Command: The insert command is a fundamental command used to add data to a pre-existing structure in many programming languages, databases.
Syntax: INSERT INTO table_name(column1, column2.....);
Some other links:
No comments:
Post a Comment