0% found this document useful (0 votes)
24 views8 pages

FYJC Exercise Chap. 2 Introduction To DBMS

This document contains exercises and answer keys related to Database Management Systems (DBMS) for students at Mother Teresa Secondary Convent School & Jr. College. It covers various topics including data types, SQL commands, database advantages, data models, primary keys, and DDL. The document serves as a practical guide for students to understand and apply DBMS concepts.

Uploaded by

Mubarak Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views8 pages

FYJC Exercise Chap. 2 Introduction To DBMS

This document contains exercises and answer keys related to Database Management Systems (DBMS) for students at Mother Teresa Secondary Convent School & Jr. College. It covers various topics including data types, SQL commands, database advantages, data models, primary keys, and DDL. The document serves as a practical guide for students to understand and apply DBMS concepts.

Uploaded by

Mubarak Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Mother Teresa Secondary Convent School & Jr.

College
FYJC-IT

Introduction to DBMS
Chapter wise Exercise – Answer Key

Q. 1 Complete the following activity.

1. Tick whichever box is not valid.

2. The student wants to create a field Pincode in a table, which data type he will
choose?

Int

3. . Tick the appropriate box

1|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

4. . Tick the appropriate circle

Q. 2 Observe the field names of a database given below in ‘Column A’ related


to Bus reservation. Write suitable data types for each field in front of the
respective field in ‘Column B’.

Varchar
int

char

int

Q.3 Write the use of the following SQL command.

1. The

2|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

Q.4 Create a table for the information given below by choosing appropriate
data types. Specify proper primary key for the table (1) Movie (2) Actor.

1. Movie (Registeration_no, movie_name, Realease_Date)

Ans. CREATE TABLE Movie


(
Registeration_no int(20) PRIMARY KEY,
movie_name VARCHAR(20),
Realease_Date DATE
);

2. Actor (actor_id, Actor_name, birth_date )

Ans. CREATE TABLE Actor


(
actor_id int(20) PRIMARY KEY,
Actor_name VARCHAR(20),
Birth_Date DATE
);

Q.5 Consider the following table Stationary. Write SQL commands for the
following statements.

Table: Stationary

3|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

1. Write SQL command to create above Table

CREATE TABLE Stationary


(
S_ID int(20) PRIMARY KEY,
S_Name VARCHAR(20),
C_Name VARCHAR(20),
Price int(20),
Quantity int(20)
);

2. Write SQL command to insert the above-mentioned record in the table.

INSERT INTO Stationary


Values (001, ‘Note Book’, ‘ABC’, 20,50);
INSERT INTO Stationary
Values (002, ‘Note Book’, ‘XYZ’, 10,80);
INSERT INTO Stationary
Values (003, ‘Note Book’, ‘PQR’, 600,02);

3. To delete the above table.

DROP TABLE Stationery;

Q.6 Answer the following questions.

1. What is Database ?
Ans.:
Database
 A database is collection of interrelated data.
 Database helps in efficient retrieval, inserting and deleting of data.
4|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

 A database, often abbreviated as DB.


 Database is a collection of information organized in such a way that a
computer program can quickly select desired pieces of data.

2. What are the advantages of a DBMS?


Ans.:
Advantages of a DBMS
A. Reducing Data Redundancy:

i) In File Processing System, duplicate data is created in many places


because all the programs have their own files this creates data
redundancy.
ii) ‘In DBMS, all the files are integrated into a single database. The
whole data is stored only once in a single place so there is no
chance of duplicate data.

B. Sharing of Data:

i) In a database, the users of the database can share the data among
themselves.
ii) There are various levels of authorization to access the data. And
consequently, the data can only be shared based on the correct
authorization protocols being followed.

C. Data Integrity:

i) Data integrity means that the data is accurate and consistent in the
database.
ii) Most of database are visible to multiple users so it is necessary to
ensure that the data is correct and consistent in all the database and
for all the users.

D. Data Security:

i) Data Security is a vital concept in a database.


ii) Only authorized users should be allowed to access the database and
their identity should be authenticated using a username and password.
5|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

iii) Unauthorized users should not be allowed to access the database


under any circumstances as it violates the integrity constraints.

E. Privacy:

i) The privacy rule is a database means only the authorized user can
access a database according to its privacy constraints.

F. Backup and Recovery:

i) Data loss is a very big problem for all organizations.


ii) In a traditional tile processing system, a user needs to back up the
database after a regular interval of time that wastes lots of time and
resources.
iii) Now user don’t need to backup data periodically because this is taken
care of by the DBMS

G. Development and Maintenance Time:

i) DBMS reduces application development and maintenance time.


ii) It supports many important functions that are common to many
applications, accessing data stored in the DBMS, which facilitates the
quick development of application .

3. What do you understand by Data Model?


Ans.:
Data Model
a) Database is designed according to certain rules. This logical structure of
database is known as a Model.
b) Data models define how the data is connected to each other and how they
are processed and stored inside the system.
c) It describes the method of storing and retrieving the data.
d) There are different models like network models, hierarchical model and
relational model

4. What is Primary Key?


6|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

Ans.:
Primary Key
A group of one or more columns used to uniquely identify each row of a
relation is called its Primary Key.

5. What is DDL (Data Definition Language)


Ans:
DDL
Data Definition Language

a) DDL statements or commands are used to define and modify the database
structure of your tables or schema.
b) When you execute a DDL statement, it takes effect immediately.

Q.7 In a company the data is stored in a table under the following fields
Employee number, Last name, Date of birth, Address. Which data type will you
use for the above field?

7|Page
Mother Teresa Secondary Convent School & Jr. College
FYJC-IT

Q.8 Complete the following.

Revoke

Select

8|Page

You might also like