Class X Information Technology Code(402)
UNIT-3: Relational Database Management System
Fill in the blanks:
1. A database is an organized collection of data.
2. A database management system is a software package that can be used for creating and
managing databases.
3. A RDBMS is a database management system that is based on the relational model.
4. Three popular DBMS software are SQL Server, Sybase & MySQL.
5. A primary key is a unique value that identifies a row in a table.
6. Composite Key is a combination of two_ columns.
7. The types of languages used for creating and manipulating the data in the Database are
DDL & DML
8. A Queries is a standard for commands that define the different structures in a database.
9. A DML is a language that enables users to access and manipulate data in a database.
10. A SELECT is a part of DML involving information retrieval only.
11. A table is a set of data elements that is organized using a model of vertical columns and
horizontal rows.
12. A column is a set of data values of a particular type, one for each row of the table.
13. A tuple represents a single, data item in a table.
14. Datatype are used to identify which type of data we are going to store in the database.
15. There are two ways to create a table.
16. A popular data manipulation language is SQL.
Very Short Answer Questions
1. What does DBMS stands for?
Ans : Database Management System
2. What does RDBMS stands for?
Ans: Relational Database Management System.
3. How is data organized in a RDBMS?
Ans: In RDBMS data organized into tables.
Short Answer Questions
1. Why are data types used in DBMS /RDBMS?
Ans : Datatypes are used to identify which type of data (value) we are going to store in the
database. Fields themselves can be of different types depending on the data they
contain.
Data types in LibreOffice base are broadly classified into five categories listed below.
• Numeric Types
• Alphanumeric Types
• Binary Types
• Date time
• Other Variable type
2. List datatypes available in Numeric Datatype?
Ans : Numeric data types are used for describing numeric values for the field used in the
table of a database. Numeric data types in a database can be used for storing
information such as mobile number, roll number, door number, year of school
admission, true or false statements, statistical values, etc. The different types of
numeric data types available are listed here.
1. BOOLEAN
2. TINYINT
3. SMALLINT
4. INTEGER
5. BIGINT
6. NUMERIC
7. DECIMAL
8. REAL
9. FLOAT
10. DOUBLE
Q.3 How many types of relationships can created in tables?
Ans: There are three types of relationships which can be created in tables:
1. ONE to ONE
2. ONE to MANY OR MANY to ONE
3. MANY to MANY
Q.4 Difference between DDL and DML.
Ans :
Srl DDL DML
No
1. DDL stands for Data Definition DML stands for Data Manipulation
Language. Language.
2. DDL statements are used to DML statement is used to insert,
create database, schema, update or delete the records.
constraints, users, tables etc.
Q. 5 Difference between RDBMS and DBMS.
Ans:
Srl RDBMS DBMS
N
o
1. RDBMS stands for Relational DBMS stands for Database
Database Management System. Management System.
2. RDBMS data is stored in the form DBMS stores data as a file.
of tables.
3 RDBMS supports multiple users. DBMS supports single users
4. RDBMS supports client-server DBMS does not support client-
architecture. server architecture
Q.6 Define DDL commands.
[Link] DDL commands in SQL are used to create database schema and to define the type
and structure of the data that will be stored in a database.
SQL DDL commands are further divided into the following major categories:
1. CREATE.
2. ALTER.
3. DROP.
4. TRUNCATE.
Simple Create table sql query is below:
CREATE TABLE [Employees]([EmployeeID] int, [FullName]
nvarchar(30),[Birthdate] date, [E-mail] nvarchar(30),[Position]
nvarchar(30),[Department] nvarchar(30))
Drop table query is below
DROP TABLE [Employees]
Alter table query is below
ALTER TABLE Employees ALTER COLUMN ID int NOT NULL
DML – Data Manipulation Language, which includes the following constructions:
∙ SELECT – data selection
∙ INSERT – new data insertion
∙ UPDATE – data update
∙ DELETE – data deletion
SELECT QUERY is below
SELECT * from employee;
Select Query with condition:
SELECT * FROM employee WHERE mobile=”999041341”;
Select Query with some fields not all data from table;
SELECT name, emp_id, mobile FROM
employee;
INSERT Query
INSERT Employees VALUES (1000,'CEO','Administration','John')
Delete single row from table Query
Delete from employee where mobile=”999041341”;
Update record of the table Query
UPDATE employee set name=”Yashvi”,
emp_id=”1234” where mobile=”9250566452”;
Q.7 Define Reports and Forms.
Ans.
Reports: A database report is the formatted and presentable result of data
retrieved from database objects like tables or queries. A report helps to display the
data in a summarized manner. It is used to generate the overall work outcome in a
clear format.
Forms: A database form provides the user a systematic and interactive 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.
There are two ways of creating forms and reports:
i)Design View
ii)Using Wizard
Q.8 What is Database. Give real life examples of database.
Ans. A database is an organized collection of data stored in a computer system and usually
managed by a database management system (DBMS).Examples of database are Hospital
management, grocery stores, online shopping.