Purpose of Database System: What Is DBMS?
Purpose of Database System: What Is DBMS?
Based on this we can define DBMS like this: DBMS is a collection of inter-
related data and set of programs to store & access those data in an easy and
effective manner.
Database systems are basically developed for large amount of data. When
dealing with huge amount of data, there are two things that require
optimization: Storage of data and retrieval of data.
For example: Lets say Steve transfers 100$ to Negan’s account. This
transaction consists multiple operations such as debit 100$ from Steve’s
account, credit 100$ to Negan’s account. Like any other device, a computer
system can fail lets say it fails after first operation then in that case Steve’s
account would have been debited by 100$ but the amount was not credited
to Negan’s account, in such case the rollback of operation should occur to
maintain the atomicity of transaction. It is difficult to achieve atomicity in
file processing systems.
Disadvantages of DBMS
The disadvantages of the database approach are summarized as follows:
1. Complexity : The provision of the functionality that is expected of a good DBMS makes
the DBMS an extremely complex piece of software. Database designers, developers,
database administrators and end-users must understand this functionality to take full
advantage of it. Failure to understand the system can lead to bad design decisions, which
can have serious consequences for an organization.
2. Size : The complexity and breadth of functionality makes the DBMS an extremely large
piece of software, occupying many megabytes of disk space and requiring substantial
amounts of memory to run efficiently.
3. Performance: Typically, a File Based system is written for a specific application, such
as invoicing. As result, performance is generally very good. However, the DBMS is written
to be more general, to cater for many applications rather than just one. The effect is that
some applications may not run as fast as they used to.
4. Higher impact of a failure: The centralization of resources increases the vulnerability
of the system. Since all users and applications rely on the ~vailabi1ity of the DBMS, the
failure of any component can bring operations to a halt.
5. Cost of DBMS: The cost of DBMS varies significantly, depending on the environment
and functionality provided. There is also the recurrent annual maintenance cost.
File System vs DBMS – Difference between File System and
DBMS
User locates the physical address of the In Database Management System, user is
files to access data in File Management unaware of physical address where data
System. is stored.
Logical level: This is the middle level of 3-level data abstraction architecture. It
describes what data is stored in database.
View level: Highest level of data abstraction. This level describes the user
interaction with database system.
DBMS Schema
Definition of schema: Design of a database is called the schema. Schema is of
three types: Physical schema, logical schema and view schema.
For example: In the following diagram, we have a schema that shows the
relationship between three tables: Course, Student and Section. The diagram
only shows the design of the database, it doesn’t show the data present in those
tables. Schema is only a structural view(design) of a database as shown in the
diagram below.
DBMS Instance
Definition of instance: The data stored in database at a particular moment of
time is called instance of database. Database schema defines the variable
declarations in tables that belong to a particular database; the value of these
variables at a moment of time is called the instance of that database.
For example, lets say we have a single table student in the database, today the
table has 100 records, so today the instance of the database has 100 records.
Lets say we are going to add another 100 records in this table by tomorrow so
the instance of database tomorrow will have 200 records in table. In short, at a
particular moment the data stored in database is called the instance, that
changes over time when we add or delete data from the database.
The strong entity has a primary key. Weak entities are dependent on strong entity. Its existence is
not dependent on any other entity.
Weak Entity
The weak entity in DBMS do not have a primary key and are dependent on the parent entity. It
mainly depends on other entities.
Codd Rules
Codd rules were proposed by E.F. Codd which should be satisfied by relational model.
1. Foundation Rule: For any system that is advertised as, or claimed to be, a
relational data base management system, that system must be able to manage
data bases entirely through its relational capabilities.
2. Information Rule: Data stored in Relational model must be a value of some cell of
a table.
3. Guaranteed Access Rule: Every data element must be accessible by table name,
its primary key and name of attribute whose value is to be determined.
4. Systematic Treatment of NULL values: NULL value in database must only
correspond to missing, unknown or not applicable values.
5. Active Online Catalog: Structure of database must be stored in an online catalog
which can be queried by authorized users.
6. Comprehensive Data Sub-language Rule: A database should be accessible by a
language supported for definition, manipulation and transaction management
operation.
7. View Updating Rule: Different views created for various purposes should be
automatically updatable by the system.
8. High level insert, update and delete rule: Relational Model should support
insert, delete, update etc. operations at each level of relations. Also, set operations
like Union, Intersection and minus should be supported.
9. Physical data independence: Any modification in the physical location of a table
should not enforce modification at application level.
10. Logical data independence: Any modification in logical or conceptual schema of
a table should not enforce modification at application level. For example, merging
of two tables into one should not affect application accessing it which is difficult to
achieve.
11. Integrity Independence: Integrity constraints modified at database level should
not enforce modification at application level.
12. Distribution Independence: Distribution of data over various locations should not
be visible to end-users.
13. Non-Subversion Rule: Low level access to data should not be able to bypass
integrity rule to change data.