Data:: 3. What Is DBMS (Data Base Management System)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Data:

 Data is a collection of a distinct small unit of information. It can be used in a variety of forms
like text, numbers, media, bytes, etc. it can be stored in pieces of paper or electronic
memory, etc.

 Word 'Data' is originated from the word 'datum' that means 'single piece of information.' It
is plural of the word datum.

 In computing, Data is information that can be translated into a form for efficient movement
and processing. Data is interchangeable.

Database:
2. What is Database?

 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 it to make it easier to find
relevant information.

 Database handlers create a database in such a way that only one set of software program
provides access of data to all the users.

 The main purpose of the database is to operate a large amount of information by storing,


retrieving, and managing data.

 There are many dynamic websites on the World Wide Web nowadays which are handled
through databases. For example, a model that checks the availability of rooms in a hotel. It is
an example of a dynamic website that uses a database.

DBMS :
3. What is DBMS (Data Base Management System)

 Database management System is software which is used to store and retrieve the database.
For example, Oracle, MySQL, etc.; these are some popular DBMS tools.

 DBMS provides the interface to perform the various operations like creation, deletion,
modification, etc.

 DBMS allows the user to create their databases as per their requirement.

 DBMS accepts the request from the application and provides specific data through the
operating system.

 DBMS contains the group of programs which acts according to the user instruction.

 It provides security to the database.

Advantage of DBMS

 Controls redundancy

 It stores all the data in a single database file, so it can control data redundancy.
 Data sharing

 An authorized user can share the data among multiple users.

 Backup

 It provides Backup and recovery subsystem. This recovery system creates automatic data
from system failure and restores data if required.

 Multiple user interfaces

 It provides a different type of user interfaces like GUI, application interfaces.

Disadvantage of DBMS

 Size

It occupies large disk space and large memory to run efficiently.

 Cost

DBMS requires a high-speed data processor and larger memory to run DBMS software, so it
is costly.

 Complexity

DBMS creates additional complexity and requirements.

RDBMS:
4.What is RDBMS (Relational Database Management System)

 RDBMS stands for Relational Database Management Systems..

 All modern database management systems like SQL, MS SQL Server, IBM DB2, ORACLE, My-
SQL and Microsoft Access are based on RDBMS.

 It is called Relational Data Base Management System (RDBMS) because it is based on


relational model introduced by E.F. Codd.

 Data is represented in terms of tuples (rows) in RDBMS.

 Relational database is most commonly used database. It contains number of tables and each
table has its own primary key.

 Due to a collection of organized set of tables, data can be accessed easily in RDBMS.

 During 1970 to 1972, E.F. Codd published a paper to propose the use of relational database
model.

Compoents:

 Table

 Record/ Tuple

 Field/Column name /Attribute.


Table/Relation:

 Everything in a relational database is stored in the form of relations.

Row/Record/tuple:

A row of a table is also called a record or tuple.

5.What is SQL

 SQL stands for Structured Query Language.

 It is designed for managing data in a relational database management system (RDBMS).

 It is pronounced as S-Q-L or sometime See-Qwell.

 SQL is a database language, it is used for database creation, deletion, fetching rows, and
modifying rows, etc.

 All DBMS like MySQL, Oracle, MS Access, Sybase, Informix, PostgreSQL, and SQL Server use


SQL as standard database language.

Sql commands:

 SQL commands are instructions. It is used to communicate with the database. It is also used
to perform specific tasks, functions, and queries of data.

 SQL can perform various tasks like create a table, add data to tables, drop the table, modify
the table, set permission for users.
Data types are used to represent the nature of the data that can be stored in the database
table. For example, in a particular column of a table, if we want to store a string type of data
then we will have to declare a string data type of this column.

 Data types mainly classified into three categories for every database.

 String Data types

 Numeric Data types

 Date and time Data types

SQL JOIN

 A JOIN clause is used to combine rows from two or more tables, based on a related column
between them.

 SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate

 FROM Orders

 INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;

Different Types of SQL JOINs

Here are the different types of the JOINs in SQL:

 (INNER) JOIN: Returns records that have matching values in both tables

 LEFT (OUTER) JOIN: Returns all records from the left table, and the matched records from
the right table

 RIGHT (OUTER) JOIN: Returns all records from the right table, and the matched records from
the left table

 FULL (OUTER) JOIN: Returns all records when there is a match in either left or right table

SQL INNER JOIN Keyword

 The INNER JOIN keyword selects records that have matching values in both tables.

SQL LEFT JOIN Keyword

 The LEFT JOIN keyword returns all records from the left table (table1), and the matching
records from the right table (table2). The result is 0 records from the right side, if there is no
match.

LEFT JOIN Syntax

SELECT column_name(s)

FROM table1

LEFT JOIN table2

ON table1.column_name = table2.column_name;

SQL RIGHT JOIN Keyword


 The RIGHT JOIN keyword returns all records from the right table (table2), and the matching
records from the left table (table1). The result is 0 records from the left side, if there is no
match.

RIGHT JOIN Syntax

SELECT column_name(s)

FROM table1

RIGHT JOIN table2

ON table1.column_name = table2.column_name;

SQL FULL OUTER JOIN Keyword

 The FULL OUTER JOIN keyword returns all records when there is a match in left (table1) or
right (table2) table records.

FULL OUTER JOIN Syntax

SELECT column_name(s)

FROM table1

FULL OUTER JOIN table2

ON table1.column_name = table2.column_name WHERE condition;

You might also like