Lab 1
Lab 1
Lab 1
Week No. 1:
Title: Introduction to Database Management Systems
Purpose:
To aim of this study is to familiarize with the DBMS, RDBMS, ORDBMS along with their
advantages and disadvantages.
Theory:
DBMS (Database Management System)
A DBMS is software that allows creation, definition and manipulation of database, allowing users
to store, process and analyze data easily. DBMS provides us with an interface or a tool, to perform
various operations like creating database, storing data in it, updating data, creating tables in the
database and a lot more.
DBMS also provides protection and security to the databases. It also maintains data consistency in
case of multiple users.
Here are some examples of popular DBMS used these days:
• MySql
• Oracle
• SQL Server
• IBM DB2
• PostgreSQL
• Amazon SimpleDB (cloud based) etc.
3
Laboratory Manual: Database System |Date: ____________
Advantages of DBMS
o Segregation of application program.
o Minimal data duplicity or data redundancy.
o Easy retrieval of data using the Query Language.
o Reduced development time and maintenance need.
o With Cloud Datacenters, we now have Database Management Systems capable of storing
almost infinite data.
o Seamless integration into the application programming languages which makes it very
easier to add a database to almost any application or website.
Disadvantages of DBMS
o It's Complexity
o Except MySQL, which is open source, licensed DBMSs are generally costly.
o They are large in size.
4
Laboratory Manual: Database System |Date: ____________
Examples:
• SQL server,
• Oracle
• MySQL
• MariaDB
• SQLite
Table
In Relational database model, a table is a collection of data elements organized in terms of rows
and columns. A table is also considered as a convenient representation of relations. But a table can
have duplicate row of data while a true relation cannot have duplicate data. Table is the simplest
form of data storage.
Below is an example of an Employee table
Tuple
A single entry in a table is called a Tuple or Record or Row. A tuple in a table represents a set of
related data. For example, the above Employee table has 4 tuples/records/rows.
Following is an example of single record or tuple.
Attribute
A table consists of several records (row), each record can be broken down into several smaller
parts of data known as Attributes. The above Employee table consists of four attributes, ID, Name,
Age and Salary.
5
Laboratory Manual: Database System |Date: ____________
Advantages of RDBMS
o It is easy to use
o It is secured in nature
o The data manipulation can be done
o It limits redundancy and replication of the data
o It offers better data integrity
o It provides better data integrity
o It provides better physical data independence
o If offers logical database independence
o It provides better backup and recovery procedures
o It provides multiple interfaces
o Multiple users can access the database which is not possible in DBMS
Disadvantages of RDBMS
o Software is expensive
o Complex software refers to expensive hardware and hence increases overall cost to avail
the RDBMS service.
o It requires skilled human resources to implement
o Certain applications are slow in processing
o It is difficult to recover the lost data
6
Laboratory Manual: Database System |Date: ____________
Advantages of ORDBMS
o Reusable and Sharable – able to reuse the hard-coded components. Through database
servers those components can be shared among available resources.
o Ability of applying Objects with existing RDBMS models as it is – That is, RDBMS can
be extended with Object concepts without changing the underlying models. This leads the
organizations to switch over to ORDBMS concepts easily without performing bigger
migration or major change.
o It allows users and programmers to start using object-oriented systems in parallel.
o Object Relational Database Management Systems ensures large storage capacity.
o Supports rich data types by adding a new object-oriented layer.
o Scalability
o Relationships are represented explicitly, often supporting both navigational and
associative access to information.
o Improved concurrency - concurrent users can safely query the same data.
o Support for Composite data types - data is bundled with its metadata.
o Improved integrity - ability to reject bad data before it is stored in an ORDBMS.
o Database extensibility - easy addition of data types and operations.
o Uniform treatment of data items - the SQL interface can perform complex queries based
on any of these data items, e.g., metadata as well as data; hence there is less need for
custom programming by users.
o Custom data access methods - e.g., R-tree indexes.
o Point-in-time recovery of data is possible.
o Built-in complex SQL functions can be provided for data operations - e.g., aggregating,
slicing, subsetting, reprojecting, etc.
Disadvantages of ORDBMS
o Complexity
o Increased cost
o Unclear if the ORDBMS will actually combine relationships and encapsulated objects to
correctly and completely mirror the ‘real world’.
7
Laboratory Manual: Database System |Date: ____________
Lab Task:
You have just started a new company. It is time to hire some employees. You will need to create
a table that will contain the following information about your new employees: firstname,
lastname, title, age, and salary.
Find Entity
Find Attributes
Conclusion:
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________