RDBMS1
RDBMS1
What is a database?
Answer – A database is an organized collection of data. Databases can store, retrieve and
manage large amounts of data. The database stores the information in the form of a table.
Answer – A database management system (DBMS) is a software package which manages and
maintains data in a database. A DBMS enables several user application programs to access the
same database at the same time. It enables organizations to easily create databases for a variety
of purposes. A database is a comprehensive collection of data records, files, and other items.
Answer – Database servers are powerful computers that store and manage data on a server.
This type of server is dedicated to a single purpose and helps to hold the database and run only
DBMS and related software.
a. Reduce Data Redundancy – When the same data set is stored in two or more locations, this
is referred to as data redundancy. As a result, this helps in the protection of duplicate data in a
database.
b. Sharing of Data – Databases can share the data with multiple users at a time. There are
multiple levels of authorization to access the data, and as a result, the data can only be shared
with those who are permitted.
c. Data Integrity – The term “data integrity” refers to the accuracy and consistency of the data
in the database. Data integrity also refers to data safety.
d. Data Security – You know that data is very important, databases give privileges to authorized
users and allow them to access the database using username and password.
e. Privacy – A database’s privacy rule says that only authorized users are permitted to access the
database in accordance with its privacy constraints. For example – if you log in your Gmail
account then you will see your email only, you will not see any other account email.
f. Backup and Recovery – Backup and recovery are handled automatically by the Database
Management System.
g. Data Consistency – Data consistency ensures the modification in the data will be the same
for all the users who are accessing the database. For example if you have registered a train ticket
from IRCTC website then whatever changes are there it will be the same for all the users who are
trying to reserve the ticket.
7. What is RDBMS?
Answer – RDBMS stands for Relational Database Management System is an upgraded version
of DBMS, RDBMS stores the data in the form of a table. In RDBMS multiple tables can be linked
together, and support multiple users to access the database.
a. Primary Key (PK) – A primary key is a unique value that identifies a row in a table. If the
primary key is defined to any table column it means the duplication will be not allowed.
b. Composite Primary Key – When a primary key is applied to one or more columns in the
same table is known as Composite Primary Key.
c. Foreign Key (FK) – By default columns are foreign key, foreign key points to the primary key
of another table.
Session 2: Create and Edit tables using wizard & SQL commands
9. What are the different database objects?
Answer –
a. Table – A table is a collection of data components structured in the form of vertical columns
and horizontal rows.
b. Columns / Fields / Attributes – Columns or Fields or Attributes all are the same, A column is
a collection of data values of a single data type, one for each row in a table. It is also known as
the heading of the column.
c. Rows / Records / Tuples – A row, also known as a Record or Tuple, is a single data item in a
table. A database table can be represented as a series of rows and columns or fields. Each row in
a table represents a set of related data, and each row has the same structure.
Answer – Datatypes are used to define the type of data that will be stored in the database. Data
types in the OpenOffice base are classified into five types.
a. Numeric Types – Numeric data types are used to describe numerical values for fields in a
database table. Numeric data types used for numbers and decimals.
Some of the important numeric data types are –
a. Boolean
b. Integer
c. Numeric
d. Decimal
e. Float
f. double
b. Alphanumeric Types – Alphanumeric data types are used to describe character values for
fields in a database.
Some of the important alphanumeric data types are –
a. Longvarchar
b. Char
c. Varchar
d. Varchar_ignorecase
c. Binary Types – For storing data in binary formats, binary data types are used. Binary data
types in a database can be used to store images, music files, and so on.
Some of the important Binary data types are –
a. Varbinary
b. Binary
c. Longvarbinary
d. Date time – Date and time data types are used to describe date and time values for fields in
a database table.
Some of the important Date time data types are –
a. Date
b. Time
c. Timestamp
Answer – There are two different ways to creating the table in database –
a. Using Design View
b. Using Wizard
Answer – A table is a collection of data components structured in the form of vertical columns
and horizontal rows.
Answer – Tuple is a single data item in a table. A database table can be represented as a series
of rows and columns or fields.
An attribute is a collection of data values of a single data type, one for each row in a table.
16. What is the file extension for databases created using OpenOffice.Org Base?
17. List any three file formats that can be managed using OpenOffice.Org Base?
18. How many types of relationships can be created in Base? Explain each of the them.
19. What do you mean by Sorting? In how many ways it can be done?
Answer – Referential integrity is used to keep data maintained, accurate and consistent.
Data in Base can be connected between two or more tables using primary key and foreign key
constraints.
For example – Suppose there is two table “Student_details” and “fee_details”,
Here, both have a common field “Grno” this is known as referential Integrity.
DDL (Data definition language) – Data definition language is used to design and modify the
structure of a database.
Common DDL commands are
a. Create – This command is used to create database
b. Alter – This command is used to modify the database.
c. Drop – This command is used to delete database tables.
DML (Data manipulation language) – Data manipulation language provides commands for
manipulating data in databases.
Common DML commands are
a. Select – This command is used to display information from the database.
b. Insert – This command is used to insert new records in the database.
c. Delete – This command is used to delete records from the database.
d. Update – This command is used to modify records in the database.
22. Name DML commands.
Answer – Data manipulation language (DML) access and manipulate data in existing tables.
Name of DML commands –
a. Select
b. Insert
c. Update
d. Delete
Answer – Queries are commands that describe the data structure as well as manipulate the data
in the database. The purpose of a query is to do calculations, integrate data from many tables,
and add, alter, or delete data from a database.
Answer – Where clause is used to display specific data from the database.
25. Differentiate between Where clause and Orderby clause of SQL statements.
Answer – Where clause is used to display specific data from the database and Orderby used to
display data in ascending order or descending order.
26. State the purpose of Update Command with the help of an example.
Answer – The update statement is used to modify records in the table. Example of update
command is – Update Student_details set Location = ‘Pune’ where Rollno = 10;
b. To list the details of all the students whose percentage is between 90 to 100.
Answer – Select * from students where percentage >= 90 and percentage <= 100;
29. Write the SQL commands to answer the queries based on Fabric table
b. Write a query to display only those fabric whose disc is more than 10
30. Consider the following Vendor table and write the queries
VendorID VName DateofRegistration Location
11 Soap 40 80
22 Powder 80 30
33 Face cream 250 25
55 Soap box 20 50
a. Display the total amount of each item. The amount must be calculated as the price
multiplied by quantity for each item.
32. Identify the columns and data types of a table: Airlines. Mention at least four columns
with data type.
Answer –
Columns Data type
Flight No Text
No.of Passengers Integer
Airlines Text
Arrival_Time Date/Time
Departure_Time Date/Time
Fares Float
33. Identify the columns and data types of a table: Students. Mention at least four
columns with data type.
Answer –
Columns Data type
RollNo Integer
Student_name Varchar(20)
Father_name Varchar(20)
Mother_name Varchar(20)
Address Varchar(50)
DOB Date
Answer – A form allows the user to enter information into a database in a systematic manner. It
is a user-defined interface that allows users to see, enter, and edit data directly in database.
Answer – Reports help to present the data in proper manner which is stored in the database, It
also displays the data in summary format.
Answer –
Forms –
a. Forms help or manage to store data in a systematic format.
b. The prerequisites to create a form would be –
c. Add all the necessary fields in the form
d. Make the connection between form and the table
Reports –
a. Reports display the data in a summarized manner.
b. The prerequisites to create a report would be –
c. Data
d. Data source
Answer –
Form
a. Forms are used to store the data in the semantic way
b. Edit, delete & modify can be easily managed
c. Auto calculation can be done easily
Report
a. Report display the data in the presenting format
b. Report can display all the record from the table
c. Edit, delete & modification cannot be done through report
d. You can take printout with the help of report
Answer – Yes form can display the data from queries, with the help of query you can filter the
data and you can display in the form.
39. In how many ways Forms and Reports can be created in a database?
Answer – There are two ways to create a form and report in the database.
a. Using Wizard
b. Using Design View