SlideShare a Scribd company logo
1 of 12
Difference Between
SQL / MYSQL / ORACLE
www.assignmenthelp.net
www.myassignmenthelp.net
SQL Database
SQL (Structured Query Language) is a database computer language designed for managing data
in relational database management systems (RDBMS).
MYSQL Database
MySQL is a relational database management system (RDBMS) that runs as a server providing
multi-user access to a number of databases.
ORACLE Database
Oracle is the name of the database management system that comes from Oracle Corporation.
PRIMARY KEY
A Primary Key is a column or combination of columns whose values uniquely identify a
row or record in the table.
Examples for specifying a Primary Key,
www.assignmenthelp.net
SQL MYSQL ORACLE
Primary
Key
CREATE table table_name
(
id integer PRIMARY KEY,
FirstName varchar(30),
LastName varchar(30) );
CREATE table table_name
(
id integer, FirstName
varchar(30), LastName
varchar(30), PRIMARY KEY
(id) );
CREATE table table_name
(
id integer PRIMARY KEY,
FirstName varchar(30),
LastName varchar(30) );
Specifying
a primary
key by
Altering a
table
ALTER TABLE table_name
ADD PRIMARY KEY (id);
ALTER TABLE table_name
ADD PRIMARY KEY (id);
ALTER TABLE table_name
ADD PRIMARY KEY (id);
DROP
TABLE
DROP TABLE table_name; DROP TABLE table_name; DROP TABLE table_name;
Sample Output
www.assignmenthelp.net
Sample output for
CREATE Table
Sample output for
DROP Table
FOREIGN KEY
A FOREIGN KEY in one table points to a PRIMARY KEY in another table.
Examples for specifying a Foreign key when creating a table (using CREATE TABLE) or
by changing the existing table structure (using ALTER TABLE).
Table1: Student
Table2: Book
Column Name Datatype characteristic
BookId integer Primary Key
BookName varchar
Student_Sid integer Foreign Key
Amount integer
Column Name Datatype characteristic
Sid integer Primary Key
LastName varchar
FirstName varchar
Foreign Key
SQL MYSQL ORACLE
Foreign Key
Create table Book (
BookId integer PRIMARY KEY,
BookName varchar(30),
Amount integer,
Student_Sid interger
references Student(Sid));
Create table Book (
BookId integer,
BookName varchar(30),
Student_Sid integer,
Amount integer,
Primary Key (BookId),
Foreign Key (Student_Sid)
references Student(Sid));
Create table Book (
BookId integer PRIMARY KEY,
BookName varchar(30),
Amount integer,
Student_Sid integer
references Student(Sid));
Specifying a
Foreign Key
by Altering a
table
ALTER table Book ADD
FOREIGN KEY (Student_Sid)
references Student(Sid);
ALTER table Book ADD
FOREIGN KEY (Student_Sid)
references Student(Sid);
ALTER table Book ADD
FOREIGN KEY (Student_Sid)
references Student(Sid);
DROP Table DropTABLE Book; Drop TABLE Book; drop table Book cascade
constraints;
Note: if foreign key are
available in that table
Sample Output
Sample Output for
CREATE Table
Sample Output for
Drop Table
CREATE TABLE
SQL MYSQL ORACLE
The CREATE TABLE
statement is used to create
a table in a database.
CREATE TABLE table_name (
column_name1 data_type,
column_name2 data_type, .... );
CREATE TABLE table_name (
column_name1 data_type,
column_name2 data_type, .... );
CREATE TABLE table_name (
column_name1 data_type,
column_name2 data_type, .... );
Creates an index on a
table. Duplicate values are
allowed.
CREATE INDEX index_name
ON table_name (column_name);
CREATE INDEX index_name
ON table_name (column_name);
CREATE INDEX index_name
ON table_name (column_name);
Creates a unique index on
a table. Duplicate values
are not allowed.
CREATE UNIQUE INDEX
index_name
ON table_name (column_name);
CREATE UNIQUE INDEX
index_name
ON table_name (column_name);
CREATE UNIQUE INDEX
index_name
ON table_name (column_name);
Create View syntax
CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition;
CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition;
CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition;
DROP TABLE
SQL MYSQL ORACLE
It is used to delete a
Table.
DROP TABLE Student; DROP TABLE Student; DROP TABLE Student;
It is used to delete a
database.
DROP DATABASE
database_name
DROP DATABASE
database_name
DROP DATABASE
database_name
Delete the data inside
the table only
TRUNCATE TABLE
table_name
TRUNCATE TABLE table_name TRUNCATE TABLE table_name
The DROP INDEX
statement is used to
delete an index in a
table.
DROP INDEX
table_name.index_name
ALTER TABLE table_name
DROP INDEX index_name
DROP INDEX index_name
ALTER TABLE
SQL MYSQL ORACLE
Rename the table
name
ALTER TABLE table_name
RENAME TO new_table_name;
ALTER TABLE table_name
RENAME TO
new_table_name;
ALTER TABLE table_name
RENAME TO
new_table_name;
Add a column in a
table
ALTER TABLE table_name
ADD column_name datatype;
ALTER TABLE table_name
ADD column_name column-
definition;
ALTER TABLE table_name
ADD column_name column-
definition;
Delete a column in a
table
ALTER TABLE table_name
DROP COLUMN column_name
ALTER TABLE table_name
DROP COLUMN
column_name
ALTER TABLE table_name
DROP COLUMN
column_name
Change the data type
of a column in a table
ALTER TABLE table_name
ALTER COLUMN column_name
datatype
ALTER TABLE table_name
ALTER COLUMN
column_name datatype
ALTER TABLE table_name
ALTER COLUMN
column_name datatype
References
http://en.wikipedia.org/wiki/Sql
Dr. Chen’s homepage: http://bit.csc.lsu.edu/~chen/chen.html
Database Systems: A First Course, J.D. Ullman & J. Widom
http://en.wikipedia.org/wiki/Oracle
http://en.wikipedia.org/wiki/Mysql
http://www.w3schools.com/sql/default.asp
www.myassignmenthelp.net
Thank You

More Related Content

What's hot (20)

MySQL
MySQLMySQL
MySQL
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
SQL
SQLSQL
SQL
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
My Sql Work Bench
My Sql Work BenchMy Sql Work Bench
My Sql Work Bench
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)
 
Working with Databases and MySQL
Working with Databases and MySQLWorking with Databases and MySQL
Working with Databases and MySQL
 
RDBMS concepts
RDBMS conceptsRDBMS concepts
RDBMS concepts
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | Edureka
 
SQL
SQLSQL
SQL
 
SQL Views
SQL ViewsSQL Views
SQL Views
 

Viewers also liked

Embedding Library Services in Blackboard Learn
Embedding Library Services in Blackboard LearnEmbedding Library Services in Blackboard Learn
Embedding Library Services in Blackboard LearnBlackboardEMEA
 
Getting Campus-Wide Adoption - Happy Faculty - via Blackboard Collaborate
Getting Campus-Wide Adoption - Happy Faculty - via Blackboard CollaborateGetting Campus-Wide Adoption - Happy Faculty - via Blackboard Collaborate
Getting Campus-Wide Adoption - Happy Faculty - via Blackboard CollaborateMike Shaffer
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial EditionMario Beck
 
Incorporating ResearchReady into Blackboard Learn Using LTI Integration
Incorporating ResearchReady into Blackboard Learn Using LTI IntegrationIncorporating ResearchReady into Blackboard Learn Using LTI Integration
Incorporating ResearchReady into Blackboard Learn Using LTI IntegrationImagine Easy Solutions
 
Blackboard
BlackboardBlackboard
Blackboardzeniaaa
 
Comparing 30 MongoDB operations with Oracle SQL statements
Comparing 30 MongoDB operations with Oracle SQL statementsComparing 30 MongoDB operations with Oracle SQL statements
Comparing 30 MongoDB operations with Oracle SQL statementsLucas Jellema
 
Integrating Blackboard Collaborate 12 and Moodle
Integrating Blackboard Collaborate 12 and MoodleIntegrating Blackboard Collaborate 12 and Moodle
Integrating Blackboard Collaborate 12 and MoodleNetSpot Pty Ltd
 
Integrating the Student Information System and Blackboard - you just press a ...
Integrating the Student Information System and Blackboard - you just press a ...Integrating the Student Information System and Blackboard - you just press a ...
Integrating the Student Information System and Blackboard - you just press a ...Blackboard APAC
 
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource
Mysql vs oracle Kecepatan Transaksi, Index, dan ResourceMysql vs oracle Kecepatan Transaksi, Index, dan Resource
Mysql vs oracle Kecepatan Transaksi, Index, dan ResourceAnanda Dwi Satrio
 
Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...
Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...
Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...Blackboard APAC
 
Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...
Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...
Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...Blackboard APAC
 
Oracle mysql comparison
Oracle mysql comparisonOracle mysql comparison
Oracle mysql comparisonArun Sharma
 
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource doc
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource docMysql vs oracle Kecepatan Transaksi, Index, dan Resource doc
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource docAnanda Dwi Satrio
 

Viewers also liked (13)

Embedding Library Services in Blackboard Learn
Embedding Library Services in Blackboard LearnEmbedding Library Services in Blackboard Learn
Embedding Library Services in Blackboard Learn
 
Getting Campus-Wide Adoption - Happy Faculty - via Blackboard Collaborate
Getting Campus-Wide Adoption - Happy Faculty - via Blackboard CollaborateGetting Campus-Wide Adoption - Happy Faculty - via Blackboard Collaborate
Getting Campus-Wide Adoption - Happy Faculty - via Blackboard Collaborate
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
 
Incorporating ResearchReady into Blackboard Learn Using LTI Integration
Incorporating ResearchReady into Blackboard Learn Using LTI IntegrationIncorporating ResearchReady into Blackboard Learn Using LTI Integration
Incorporating ResearchReady into Blackboard Learn Using LTI Integration
 
Blackboard
BlackboardBlackboard
Blackboard
 
Comparing 30 MongoDB operations with Oracle SQL statements
Comparing 30 MongoDB operations with Oracle SQL statementsComparing 30 MongoDB operations with Oracle SQL statements
Comparing 30 MongoDB operations with Oracle SQL statements
 
Integrating Blackboard Collaborate 12 and Moodle
Integrating Blackboard Collaborate 12 and MoodleIntegrating Blackboard Collaborate 12 and Moodle
Integrating Blackboard Collaborate 12 and Moodle
 
Integrating the Student Information System and Blackboard - you just press a ...
Integrating the Student Information System and Blackboard - you just press a ...Integrating the Student Information System and Blackboard - you just press a ...
Integrating the Student Information System and Blackboard - you just press a ...
 
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource
Mysql vs oracle Kecepatan Transaksi, Index, dan ResourceMysql vs oracle Kecepatan Transaksi, Index, dan Resource
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource
 
Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...
Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...
Supporting Blackboard today and tomorrow with integrated solutions, Pearson E...
 
Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...
Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...
Blackboard Learn integration overview: 9.1, SaaS, and Ultra - Scott Hurrey, M...
 
Oracle mysql comparison
Oracle mysql comparisonOracle mysql comparison
Oracle mysql comparison
 
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource doc
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource docMysql vs oracle Kecepatan Transaksi, Index, dan Resource doc
Mysql vs oracle Kecepatan Transaksi, Index, dan Resource doc
 

Similar to Difference Between Sql - MySql and Oracle

COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL Rc Os
 
Sql ch 12 - creating database
Sql ch 12 - creating databaseSql ch 12 - creating database
Sql ch 12 - creating databaseMukesh Tekwani
 
introdution concept on _ _ sql_basic.ppt
introdution concept on _ _ sql_basic.pptintrodution concept on _ _ sql_basic.ppt
introdution concept on _ _ sql_basic.pptriscomputersir
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETEAbrar ali
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...SakkaravarthiS1
 
Sql overview-1232931296681161-1
Sql overview-1232931296681161-1Sql overview-1232931296681161-1
Sql overview-1232931296681161-1sagaroceanic11
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxjainendraKUMAR55
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL ISankhya_Analytics
 

Similar to Difference Between Sql - MySql and Oracle (20)

COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
 
Sql12
Sql12Sql12
Sql12
 
sql.pptx
sql.pptxsql.pptx
sql.pptx
 
SQL & PLSQL
SQL & PLSQLSQL & PLSQL
SQL & PLSQL
 
Sql ch 12 - creating database
Sql ch 12 - creating databaseSql ch 12 - creating database
Sql ch 12 - creating database
 
SQL
SQLSQL
SQL
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
Lab2 ddl commands
Lab2 ddl commandsLab2 ddl commands
Lab2 ddl commands
 
Sql commands
Sql commandsSql commands
Sql commands
 
introdution concept on _ _ sql_basic.ppt
introdution concept on _ _ sql_basic.pptintrodution concept on _ _ sql_basic.ppt
introdution concept on _ _ sql_basic.ppt
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
 
Sql overview-1232931296681161-1
Sql overview-1232931296681161-1Sql overview-1232931296681161-1
Sql overview-1232931296681161-1
 
Hira
HiraHira
Hira
 
SQL | DML
SQL | DMLSQL | DML
SQL | DML
 
lovely
lovelylovely
lovely
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptx
 
MySQL Essential Training
MySQL Essential TrainingMySQL Essential Training
MySQL Essential Training
 
Mysql cheatsheet
Mysql cheatsheetMysql cheatsheet
Mysql cheatsheet
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 

More from Steve Johnson

How to create effective powerpoint presentation
How to create effective powerpoint presentationHow to create effective powerpoint presentation
How to create effective powerpoint presentationSteve Johnson
 
How to approach your first assignment
How to approach  your first  assignmentHow to approach  your first  assignment
How to approach your first assignmentSteve Johnson
 
A quick guide on accounting process of bookkeeping
A quick guide on accounting process of bookkeepingA quick guide on accounting process of bookkeeping
A quick guide on accounting process of bookkeepingSteve Johnson
 
Online education vs classroom teaching
Online education vs classroom teachingOnline education vs classroom teaching
Online education vs classroom teachingSteve Johnson
 
Darwin’s theory of evolution
Darwin’s theory of evolutionDarwin’s theory of evolution
Darwin’s theory of evolutionSteve Johnson
 
Learn Vba excel 2007
Learn Vba excel 2007Learn Vba excel 2007
Learn Vba excel 2007Steve Johnson
 
Learn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.NetLearn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.NetSteve Johnson
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming LanguageSteve Johnson
 
What is a Scientific Presentation ?
What is a Scientific Presentation ?What is a Scientific Presentation ?
What is a Scientific Presentation ?Steve Johnson
 
What is Psychology ?
What is Psychology ?What is Psychology ?
What is Psychology ?Steve Johnson
 

More from Steve Johnson (14)

Science of boredom
Science of boredomScience of boredom
Science of boredom
 
How to create effective powerpoint presentation
How to create effective powerpoint presentationHow to create effective powerpoint presentation
How to create effective powerpoint presentation
 
How to approach your first assignment
How to approach  your first  assignmentHow to approach  your first  assignment
How to approach your first assignment
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
A quick guide on accounting process of bookkeeping
A quick guide on accounting process of bookkeepingA quick guide on accounting process of bookkeeping
A quick guide on accounting process of bookkeeping
 
Online education vs classroom teaching
Online education vs classroom teachingOnline education vs classroom teaching
Online education vs classroom teaching
 
Darwin’s theory of evolution
Darwin’s theory of evolutionDarwin’s theory of evolution
Darwin’s theory of evolution
 
Learn Vba excel 2007
Learn Vba excel 2007Learn Vba excel 2007
Learn Vba excel 2007
 
Learn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.NetLearn Data Structures With Myassignmenthelp.Net
Learn Data Structures With Myassignmenthelp.Net
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 
What is a Scientific Presentation ?
What is a Scientific Presentation ?What is a Scientific Presentation ?
What is a Scientific Presentation ?
 
What is Psychology ?
What is Psychology ?What is Psychology ?
What is Psychology ?
 
Biology Assignments
Biology AssignmentsBiology Assignments
Biology Assignments
 
Biology Assignments
Biology AssignmentsBiology Assignments
Biology Assignments
 

Recently uploaded

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 

Recently uploaded (20)

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 

Difference Between Sql - MySql and Oracle

  • 1. Difference Between SQL / MYSQL / ORACLE www.assignmenthelp.net www.myassignmenthelp.net
  • 2. SQL Database SQL (Structured Query Language) is a database computer language designed for managing data in relational database management systems (RDBMS). MYSQL Database MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. ORACLE Database Oracle is the name of the database management system that comes from Oracle Corporation.
  • 3. PRIMARY KEY A Primary Key is a column or combination of columns whose values uniquely identify a row or record in the table. Examples for specifying a Primary Key, www.assignmenthelp.net SQL MYSQL ORACLE Primary Key CREATE table table_name ( id integer PRIMARY KEY, FirstName varchar(30), LastName varchar(30) ); CREATE table table_name ( id integer, FirstName varchar(30), LastName varchar(30), PRIMARY KEY (id) ); CREATE table table_name ( id integer PRIMARY KEY, FirstName varchar(30), LastName varchar(30) ); Specifying a primary key by Altering a table ALTER TABLE table_name ADD PRIMARY KEY (id); ALTER TABLE table_name ADD PRIMARY KEY (id); ALTER TABLE table_name ADD PRIMARY KEY (id); DROP TABLE DROP TABLE table_name; DROP TABLE table_name; DROP TABLE table_name;
  • 4. Sample Output www.assignmenthelp.net Sample output for CREATE Table Sample output for DROP Table
  • 5. FOREIGN KEY A FOREIGN KEY in one table points to a PRIMARY KEY in another table. Examples for specifying a Foreign key when creating a table (using CREATE TABLE) or by changing the existing table structure (using ALTER TABLE). Table1: Student Table2: Book Column Name Datatype characteristic BookId integer Primary Key BookName varchar Student_Sid integer Foreign Key Amount integer Column Name Datatype characteristic Sid integer Primary Key LastName varchar FirstName varchar
  • 6. Foreign Key SQL MYSQL ORACLE Foreign Key Create table Book ( BookId integer PRIMARY KEY, BookName varchar(30), Amount integer, Student_Sid interger references Student(Sid)); Create table Book ( BookId integer, BookName varchar(30), Student_Sid integer, Amount integer, Primary Key (BookId), Foreign Key (Student_Sid) references Student(Sid)); Create table Book ( BookId integer PRIMARY KEY, BookName varchar(30), Amount integer, Student_Sid integer references Student(Sid)); Specifying a Foreign Key by Altering a table ALTER table Book ADD FOREIGN KEY (Student_Sid) references Student(Sid); ALTER table Book ADD FOREIGN KEY (Student_Sid) references Student(Sid); ALTER table Book ADD FOREIGN KEY (Student_Sid) references Student(Sid); DROP Table DropTABLE Book; Drop TABLE Book; drop table Book cascade constraints; Note: if foreign key are available in that table
  • 7. Sample Output Sample Output for CREATE Table Sample Output for Drop Table
  • 8. CREATE TABLE SQL MYSQL ORACLE The CREATE TABLE statement is used to create a table in a database. CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, .... ); CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, .... ); CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, .... ); Creates an index on a table. Duplicate values are allowed. CREATE INDEX index_name ON table_name (column_name); CREATE INDEX index_name ON table_name (column_name); CREATE INDEX index_name ON table_name (column_name); Creates a unique index on a table. Duplicate values are not allowed. CREATE UNIQUE INDEX index_name ON table_name (column_name); CREATE UNIQUE INDEX index_name ON table_name (column_name); CREATE UNIQUE INDEX index_name ON table_name (column_name); Create View syntax CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition; CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition; CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition;
  • 9. DROP TABLE SQL MYSQL ORACLE It is used to delete a Table. DROP TABLE Student; DROP TABLE Student; DROP TABLE Student; It is used to delete a database. DROP DATABASE database_name DROP DATABASE database_name DROP DATABASE database_name Delete the data inside the table only TRUNCATE TABLE table_name TRUNCATE TABLE table_name TRUNCATE TABLE table_name The DROP INDEX statement is used to delete an index in a table. DROP INDEX table_name.index_name ALTER TABLE table_name DROP INDEX index_name DROP INDEX index_name
  • 10. ALTER TABLE SQL MYSQL ORACLE Rename the table name ALTER TABLE table_name RENAME TO new_table_name; ALTER TABLE table_name RENAME TO new_table_name; ALTER TABLE table_name RENAME TO new_table_name; Add a column in a table ALTER TABLE table_name ADD column_name datatype; ALTER TABLE table_name ADD column_name column- definition; ALTER TABLE table_name ADD column_name column- definition; Delete a column in a table ALTER TABLE table_name DROP COLUMN column_name ALTER TABLE table_name DROP COLUMN column_name ALTER TABLE table_name DROP COLUMN column_name Change the data type of a column in a table ALTER TABLE table_name ALTER COLUMN column_name datatype ALTER TABLE table_name ALTER COLUMN column_name datatype ALTER TABLE table_name ALTER COLUMN column_name datatype
  • 11. References http://en.wikipedia.org/wiki/Sql Dr. Chen’s homepage: http://bit.csc.lsu.edu/~chen/chen.html Database Systems: A First Course, J.D. Ullman & J. Widom http://en.wikipedia.org/wiki/Oracle http://en.wikipedia.org/wiki/Mysql http://www.w3schools.com/sql/default.asp

Editor's Notes

  1. 1