Beruflich Dokumente
Kultur Dokumente
Question 14. Name two possible primary keys for an Employee table.
Answer: Possible primary keys for an Employee table are empcode, empphonenumber.
Question 16. What is the default extension of Open Office BASE database?
Answer: The default extension of Open Office BASE database is .odb.
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.
1. Shridhar 20000
2. Raghav 40000
Here EmpNo, Name and Salary are three different fields. 1, Shridhar, 20000 represents one
complete record.
Data Information
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 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:
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:
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.
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
A record refers to a row in the table. A field refers to a column in the table.
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.
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
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”.