Professional Documents
Culture Documents
Systems
What is a File system?
• A file system is a technique of arranging the files
in a storage medium like a hard disk, pen drive,
DVD, etc. It helps you to organizes the data and
allows easy retrieval of files when they are
required.
• A file system enables you to handle the way of
reading and writing data to the storage medium. It
is directly installed into the computer with the
Operating systems such as Windows and Linux.
What is DBMS?
Database Management System (DBMS) is a
software for storing and retrieving user's data while
considering appropriate security measures. It
consists of a group of programs that manipulate the
database.
The DBMS accepts the request for data from an
application and instructs the DBMS engine to
provide the specific data.
In large systems, a DBMS helps users and other
third-party software to store and retrieve data.
KEY DIFFERENCES:
Storing and retrieving of data can't be done DBMS is efficient to use as there are a
efficiently in a file system. wide variety of methods to store and
retrieve data.
It does not offer data recovery processes. There is a backup recovery for data in
DBMS.
The file system doesn't have a crash DBMS provides a crash recovery
recovery mechanism. mechanism
Protecting a file system is very difficult. DBMS offers good protection mechanism.
• Complexity
• Size
• Cost
–Software
–Hardware
–Conversion
• Performance
• Vulnerability
DDL
• DDL is short name of Data Definition Language, which
deals with database schemas and descriptions, of how the data
should reside in the database.
CREATE - to create a database and its objects like (table,
index, views, store procedure, function, and triggers)
ALTER - alters the structure of the existing database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all
spaces allocated for the records are removed
DML
• DML is short name of Data Manipulation Language which
deals with data manipulation and includes most common SQL
statements such SELECT, INSERT, UPDATE, DELETE, etc.,
and it is used to store, modify, retrieve, delete and update data
in a database.
• SELECT - retrieve data from a database
• INSERT - insert data into a table
• UPDATE - updates existing data within a table
• DELETE - Delete all records from a database table
Types of Data Models
Syntax
The basic syntax of the SELECT statement is as follows −
SELECT column1, column2, columnN FROM table_name;
Here, column1, column2... are the fields of a table whose values you
want to fetch. If you want to fetch all the fields available in the field, then
you can use the following syntax.
SELECT * FROM table_name;
SQL - WHERE Clause
• The SQL WHERE clause is used to specify a condition
while fetching the data from a single table or by
joining with multiple tables. If the given condition is
satisfied, then only it returns a specific value from
the table. You should use the WHERE clause to filter
the records and fetching only the necessary records.
• The WHERE clause is not only used in the SELECT
statement, but it is also used in the UPDATE, DELETE
statement, etc.,
Syntax
The basic syntax of the SELECT statement with the WHERE clause is
as shown below.
The following code block has the syntax of the SELECT statement
including the HAVING clause −
•https://www.w3schools.com/sql/sql_having.as
p
•https://www.guru99.com/group-by.html
•https://www.studytonight.com/dbms/having-cl
ause.php
Difference between Where and
Having Clause in SQL
SR.NO
WHERE Clause HAVING Clause
.
WHERE Clause is used to filter the records
HAVING Clause is used to filter record from the groups
1. from the table based on the specified
based on the specified condition.
condition.
WHERE Clause can be used without GROUP BY HAVING Clause cannot be used without GROUP BY
2.
Clause Clause
3. WHERE Clause implements in row operations HAVING Clause implements in column operation
WHERE Clause can be used with SELECT, HAVING Clause can only be used with SELECT
5.
UPDATE, DELETE statement. statement.
WHERE Clause is used with single row function HAVING Clause is used with multiple row function like
7.
like UPPER, LOWER etc. SUM, COUNT etc.