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

MySQL Part 3

MySQL is an open source RDBMS created by MySQL AB, now a subsidiary of Sun Microsystems, and operates on a client/server architecture. It utilizes SQL for database operations, including DDL, DML, and TCL commands, and supports various data types. Key features of MySQL include its reliability, high performance, scalability, and ease of learning.

Uploaded by

mohitbhagtani05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

MySQL Part 3

MySQL is an open source RDBMS created by MySQL AB, now a subsidiary of Sun Microsystems, and operates on a client/server architecture. It utilizes SQL for database operations, including DDL, DML, and TCL commands, and supports various data types. Key features of MySQL include its reliability, high performance, scalability, and ease of learning.

Uploaded by

mohitbhagtani05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

MySQL Part - 3

Examples of common RDBMS

Open Source
MySQL
It is a freely available open source RDBMS.
It can be downloaded from www.mysql.org
MySQL is created and supported by MySQL AB,
a company based in Sweden, now a subsidiary of
Sun Microsystems.
The chief inventor was Michael Widenius.
MySQL Database System
It is a combination of MySQL Server instance and
MySQL Database.
It operates using the client/ server architecture in
which the server runs on the machine containing the
database, and any number of clients can connect to
the server through a network.
The client connect to the server and issue queries
using the SQL (Structured Query Language).
The server listens to the client requests, accesses the
database contents and returns the result.
Key Features of MySQL
Most Popular
open source
Not Case- database Reliable
sensitive

MySQL High
Easy to
Performance
learn

Platform
Independent Scalable
SQL
SQL is the set of commands that is used to
work on all RDBMS.

SQL

DDL DML TCL


DDL (Data Definition Language)
Commands which are used to work on the
structure of the tables.

Create database / Create table


Alter table
Drop database/ Drop table
DML (Data Manipulation Language)
Commands used to work on the data stored
in the tables and maintain it.

Insert
Update
Delete
Select
TCL (Transaction Control Language)
Commands that allow managing and
controlling a transaction.

Commit
Rollback
Savepoint
Data Types
They are the means to identify the type of data
and associated operations for handling it.

Data
Types

String Numeric Date and Time

Int/
Char Varchar Float Double Decimal Date Time
Integer
MySQL Commands
Creating a Database
SYNTAX
CREATE DATABASE databasename;

EXAMPLE
mysql> create database school;
To see the available databases
SYNTAX
show databases;
Using a Database
SYNTAX
use databasename;

EXAMPLE
mysql> use school;
Creating tables in MySQL
SYNTAX
CREATE TABLE tablename(
attributename1 datatype constraint,
attributename2 datatype constraint,
:
attributenameN datatype constraint);

Example:
create table student
(rollno integer,
name varchar(20),
class varchar(10),
marks decimal);
Example 1
Write SQL command to Create table transporter
create a table ‘Transporter’ ( OrderId integer,
with the following Drivername varchar(50),
structure:
Itemtransported varchar(50),
Traveldate date,
Destinationcity varchar(50));
Example 2
Write an SQL command to Create table products
create the table ( Product_id varchar(6),
“Products” with the Product_name varchar(25),
following structure
Company varchar(30),
Field Type Packing varchar(20),
Product_id Varchar(6)
Product_Name Varchar(25)
CP Integer,
Company Varchar(30) SP Integer,
Packing Varchar(20)
CP Integer Quantity Integer );
SP Integer
Quantity Integer

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy