Sie sind auf Seite 1von 10

CLASS X - INTRODUCTION TO DATABASE

Question 1. What is database? Give example.


Answer: A collection of related information organized as tables is known as database, e.g.
INGRES, MySQL etc.

Question 2. Write the purpose of DBMS.


Answer: DBMS is used to store logically related information at a centralized location. It
facilitates data sharing among all the applications requiring it.

Question 3. Write the relationship between a database and a table.


Answer: A database contains multiple tables whereas; a table cannot exist outside a database.

Question 4. Give any one use of database.


Answer: A database is used to store logically related information in table.

Question 5. What is field in database? Give an example.


Answer: A field is an area, reserved for a specific piece of data. It is also known as attribute, e.g.
Customer_Name.

Question 6. Define the term DBMS.


Answer: The full form of DBMS is Database Management System. It is a computer based record
keeping system.

Question 7. State the primary goal of a DBMS.


Answer: To provide a convenient and efficient environment in which we can store and retrieve
information.

Question 8. Write any two uses of database management system.


Answer:

1. DBMS is used to store data at a centralized location.


2. It is used to minimize data redundancy and data inconsistency.

Question 9. Give any two disadvantages of the database.


Answer:
1. High complexity
2. Database failure

Question 10. Write any two advantages of using database.


Answer:

1. Can ensure data security.


2. Reduces the data redundancy.

Question 11. What is a primary key?


Answer: A field which uniquely identifies each record in a table is known as primary key. e.g.
empld is the primary key of the Employee table.

Question 12. Give one advantage of using primary key.


Answer: A primary key uniquely identifies the record in the table.

Question 13. What is the significance of a primary key?


Answer: A primary key cannot allow null values and must have a unique index.

Question 14. Name two possible primary keys for an Employee table.
Answer: Possible primary keys for an Employee table are empcode, empphonenumber.

Question 15. Write the significance of a foreign key.


Answer: A foreign key is used to Establish relationship between any two tables of RDBMS.

Question 16. What is the default extension of Open Office BASE database?
Answer: The default extension of Open Office BASE database is .odb.

Short Answer Type Questions [2 & 3 Marks each]

Question 1. What are the main purposes of a database system?


Answer:

 Storage of information.
 Retrieval of information quickly.
 Sorting, selecting data that satisfies certain criteria (filtering).
 Produce the report in some standardised and readable format.
Question 2. How are fields, record and a table related to each other? Explain with the help of
an example.

Answer: Fields are one type of information. A record contains logically related fields. A table
Emp name contains logically related records.

EmpNo Name Salary

1. Shridhar 20000

2. Raghav 40000

Here EmpNo, Name and Salary are three different fields. 1, Shridhar, 20000 represents one
complete record.

Question 3. What is the difference between ‘Rows’ and ‘Columns’ in a table?


Answer: In a table, rows are called records and columns are termed as fields. A row stores
complete information of a record whereas column stores only similar data values for all
records.

Question 4. Distinguish between data and information.


Answer: Distinguish between data and information are as follows:

Data Information

It is a raw facts. It is a process form of data.


It considers facts symbols, images for It considers knowledge derived from study,

reference or analysis. experience or instruction.

e.g. 23 is a data. e.g. age = 23 is information.

Question 5. Define query in the context of database.

Answer: A query is an inquiry into the database using the SELECT statement.These statements
give you filtered data according to your conditions and specifications indicating the fields,
records and summaries which a user wants to fetch from a database.

Question 6. Define forms and what is the need of using them?


Answer: In a database, a form is a window or a screen that contains numerous fields or spaces
to enter data. Forms can be used to view and edit your data. It is an interface in user specified
layout.
e.g. a user can create a data entry form that looks exactly like a paper form. People generally
prefer to enter data into a well-designed form, rather than a table.

Question 7. What do you understand by report?


Answer: When you want to print those records which are fetched from your database, design a
report. It is an effective way to present data in a printed format. It allows you to represent data
retrieved from one or more tables, so that it can be analysed.

Question 8. What do you mean by DBMS?


Answer: It is a collection of programs that enables users to create, maintain database and
control all the access to the database. It is a computer based record keeping system. DBMS is a
software package that manages database, e.g. MySQL, INGRES, MS-ACCESS etc.
DBMS is actually a tool that is used to perform any kind of operation on data in database.

Question 9. Define RDBMS.


Answer: RDBMS is a type of DataBase Management System that stores data in the form of
relations (tables). Relational databases are powerful, so they require few assumptions about
how data is related or how, it will be extracted from the database. It is based on the model
given by E F Codd.

Question 10. A table named School (containing data of students of the whole school) is
created, where each record consists of several fields including AdmissionNo (Admission
Number), RollNo (Roll Number), Name. Which field out of these three should be set as the
primary key and why?
Answer: AdmissionNo should be set as primary key because admission numbers are unique for
each and every students of the school, which is not possible in the case with RollNo and Name.

Question 11. What is the utility of primary key in database? Write distinct features of primary
keys.
Answer: Primary key is used to uniquely identify the record in a database. It can be a column or
a set of columns in the table. Main features of primary key are as follows:

1. It must contain a unique value for each record of table.


2. It does not contain null values.

Long Answer Type Questions [5 Marks each]

Question 1. Discuss the components of a database.


Answer: A database consists of several components. Each component plays an important role
in the database system environment.
The major components of database are as follows:

 Data
It is raw numbers, characters or facts represented by value. Most of the organisations
generate, store and process large amount of data. The data acts as a bridge between
the hardware and the software. Data may be of different types such as User data,
Metadata and Application Metadata.
 Software
It is a set of programs that lies between the stored data and the users of database. It is
used to control and manage the overall computerised database. It uses different types
of software such as MySQL, Oracle etc.
 Hardware
It is the physical aspect of computer, telecommunication and database, which consists
of the secondary storage devices such as magnetic disks, optical discs etc., on which
data is stored.
 Users
It is the person, who needs information from the database to carry out its primary
business responsibilities.

The various types of users which can access the database system are as follows:

 Database Administrator (DBA)


A person, who is responsible for managing or establishing policies for the maintenance
and handling the overall database management system is called DBA.
 Application Programmers
The people, who write application programs in programming languages to interact and
manipulate the database are called application programmers.
 End-user
A person, who interacts with the database system to perform different operations on
the database like inserting, deleting etc., through menus or forms.

Question 2. Define database management system. Write two advantages of using database
management system for school.
Answer: DataBase Management System (DBMS) is a collection of programs that enable users to
create, maintain database and control all the access to the database. The primary goal of the
DBMS is to provide an environment that is both convenient and efficient for user to retrieve
and store information.

The advantages of using DBMS for school are as follows:

1. In school, DBMS is used to store the data about students, teachers and any other
related thing at a centralised location.
2. It provides security to the personal information of the school, stored in it.
3. Question 3. Distinguish between a record and a field in a table, with an example.
Answer: Distinguish between a record and a field in a table are as follows:

Record Field

It is a collection of data items, which represent a


It is an area within the record reserved for
complete unit of information about a thing or a
person. a specific piece of data.

A record refers to a row in the table. A field refers to a column in the table.

Record is also known as tuple. Field is also known as attribute.

e.g. if Empolyee is a table, then empld,


e.g. if Employee is a table, then entire information
empName, department, salary are the
of an employee is called a record.
fields.

Question 4. Write the steps to design a database.


Answer: Steps to Design a Database
There are various steps to design a database which are as follows:

 Step 1 Determine the purpose of your database The first step of designing a database is
to determine the purpose and mechanism to design and use it.
 Step 2 Determine the tables Tables are one of the most important elements of a
database, consist of rows and columns. To create a well-defined database, you have to
keep some conditions which are as follows:
 A table should not contain duplicate information.
 Each table should contain information about one subject.
e.g. One table is used to contain the personal information of the students and
the other is used to contain the marks scored by the student.
Step 3 Determine the fields After creating a table, you need to decide the type and
number of fields required for the tables in your database. Each field in a table contains
individual facts about the table’s subject.
e.g. A customer table may include company name, address, city, state and phone
number fields.
Step 4 Identify the primary key in a table From the fields of table, you need to identify a
primary key which uniquely identifies each individual record of the table. The primary key helps
you to reduce data duplication in the table.
Step 5 Determine the relationship between tables In this step, you need to determine
relationship between two or more tables in your database. You can set-up a relationship
between tables on the basis of common field between them. Establishing a relationship allows
you to fetch any information from both the tables.
Step 6 Refine the design After you have designed the tables, fields and relationships, its time to
study the design and detect any faults that might remain.
Step 7 Enter data and create other database objects When you are satisfied that the database
structure meets the goals you needed, add all your existing data to the tables.

Question 5: Define the following:

a) DDL commands
b) DML commands
c) Database servers

Answer : DDL commands are used for defining database elements like tables, indexes etc.. For
example: Create table, Drop , Alter etc.

DML commands are used to manipulate data in the database, for example insert command,
delete command, select command etc.

Database servers are specialized system to store databases. A data server (DS) is a software
program/platform used to provide database services like storing, processing and securing data.
These database services are consumed by other software programs or components. Sometimes
the computer hardware, where the database is running, is also referred to as a database server.
Therefore, the data server can be seen as the combination of software and hardware platform
that runs the installed database and provides relevant services. A data server is also known as a
database server.
Question 6: Give the syntax and examples of following SQL commands:
Create Table, Insert, Select and Delete

 Create table Table_Name (Col1_Name datatype, Col1_Name


datatype ....);
 Insert into Table_Name (Col1_Name datatype, Col1_Name
datatype ....); Values(“ A”, “B”,….);

 Select Col1, Col2, Col7… From Table_Name Where Col1 =”A”;

Question 7: a) Write a SQL command to create a table ‘Student’ with following fields:

Student_No - Integer

Student_Name - varchar(20)

Address - varchar(50)

DOA - Date

b) Write a SQL command to insert one row in the above table as (“101”, “Ram”, “Bokaro”,
“06/06/2018”).

c) Write a SQL command to select all values from the table Student.

d) Write an SQL command to display the Name and Address of the student with Student_No
“101”.

e) What should be the primary key?


Answer:

a) Create table Student (Student_No Integer,


Student_Name varchar(20), Address varchar(50), DOA
Date);
b) Insert into Student(Student_no, Student_Name,
Address, DOA)
Values ( “101”, “Ram” , “Bokaro”, “06/06/2018”);
c) Select * from Student;
d) Select Student_Name, Address from Student
Where Student_No =”101”;
e) Student_No should be the primary key.

Das könnte Ihnen auch gefallen