0% found this document useful (0 votes)
41 views3 pages

21bcs2008 Prashant Kumar Singh Assignment 1

The document discusses data independence in databases and its benefits. It provides examples of logical data independence and physical data independence. Logical data independence allows changes to the database structure without affecting applications. Physical data independence separates the conceptual and internal levels, allowing physical structures to change independently. The document also lists advantages of database management systems (DBMS) over traditional file systems, including data consistency, sharing, integrity and security. It provides SQL examples of UNION and INTERSECT operators and the syntax for renaming and updating tables in a DBMS.
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)
41 views3 pages

21bcs2008 Prashant Kumar Singh Assignment 1

The document discusses data independence in databases and its benefits. It provides examples of logical data independence and physical data independence. Logical data independence allows changes to the database structure without affecting applications. Physical data independence separates the conceptual and internal levels, allowing physical structures to change independently. The document also lists advantages of database management systems (DBMS) over traditional file systems, including data consistency, sharing, integrity and security. It provides SQL examples of UNION and INTERSECT operators and the syntax for renaming and updating tables in a DBMS.
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/ 3

ASSIGNMENT:-1

Student Name:Prashant kumar singh UID:21BCS2008


Branch: BE-CSE Section/Group:ON-21BCS701-A
Semester: 3rd Date of Performance:09.sept.2022
Subject Name:DBMS Subject Code:21CSH214
Question no. 1:- Recognize how data Independence is helpful in database? Illustrate the role of
logical data independence and physical data independence with examples.

Data Independence is defined as a property of DBMS that helps you to change the Database schema
at one level of a database system without requiring to change the schema at the next higher level. Data
independence helps to keep data separated from all programs that make use of it.
Physical data independence helps to separate conceptual levels from the internal/physical levels. It
provide a logical description of the database without the need to specify physical structures.
Compared to Logical Independence, it is easy to achieve physical data independence.

Logical Data Independence is defined as the ability to make changes in the structure of the middle
level of the Database Management System (DBMS) without affecting the highest-level schema or
application programs. Hence, modification in the logical level should not result in any changes in
the view levels or application programs.

Role of data independence:

 Helps you to improve the quality of the data


 Database system maintenance becomes affordable
 Enforcement of standards and improvement in database security
 You don’t need to alter data structure in application programs
 Permit developers to focus on the general structure of the Database rather than worrying about
the internal implementation
 It allows you to improve state which is undamaged or undivided
 Database incongruity is vastly reduced.
 Easily make modifications in the physical level is needed to improve the performance of the
system.

Question no2:- Write at least Five advantages of DBMS over traditional file based systems.

advantages of DBMS over File system:

 Data redundancy and inconsistency: Redundancy is the concept of repetition of data i.e. each
data may have more than a single copy. The file system cannot control the redundancy of data
as each user defines and maintains the needed files for a specific application to run. There may
be a possibility that two users are maintaining the data of the same file for different
applications. Hence changes made by one user do not reflect in files used by second users,
which leads to inconsistency of data. Whereas DBMS controls redundancy by maintaining a
single repository of data that is defined once and is accessed by many users. As there is no or
less redundancy, data remains consistent.
 Data sharing: The file system does not allow sharing of data or sharing is too complex.
Whereas in DBMS, data can be shared easily due to a centralized system.
SUBJECT NAME-Fundamentals of Computer Programming SUBJECT CODE-21CSH101
 Data concurrency: Concurrent access to data means more than one user is accessing the same
data at the same time. Anomalies occur when changes made by one user get lost because of
changes made by another user. The file system does not provide any procedure to stop
anomalies. Whereas DBMS provides a locking system to stop anomalies to occur.
 Data searching: For every search operation performed on the file system, a different
application program has to be written. While DBMS provides inbuilt searching operations. The
user only has to write a small query to retrieve data from the database.
 Data integrity: There may be cases when some constraints need to be applied to the data before
inserting it into the database. The file system does not provide any procedure to check these
constraints automatically. Whereas DBMS maintains data integrity by enforcing user-defined
constraints on data by itself.
 System crashing: In some cases, systems might have crashed due to various reasons. It is a
bane in the case of file systems because once the system crashes, there will be no recovery of
the data that’s been lost. A DBMS will have the recovery manager which retrieves the data
making it another advantage over file systems.
 Data security: A file system provides a password mechanism to protect the database but how
long can the password be protected? No one can guarantee that. This doesn’t happen in the case
of DBMS. DBMS has specialized features that help provide shielding to its data.
 Backup: It creates a backup subsystem to restore the data if required.
 Interfaces: It provides different multiple user interfaces like graphical user interface and
application program interface.
 Easy Maintenance: It is easily maintainable due to its centralized nature.

Question no3:- Show the use of UNION and INTERSECT operator using relations.

UNION is used to combine the results of two or more select statements. However it will eliminate
duplicate rows from its resultset. In case of union, number of columns and datatype must be same in
both the tables, on which UNION operation is being applied.

Intersect operation is used to combine two select statements, but it only retuns the records which are
common from both select statements. In case of Intersect the number of columns and datatype must
be same.

SUBJECT NAME-Fundamentals of Computer Programming SUBJECT CODE-21CSH101


Question no4:- Write syntax to rename and update table? With Illustration.

Syntax to rename the table:


RENAME old_table _name To new_table_name ;

Syntax to update the table:


Update table_name set col1=val1,col2=val2…. [where condition];

SUBJECT NAME-Fundamentals of Computer Programming SUBJECT CODE-21CSH101

You might also like