0% found this document useful (0 votes)
4 views

Structure query Language class 12

SQL, or Structured Query Language, is an international standard for managing and accessing data in databases, developed by IBM in the 1970s. It consists of three sub-languages: DDL for defining data structures, DML for manipulating data, and DCL for controlling access to data. While SQL offers advantages like ease of use, scalability, and security, it also has disadvantages such as complexity, performance bottlenecks, and limitations in handling unstructured data.

Uploaded by

Elsing tamang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Structure query Language class 12

SQL, or Structured Query Language, is an international standard for managing and accessing data in databases, developed by IBM in the 1970s. It consists of three sub-languages: DDL for defining data structures, DML for manipulating data, and DCL for controlling access to data. While SQL offers advantages like ease of use, scalability, and security, it also has disadvantages such as complexity, performance bottlenecks, and limitations in handling unstructured data.

Uploaded by

Elsing tamang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Structure query Language (SQL)

SQL stands for Structured Query Language. It is an international standard


data base query language for accessing and managing data in the database.
SQL was introduced and developed by IBM in early 1970’s. It was able to
control relational database. SQL is not a complete programming language. It
is only used for communicating with database. SQL has statement for data
definition (DDL), data manipulation (DML) and data control (DCL). A query is
a request to a DBMS for the retrieval, modification, insertion and deletion of
the data from database.

Advantages:

1. Ease of Use: SQL is designed to be user-friendly and declarative, meaning you specify
what you want (queries) rather than how to get it (procedural languages).
2. Scalability: SQL databases can handle large amounts of data and scale effectively as the
size of the database grows.
3. Standardization: SQL is an ANSI/ISO standard, which ensures that SQL queries will
work on any SQL-compliant database system.
4. Portability: SQL databases are portable across different platforms and systems, allowing
easy migration from one database system to another.
5. Integration: SQL databases can easily integrate with other databases and applications,
making it versatile for various business needs.
6. Security: SQL databases offer robust security features to control access to the data at
various levels (user, group, role-based access controls).
7. Transaction Control: SQL databases provide ACID (Atomicity, Consistency, Isolation,
Durability) properties to ensure reliable transactions.

Disadvantages:

1. Complexity: Writing complex SQL queries can be challenging, especially for beginners,
and optimizing them for performance can require deep understanding.
2. Performance: While SQL databases are generally efficient, poorly designed databases or
queries can lead to performance bottlenecks.
3. Scaling Limitations: Horizontal scaling (scaling out) can be more challenging with SQL
databases compared to NoSQL databases designed for distributed architectures.
4. Schema Rigidity: SQL databases typically require a predefined schema, which can be
inflexible when dealing with unstructured or rapidly changing data.
5. Cost: Some SQL database systems can be expensive to license and maintain, especially
for large-scale enterprise deployments.
6. Concurrency: Handling concurrent users and transactions can be complex, especially in
high-traffic applications, though this depends on the database system and its concurrency
control mechanisms.
7. Not Ideal for Big Data: While SQL databases can handle large datasets, they may not be
the best choice for storing and processing unstructured "big data" due to schema
requirements and scalability issues.
SQL is made of three sub languages: DDL, DML and DCL

1) DDL (Data Definition Language): DDL is used by the database


designer and programmers to specify the content and the structure of
table. It is used to define the physical characteristics of record. It
includes commands that manipulate the structure of object such as
tables: For eg, to create table

DDL Statements

1. CREATE statement : CREATE statement is used to create tables,


views, sequences, indices etc.

Syntax:

CREATE table table_Name

Field1 data_type,

Field2 data_type,

………………….

Fieldn data_type,

);

Example:

CREATE TABLE studentinfo

Sid int,

Name CHAR(20),

CLASS VARCHAR(12),

);
2. ALTER statement: ALTER statement is used to add, delete or
modify culumns in an existing table.

3. DROP statement : DROP statement allows us to remove an


existing table, view or other database object from the database.

Syntax:

CREATE TABLE table_name (field_name1 data_type1 field_name2


data_type2 ………);

CREATE TABLE Student (SN Number Fname text);

2) DML (Data Manipulation Language): DML is related with


manipulation of records such as retrieval, sorting, display and deletion
of records or data. It helps user to use query and display report of the
table. It provide technique for processing the database. It includes
commands like insert, delete, select, and update to manipulate the
information stored in the database.

Syntax:

INSERT INTO table_name VALUES (list of values);

INSERT INTO student VALUES (1 RAM);

3) DCL (Data Control Language): All provides additional feature for


security of table and database. It includes commands for controlling
data and access to the database. Some of the example of this
command are grant, commit, etc

You might also like