DBMS_UNIT-02(1)
DBMS_UNIT-02(1)
UNIT 2
INTRODUCTION TO SQL
Many companies use a database management system that has SQL already built in to it.
Developed and distributed by Oracle company ie MySQL
MYSQL is one of the most popular SQL database management systems currently available. The
software is an open source version, which means it can be downloaded and used for free.
Currently, many of the world's largest and most well-known brands rely on MySQL to make their
websites function properly, including Facebook, Google, Adobe, Alcatel Lucent and Zappos.
• A website that uses MySQL may include Web pages
that access information from a database,
DATA TYPES IN SQL
.
CREATE TABLE t
(
c1 VARBINARY(10),
c2 BLOB,
c3 ENUM('a','b','c') CHARACTER SET binary
);
Relational Model
Stud_id Stud_Name DOB
Table
102 Rakesh 13/4/1999
90 12/5/2001 DAVID
55 6/5/2000 PETER
PERSONID
JOINDATE
PNAME
Domain /Columns
Components of SQL
SQL commands are divided into five categories:
DATA DEFINITION LANGUAGE
The Data Definition Language (DDL) consist of SQL statements used to define the database structure or schema.
DATA MANIPULATION LANGUAGE
A Data Manipulation Language (DML) is a computer programming language used for adding (inserting),
removing (deleting), and modifying (updating) data in a database.
DATA CONTROL LANGUAGE
A Data Control Language (DCL) is a programming language used to control the access of data stored in a
database.