Professional Documents
Culture Documents
RDBMS Unit 1
RDBMS Unit 1
RDBMS Unit 1
RDBMS
RDBMS stands for Relational Database Management System. RDBMS is the basis for
SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle,
MySQL, and Microsoft Access.
A Relational database management system (RDBMS) is a database management
system (DBMS) that is based on the relational model as introduced by E. F. Codd.
What is a table?
The data in an RDBMS is stored in database objects which are called as tables. This
table is basically a collection of related data entries and it consists of numerous
columns and rows.
Remember, a table is the most common and simplest form of data storage in a
relational database. The following program is an example of a CUSTOMERS table −
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
What is a field?
Every table is broken up into smaller entities called fields. The fields in the
CUSTOMERS table consist of ID, NAME, AGE, ADDRESS and SALARY.
A field is a column in a table that is designed to maintain specific information about
every record in the table.
What is a column?
A column is a vertical entity in a table that contains all information associated with a
specific field in a table.
For example, a column in the CUSTOMERS table is ADDRESS, which represents
location description and would be as shown below −
+-----------+
| ADDRESS |
+-----------+
| Ahmedabad |
| Delhi |
| Kota |
| Mumbai |
| Bhopal |
| MP |
| Indore |
+----+------+
Ensures that all data stored are in the form of rows and columns
2. Compactness:
It is possible to store data compactly.
3. Data Retrieval:
Computer-based systems provide enhanced data retrieval techniques to retrieve data stored in files
in easy and efficient way.
4. Editing:
It is easy to edit any information stored in computers in form of files.
Specific application programs or editing software can be used for this purpose.
5. Remote Access:
In computer-based systems,it is possible to access data remotely.
so,to access data it is not necessary for a user to remain present at location where these data are
kept.
6. Sharing:
Data stored in files of computer-based systems ca be shared among multiple users at a same time.
5. Integrity Problems:
Data integrity means that the data contained in the database in both correct and consistent.for this
purpose the data stored in database must satisfy correct and constraints.
6. Atomicity Problems:
Any operation on database must be atomic.
this means, it must happen in its entirely or not at all.
8. Security Problems:
Database should be accessible to users in limited way.
Each user should be allowed to access data concerning his requirements only.
DBMS
Database Management System (DBMS) is a software for storing and
retrieving users’ data while considering appropriate security measures. It
consists of a group of programs which manipulate the database. The DBMS
accepts the request for data from an application and instructs the operating
system to provide the specific data. In large systems, a DBMS helps users
and other third-party software to store and retrieve data.
DBMS allows users to create their own databases as per their requirement.
The term “DBMS” includes the user of the database and other application
programs. It provides an interface between the data and the software
application.
Advantages of DBMS
o Controls database redundancy: It can control data redundancy because it stores
all the data in one single database file and that recorded data is placed in the
database.
o Data sharing: In DBMS, the authorized users of an organization can share the
data among multiple users.
o Easily Maintenance: It can be easily maintainable due to the centralized nature
of the database system.
o Reduce time: It reduces development time and maintenance need.
o Backup: It provides backup and recovery subsystems which create automatic
backup of data from hardware and software failures and restores the data if
required.
o multiple user interface: It provides different types of user interfaces like
graphical user interfaces, application program interfaces
Disadvantages of DBMS
o Cost of Hardware and Software: It requires a high speed of data processor and
large memory size to run DBMS software.
o Size: It occupies a large space of disks and large memory to run them efficiently.
o Complexity: Database system creates additional complexity and requirements.
o Higher impact of failure: Failure is highly impacted the database because in
most of the organization, all the data stored in a single database and if the
database is damaged due to electric failure or database corruption then the data
may be lost forever.
3-Tier Architecture
In this 3-tier architecture, middleware is needed because if client
machine sends the request to server machine then firstly this request
is received by middle layer, and finally this request is obtained to
server. So, firstly response of server is received by middle layer then it
is obtained to client machine. All data logic and business logic are
stored on the middleware. Due to use of middleware, to improve its
flexibility and deliver excellent performance.
Data
In simple words, data can be facts related to any object in consideration. For
example, your name, age, height, weight, etc. are some data related to you. A
picture, image, file, pdf, etc. can also be considered data.
Database
A database is a systematic collection of data. They support electronic storage
and manipulation of data. Databases make data management easy.
Operation of DBMS:-
Select Statement
To fetch data from the database, the SELECT statement is used
Insert
The INSERT command is used to insert data in the database.
Update
The database needs to be updated for new records. In that case, use the Update
command.
Delete
Delete records from the database by selecting the rows you need to delete.
Hierarchical Model
Network Model
Relation Model
Hierarchical Model
In this model, a child node will only have a single parent node.
Network Model
This was the most widely used database model, before Relational
Model was introduced.
Relational Model
This model was introduced by E.F Codd in 1970, and since then it has
been the most widely used database model, infact, we can say the only
database model used around the world.
The basic structure of data in the relational model is tables. All the
information related to a particular type is stored in rows of that table.
Hardware
This consists of a set of physical electronic devices such as I/O devices, storage
devices and many more. It also provides an interface between computers and real-
world systems.
Software
This is the set of programs that are used to control and manage the overall Database. It
also includes the DBMS software itself. The Operating System, the network software
being used to share the data among the users, the application programs used to access
data in the DBMS.
Data
Database Management System collects, stores, processes, and accesses data. The
Database holds both the actual or operational data and the metadata.
Procedure
These are the rules and instructions on how to use the Database in order to design and
run the DBMS, to guide the users that operate and manage it.
It is used to access the data to and from the database. In order to enter new data,
updating, or retrieving requires data from databases. You can write a set of appropriate
commands in the database access language, submit these to the DBMS, which then
processes the data and generates it, displays a set of results into a user-readable form.
Logical Data
Model
At this Data Modeling level, no primary or secondary key is defined. At this
Data modeling level, you need to verify and adjust the connector details that
were set earlier for relationships.
Characteristics of a Logical data model
Describes data needs for a single project but could integrate with other
logical data models based on the scope of the project.
Designed and developed independently from the DBMS.
Data attributes will have datatypes with exact precisions and length.
Normalization processes to the model is applied typically till 3NF.
Physical Data
Model
Characteristics of a physical data model:
The physical data model describes data need for a single project or
application though it maybe integrated with other physical data models
based on project scope.
Data Model contains relationships between tables that which addresses
cardinality and nullability of the relationships.
Developed for a specific version of a DBMS, location, data storage or
technology to be used in the project.
Columns should have exact datatypes, lengths assigned and default
values.
Primary and Foreign keys, views, indexes, access profiles, and
authorizations, etc. are defined.