0% found this document useful (0 votes)
11 views

Database Management System_Question and Answers

The document provides a comprehensive overview of Database Management Systems (DBMS), including definitions, types, advantages, and features. It explains key concepts such as primary and foreign keys, data types, and relationships between tables, along with SQL commands for data manipulation. Additionally, it outlines the structure of tables and the importance of referential integrity in maintaining data accuracy.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Database Management System_Question and Answers

The document provides a comprehensive overview of Database Management Systems (DBMS), including definitions, types, advantages, and features. It explains key concepts such as primary and foreign keys, data types, and relationships between tables, along with SQL commands for data manipulation. Additionally, it outlines the structure of tables and the importance of referential integrity in maintaining data accuracy.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Database Management System_Question and Answers

1. A database is an organized collection of data.


2. A database management system (DBMS) is a software package with computer
programs that controls the creation, maintenance, and use of a database.
3. Well known DBMSs include Oracle, IBM DB2, Microsoft SQL Server, Microsoft
Access, PostgreSQL, MySQL, FoxPro, and SQLite, OpenOffice Base.
4. Data/Database can be arranged in two types: Flat File and Relational File.
5. What is the difference between Flat file and Relational File?

Sr.No Flat File Relational File

1 Data is stored in a single table. Data is stored in multiple tables and the tables are
linked using a common field.

2 Usually suitable for less amount of Relational is suitable for medium to large amount
data. of data.

6. What are the advantages of databases?


The advantages of databases are as follows:
Reduces Data Redundancy, Sharing of Data , Data Integrity, Data Security , Privacy,
Backup and Recovery, Data Consistency
7. What are the features of a database?
The features of a database are as follows:
a. A database can have one or many tables.
b. Each table in a database contains information about one type of item.
c. Record uniqueness in every table.
d. Every database table should have one or more fields designated as keys.
8. A primary key is a unique value that identifies a row in a table.
9. When primary key constraint is applied on one or more columns then it is known as
Composite Primary Key.
10. The foreign key identifies a column or set of columns in one (referencing) table that
refers to a column or set of columns in another (referenced) table.
11. RDBMS stands for Relational Database Management System.
12. Difference between a primary and foreign key.

Sr.No Primary Key Foreign Key

1 A primary key is a unique value a foreign key identifies a column or set of


that identifies a row in a table. columns in one (referencing) table that
refers to a column or set of columns in
another (referenced. table.

Page 1 of 7
Database Management System_Question and Answers

2 A table can have only Primary 2. A table can have multiple Foreign Keys.
Key.

13. SQL stands for Structured Query Language.


14. A table is a set of data elements (values) that is organized using a model of vertical
columns(which are identified by their name) and horizontal rows.
15. A column/field is a set of data values of a particular simple type, one for each row of the
table.
16. A row also called a Record or Tuple represents a single, data item in a table.
17. What are different ways to create a table?
The different ways to create a table are as follows:
1. Create table in Design View
2. Use Wizard to Create Table
18. What are Data Types? Name the types of Data Types.
Datatypes are used to identify which type of data (value) we are going to store in the
database.
Data types in the OpenOffice base are broadly classified into five categories listed below.
• Numeric Types
• Alphanumeric Types
• Binary Types
• Date time
• Other Variable types
19. What are the Numeric Data types? List and explain the different numeric data types.
Numeric data types are used for describing numeric values for the field used in the table
of a database.

Page 2 of 7
Database Management System_Question and Answers

20. List and explain the different Alphanumeric data types.

21. What are the Binary data types?


Binary data types are used for storing data in binary formats. Binary data types in a
database can be used for storing photos, music files, etc.

22. What is Date time data type? List and explain its different data types.

23. What are the field properties/ properties of fields according to the data type set for each
field?
AutoValue – if set to yes then the field will get the auto numeric values.
Length – By default length of the field is 10 but the size of the field can be set to
maximum length.
Default Value – A default value can be set for a field if the user doesn't provide any value
while entering the values in the table.
Format example – This property helps to set the format of the data entered in the field
such as 91-222-333.

Page 3 of 7
Database Management System_Question and Answers

24. What are the field properties of character data type?


The field properties of character data types are as follows:
Entry Required – if set to yes then it will be necessary to insert the value in the field
which means that field cannot be left blank.
Length – By default length of the field is 10 but the size of the field can be set to
maximum length. 134
Default Value – A default value can be set for a field if the user doesn't provide any value
while entering the values in the table.
Format example – This property helps to set the format of the data entered in the field
such as 91-222-333.
25. Sorting means to arrange the data in either ascending order or descending order.
26. What is Referential Integrity?
Referential integrity is used to maintain accuracy and consistency of data in a
relationship.
In Base, data can be linked between two or more tables with the help of primary key and
foreign key constraints.
27. What are the advantages of Referential Integrity?
The advantages of Referential Integrity are as follows:
a. Adding records to a related table if there is no associated record available in the
primary key table.
b. Changing values in a primary if any dependent records are present in associated
table(s).
c. Deleting records from a primary key table if there are any matching related records
available in associated table(s).
28. What are the advantages of relationships between tables? / How relationships between
tables help?
The advantages of relationships between tables are as follows:
Save time as there is no need to enter the same data in separate tables.
Reduce data-entry errors.
Summarize data from related tables.
29. What are the three types of relationships in a table?
The three types of relationships in a table are as follows:
1. ONE to ONE
2. ONE to MANY OR MANY to ONE
3. MANY to MANY
30. The relationships applied on the tables can be removed also with the help of the Delete
option.
31. What is the file extension for databases created using OpenOffice.Org Base?
.odb is the extension for databases created using OpenOffice.Org Base.

Page 4 of 7
Database Management System_Question and Answers

32. Filtering means that the query uses criteria you provide to hide some data and present
only what you want to see.
33. Update statement is used for modifying records in a database.
34. By default, data is arranged in ASC order using ORDER BY clause.
35. A form provides the user a systematic way of storing information into the database.
It is an interface in a user-specified layout that lets users view, enter, and change data
directly in database objects such as tables.
36. A report helps to display the data in a summarized manner. It is used to generate the
overall work outcome in a clear format.
37. A query helps to join information from different tables and filter that information.
38. Data Manipulation Language (DML) consist of the following:
SELECT statement – Retrieve information from the database
INSERT statement - Inserts new information into the database
DELETE statement - Deletes information from the database
UPDATE statement - Modifies information in the database
39. Data Definition Language(DDL) is used to define data structures.
40. DCL stands for Data Control Language.
41. TCL stands for Truncate Control Language.
42. Consider the following Vendor table and write the queries for the following:
Datesheet

1. What is the name of the table?


Datesheet is the name of the table.
2. Primary key can be assigned to the Sub_code field in the above table.
3. Write the query to retrieve all the columns in a table. / Display the entire table.
Write a query to display the above date sheet.
SELECT * FROM Datesheet;
4. How many fields and records are there in the above table?
There are 4 fields and 4 records in the above table.
5. Write a query to create a table “GradeX” with the field name as Sr.No,
Name,Address,DOB and required datatype.
CREATE TABLE GradeX
(Sr.No int,
Name int,
Address varchar(50),
DOB date
);

Page 5 of 7
Database Management System_Question and Answers

6. Write a SQL command to display the records in ascending order by date of exam.
Select*from Datesheet order by DateofExam;
7. Write a query to display the subject name and date of the exam held on
‘Monday’.
Select Sub_Name, DateofExam from Datesheet where Days= ‘Monday’;
8. Write a SQL command to display the date of exam and Sub_Name of Science
subject.
Select Sub_Name, Date of Exam from Datesheet where Sub_Name =
‘Science’ ;
9. Is it possible to make more than one field as a primary key in your table?
(Yes/No). Justify your answer.
No, it is not possible to make more than one field as a primary key in the table
because a table can have only one Primary Key.
10. Write a query to delete the subject Science from the above table.
DELETE FROM Datesheet WHERE Sub_Name =”Science”;
43. Consider the following table Sales:

Answer:
1 There are 4 fields and 4 records in the Sales table.
2. i. select Sale_Id, Price from Sales where Discount > 1000;
ii. select * from Sales order by Prod_Name ASC;
iii. select Prod_Name, Price- Discount from Sales;

Page 6 of 7
Database Management System_Question and Answers

44. Consider the following table and write the queries.

Answers: a. Select * from Teachers where subject = “COMPUTER”;


b. Select * from teachers where salary >= 20000 and salary <= 35000;
c. Select Subject from Teachers where age > 40;
d. Select * from Teachers order by name ASC;
45. What types of keys can integrate data in the RDBMS?
a) Primary Key, Foreign Key, Tertiary Key
b) Primary Key, Secondary Key, Foreign Key
c) Composite Primary key, Foreign Key, Tertiary Key
d) Primary Key, Composite Primary Key, Foreign Key
46. Which of the following describes a DBMS?
a) A DBMS is a group of software programs that control the creation, maintenance and
usage of a database.
b) A DBMS is a collection of data.
c) The DBMS allows multiple users to access data from the same database at the
same time.
d) The DBMS automatically takes care of backup and data recovery.
47. In a database, the datatype is used to identify the type of data stored in a database.
48. Name the data type which will be given to a field to store photos? Binary datatype will
be given to a field to store photos.
49. WHERE clause specifies which rows to retrieve.
50. ORDER BY specifies an order in which to return the rows.

Page 7 of 7

You might also like