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

M1092187-RDBMS Assignment

The document provides an overview of RDBMS, including the concept of normalization, key definitions (primary, foreign, candidate, super keys), and the advantages of RDBMS over traditional DBMS. It discusses the structure of databases, issues with traditional file-based systems, various languages used in DBMS, types of relationships among tables, and differences between DELETE and TRUNCATE commands. Overall, it emphasizes the importance of structured data management and integrity in relational databases.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

M1092187-RDBMS Assignment

The document provides an overview of RDBMS, including the concept of normalization, key definitions (primary, foreign, candidate, super keys), and the advantages of RDBMS over traditional DBMS. It discusses the structure of databases, issues with traditional file-based systems, various languages used in DBMS, types of relationships among tables, and differences between DELETE and TRUNCATE commands. Overall, it emphasizes the importance of structured data management and integrity in relational databases.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

RDBMS

1.What is Normalization? and what explains different normalization forms?


Ans:
Normalization refers to the process of structuring and organizing date in a data
base or in a relational database, which includes creating tables and establishing
relationship between those tables according to all the rules which are designed
to protect the data and to make the database more flexible by eliminating
redundancy and inconsistent dependency. And having series of normal forms in
order to reduce the repetition and improve data integrity.
Normalization avoids:-
 Duplication of data
 Insert anomaly
 Delete anomaly
 Update anomaly
 The stages at which a table is organized is known as its normal form.
Normalization includes six stage process which are:-
 First normal form (1st NF)
 Second normal form (2nd NF)
 Third normal form (3rd NF)
 Boyce codd normal form (BCNF)
 Forth normal form (4th NF)

2.Define primary key, foreign key, candidate key, super key?


Ans:
 PRIMARY KEY – Primary key refers as column or columns that
contains values that uniquely identify each row in a table. It is very
important to have a primary key in our database as it gives us optim to
insert, update, restore or delete data from any database table. Optim uses
primary keys that are defined to the database.
 FOREIGN KEY – It is a column that creates a relationship between two
tables. The purpose of foreign keys is to maintain data integrity and allows
navigation between two different instances of an entity.
 CANDIDATE KEY – It is a set of attributes (or attribute) which uniquely
identify the tuples in a relation or table. But it is a proper subset of a super
key.
 SUPER KEY – It is an (or set of attributes) that is used to uniquely
identifies all the attributes in a relation.

3.What are the advantages of RDBMS?


Ans:
Flexibility:- This feature of RDBMS saves a lot of time as updating data in
one place is enough. For example, suppose you have data from students,
and you have to update one student’s detail. In that case, you just have to
update that detail in the main table rather than updating it in every file; it
automatically updates that information in every file of the database.

Maintainability: It provides easy usability. It allows database admins to


maintain, control, update data into the database easily. With RDBMS,
backing up of data becomes easy. Automation tools of RBDMS automate
these tasks.
Data Structure: As RDBMS stores data in a table format, it is easily
understood by the users. Data are organized in a structured manner and
matches entries by firing queries.
Privileges: This feature of RDBMS allows database administrators to
control activities over the database. Administrators can give specific access
to a user rather than giving all Access. Administrators can also stop user
access.

4. How is RDBMS preferable option over the DBMS?


Ans:
 RELATIONAL DATABASE MANAGEMENT SYATEM (RDBMS), is
more advanced version of a DBMS system that allows access to data in a
more efficient way. It is used to store or manage only the data that are in
the
form of tables.
 In RDBMS we noticed that it avoids data redundancy whereas data
redundancy is very common in DBMS. And also, RDBMS tries to
utilizes keys and indexes in the table to avoid any data redundancies.
 RDBMS uses a common column method in which we can relate to two
tables at a time with use of two common column, which technically not
possible in DBMS.
 Since RDBMS can process the complex and large amount of data, it
is suitable for wider range of Apps as compared to DBMS.
 You can normalize tables in RDBMS system so that they follow a proper
structure of rows and columns. But this process is not possible in
DBMS. And it also uses foreign keys which doesn’t involve DBMS.
 RDBMS consist of a set of defined guidelines for sorting data and this
process doesn’t exists in DBMS it doesn’t follow any guidelines for
sorting data. RDBMS supports the tabular structure of data and
relationship
between tables to access information, while DBMS doesn’t provide
uniform methods to access stored information.
 DBMS doesn’t support distributed databases, but RDBMS
supports distributed databases.
 Some of the popular DBMS are Dbase, Microsoft Access, LibreOffice
Base, FoxPro. The widely used RDBMS include SQL Server, Oracle,
MySQL, MariaDB, SQLite.

5.What is database?
Ans:
- A database is an organized collection of data, so that it can be easily
accessed and managed. You can organize data into tables, rows, columns,
and index which makes it much easier to use and to find the relevant data’s
which are needed in the function. It basically specialized and used for rapid
search and retrieval by a computer.

6.Mention the issues with traditional file-based systems that make DBMS a
better choice?
Ans:
 Traditionally, the file system was used for data management. Data was
stored in files and users access those files directly by going at the location
of the file physically. But things become harder when the amount of data
stored in the files get increased. If there are too many files you are not
going to go through it one by one practically, No. which shows us that It is
very tedious and next to impossible process.
 when we are having some online or digital data, then we store our data in
some database and one of the particular software is used to handle the
database. So, there is a lot of difference between the traditional file system
and the Database Management System. File System is basically referring
to a traditional way of storing data where the user saves the file manually
at any location. It is an easy way to store texts, audio, video but here
security is a major concern.
 The options which are given by the operating system in the name of
security are very limited. Only options which we have are locks and hidden
files. Also, these files are very hard to maintain and users manually go to
these locations to access these files. So, there were many problems with
this file system.
 Problems with the traditional file system Data Redundancy, In a file system
is that there are high chances of data duplicity. Same data may be stored
multiple times. For Example, We have an employee who is working on two
projects. So, we might end up storing the information of that employee
twice, which may lead to increased storage.
 Data Inconsistency is something we face in this process which shows that
data redundancy is the main cause of data inconsistency.
 In the above example, let us suppose we need to change the mobile
number of the employee and we change it in one place but we forget to
edit it at another place. This would lead to data inconsistency because in
future if we refer to this data we would not know which one is correct and
which one is wrong. For having the correct data you need to store the same
data at both places and this is a very bad thing to do.
 We face a low security issue in this file system. Anyone having access to
the files can see all the data. There is no role-based access control i.e there
is no method by which some authenticated people would have access to all
data and others would have access to only limited data.
 There are some of the attributes of accessing files from a file system which
refers to metadata which means data about data. If we want to access any
file in the file system then we require the name of the file, its address,
permissions etc. All these are not easy to remember and also not user-
friendly. Example: If we need to access any file, we need to provide its full
location like Desktop/AfterAcademy/DBMS/FileSystemVsDBMS/. No
Concurrent Access: If multiple users access the data at the same time then
there might be some data inconsistency.

7.Explain different languages present in DBMS?


Ans:
– Different type of languages that are present in DBMS are as follows −
 Data Definition Language (DDL) − Create, Drop,
Truncate, Rename.

 Data Manipulation language (DML) – Select, Insert,


Delete, Update.

 Data Control Language (DCL) − Revoke, Grant.


 Transaction Control Language (TCL) − Rollback, Commit.
 Data Definition Language (DDL) – It is a language that allows the user
to define the data and their relationship to other types of data. The DDL
commands are: Create, Alter, Rename, Drop, Truncate.
 Data Manipulation Language (DML) – It is a language that provides a
set of operations to support the basic data manipulation operation on
data held in the database. The DML commands are: Insert, delete,
update, select, merge, call.
 Data Control Language (DCL) – DCL is used to access the stored data. It
is mainly used for revoke and grant the user access to a database. The
DCL commands are: Grant, Revoke.
 Transaction Control Language (TCL) – TCL is a language which manages
the transactions within the database. It is used to execute the changes made
by the data manipulation language statements. The TCL commands are:
Commit, Rollback.

8. Explain different types of relationships amongst tables in a DBMS?


Ans:
 One-to-One Relationship – Such a relationship exists when each record of
one table is related to only one record of the other table.
 One-to-Many or Many-to-One Relationship – Such a relationship exists
when each record of one table can be related to one or more than one
record of the other table. This relationship is the most common relationship
found. A one-to-many relationship can also be said as a many- to-one
relationship depending upon the way we view it.
 Many-to-Many Relationship – Such a relationship exists when each
record of the first table can be related to one or more than one record of
the second table and a single record of the second table can be related to
one or more than one record of the first table. A many-to-many
relationship can be seen as a two one-to-many relationship which is
linked by a 'linking table' or 'associate table'. The linking table links two
tables by having fields which are the primary key of the other two table.

9. Explain the different between the DELETE AND TRUNCATE command


in a DBMS?
Ans:
NO DELETE TRUNCATE
1 The DELETE command is used to While this command is used to delete all
delete specified rows(one or more). the rows from a table.
2 It is a DML(Data Manipulation While it is a DDL(Data Definition
Language) command. Language) command.
3 There may be a WHERE clause in the While there may not be WHERE clause
DELETE command in order to in the TRUNCATE command.
filter the records.
4 In the DELETE command, a tuple is While in this command, the data page
locked before removing it. is locked before removing the table
data.
5 The DELETE statement removes rows TRUNCATE TABLE removes the data
one at a time and records an entry in by deallocating the data pages used to
the transaction log for each deleted store the table data and records only
row. the
page deallocations in the transaction log.
6 DELETE command is slower than While the TRUNCATE command is
TRUNCATE command. faster than the DELETE command.
7 To use Delete you need DELETE To use Truncate on a table we need at
permission on the table. least ALTER permission on the table.
8 Identity of column retains the identity Identity the column is reset to its seed
after using DELETE Statement on the value if the table contains an identity
table. column.
9 The delete can be used with Truncate cannot be used with
indexed views. indexed views.

You might also like