SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
hasen@microcis.net July 15, 2013Hassen poreya
Trainer, Cresco Solution
Afghanistan Workforce
Development Program
Database
Database Management System, MySQL
Database
A Database is a container that holds tables and other
SQL structures related to those tables.
Database
Database Management System (DBMS)
 Elmasri & Navathe (2007):
“A database management system (DBMS) is a
collection of programs that enables users to
create and maintain a database.”
Database Management System (DBMS)
 A DBMS fulfills several purposes:
 Defining databases
 Constructing databases
 Manipulating databases
 Sharing databases among various users and
applications
Database Management System (DBMS)
 MS Access
 MySQL (Open Source)
 SQL-Server (Microsoft)
 Oracle
 PostgreSQL
 FoxPro
 SQLite
SQL (Structured Query Language)
 SQL is a database language designed for
 Retrieval and management of data in relational DBMS
 Database schema creation and modification
 It is used also in case of security, Authorization,
Integrity
 2 Originally, SQL was called SEQUEL (Structured
English QUEry Language)
 3 Three languages within a language:
 The Data Definition Language (DDL)
 The Data Manipulation Language (DML)
 The Data Control Language (DCL)
Data Definition Language (DDL)
 The Data Definition Language (DDL) is the part of
SQL.
 You use to create, change, or destroy the basic
elements of a relational database.
 Definition Language (DDL) deals with the structure
of a database.
Data Definition Language (DDL)
 The DDL consists of these three commands:
 CREATE: You use the various forms of this command to
build the essential structures of the database
 ALTER: You use this command to change structures
that You create
 DROP: If you apply this command to a table, it
destroys not only the table's data, but its structure as
well.
Data Manipulation Language (DML)
 The Data Manipulation Language deals with the
data contained within that structure.
 The Data Manipulation Language (DML) is the part
of SQL that operates on the data.
 The DML statements that can be use is:
 INSERT
 UPDATE
 DELETE
 SELECT
Data Control Language (DCL)
 Protects your database from becoming corrupted.
 The DCL provides security for your database
 DCL hast four commands:
 COMMIT
 ROLLBACK
 GRANT
 REVOKE
Data Control Language (DCL)
 Database Name: Company
 Tables: employee, project, works in
Create Command (DDL)
 SHOW databases;
 To list name of available databases.
 CREATE DATABASE name;
 USE name;
Create Command (DDL)
 To create new table:
 CREATE TABLE table_name (column1_name
data_type1, column2_name data_type2…);
Create Command (DDL)
 To create table project:
 To create table works_in:
ALTER TABLE Commands
 Add new column:
 ALTER TABLE employee ADD COLUMN (salary
INTEGER);
 Change data type of a column:
 ALTER TABLE employee MODIFY COLUMN salary
FLOAT;
 Delete column:
 ALTER TABLE employee DROP COLUMN salary;
DROP Commands
 Delete Database:
 DROP DATABASE Company;
 Delete Table:
 DROP TABLE employee;
 Two other useful command:
 SHOW TABLES; -- Show available tables (after selecting
a database with USE)
Commands
 DESCRIBE table name;
 Show structure of table
Data types
 INTEGER : integer
 FLOAT : floating point number
 DATE : a date, format: 'YYYY-MM-DD'
 VARCHAR(N) : variable length string, the length is
indicated by N, range 0-255
 TEXT : text, maximum length of 65,535 characters
 BOOLEAN : 0=false, any other value=true
Exercise
 Create a database “Student”
 Each student has different information including
ID, name, last name, class, phone number.
 Table student.
 Each student also needs a username and password
to enter to the library system.
 Table users
 Do entry at least for five students!
hasen@microcis.net July 15, 2013Hassen poreya
Trainer, Cresco Solution
Any Questions!

Mais conteúdo relacionado

Mais procurados

Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
Tony Wong
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
Hasan Kata
 

Mais procurados (20)

Structured query language
Structured query languageStructured query language
Structured query language
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Data base
Data baseData base
Data base
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 
MySQL and its basic commands
MySQL and its basic commandsMySQL and its basic commands
MySQL and its basic commands
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
SQLSlide
SQLSlideSQLSlide
SQLSlide
 
Ddl vs dml
Ddl vs dmlDdl vs dml
Ddl vs dml
 
Data Definition and Data Manipulation Language-DDL & DML
Data Definition and Data Manipulation Language-DDL & DMLData Definition and Data Manipulation Language-DDL & DML
Data Definition and Data Manipulation Language-DDL & DML
 
Sql – pocket guide
Sql – pocket guideSql – pocket guide
Sql – pocket guide
 
Group Members
Group MembersGroup Members
Group Members
 
Data Ware Housing through SQL concept
Data Ware Housing through SQL conceptData Ware Housing through SQL concept
Data Ware Housing through SQL concept
 
Sql database development part 1
Sql database development part 1Sql database development part 1
Sql database development part 1
 
Types of sql commands by naveen kumar veligeti
Types of sql commands by naveen kumar veligetiTypes of sql commands by naveen kumar veligeti
Types of sql commands by naveen kumar veligeti
 
Presentation1
Presentation1Presentation1
Presentation1
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
 
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick LearningOracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 

Destaque (15)

Learn to Code with JavaScript - Choose Your Own Adventures
Learn to Code with JavaScript - Choose Your Own AdventuresLearn to Code with JavaScript - Choose Your Own Adventures
Learn to Code with JavaScript - Choose Your Own Adventures
 
Web app development_database_design_er-mapping_12
Web app development_database_design_er-mapping_12Web app development_database_design_er-mapping_12
Web app development_database_design_er-mapping_12
 
Web app development_php_04
Web app development_php_04Web app development_php_04
Web app development_php_04
 
Web app development_database_design_11
Web app development_database_design_11Web app development_database_design_11
Web app development_database_design_11
 
CodeIgniter Practice
CodeIgniter PracticeCodeIgniter Practice
CodeIgniter Practice
 
Web app development_crud_13
Web app development_crud_13Web app development_crud_13
Web app development_crud_13
 
Web app development_my_sql_09
Web app development_my_sql_09Web app development_my_sql_09
Web app development_my_sql_09
 
Web app development_html_css_03
Web app development_html_css_03Web app development_html_css_03
Web app development_html_css_03
 
Web app development_php_07
Web app development_php_07Web app development_php_07
Web app development_php_07
 
Web app development_php_06
Web app development_php_06Web app development_php_06
Web app development_php_06
 
Web app development_php_05
Web app development_php_05Web app development_php_05
Web app development_php_05
 
Web app development_database_design_10
Web app development_database_design_10Web app development_database_design_10
Web app development_database_design_10
 
Web app development_html_01
Web app development_html_01Web app development_html_01
Web app development_html_01
 
Web app development_cookies_sessions_14
Web app development_cookies_sessions_14Web app development_cookies_sessions_14
Web app development_cookies_sessions_14
 
Web app development_html_02
Web app development_html_02Web app development_html_02
Web app development_html_02
 

Semelhante a Web app development_my_sql_08

Lecture on DBMS & MySQL.pdf v. C. .
Lecture on DBMS & MySQL.pdf v.  C.     .Lecture on DBMS & MySQL.pdf v.  C.     .
Lecture on DBMS & MySQL.pdf v. C. .
MayankSinghRawat6
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
EliasPetros
 

Semelhante a Web app development_my_sql_08 (20)

SQL2.pptx
SQL2.pptxSQL2.pptx
SQL2.pptx
 
lovely
lovelylovely
lovely
 
Database Languages.pptx
Database Languages.pptxDatabase Languages.pptx
Database Languages.pptx
 
Database Management System (DBMS).pptx
Database Management System (DBMS).pptxDatabase Management System (DBMS).pptx
Database Management System (DBMS).pptx
 
SQLGuide.ppt.pptx
SQLGuide.ppt.pptxSQLGuide.ppt.pptx
SQLGuide.ppt.pptx
 
SQLGuide.ppt.pptx
SQLGuide.ppt.pptxSQLGuide.ppt.pptx
SQLGuide.ppt.pptx
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
 
SQL Injection Attacks
SQL Injection AttacksSQL Injection Attacks
SQL Injection Attacks
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
Lecture on DBMS & MySQL.pdf v. C. .
Lecture on DBMS & MySQL.pdf v.  C.     .Lecture on DBMS & MySQL.pdf v.  C.     .
Lecture on DBMS & MySQL.pdf v. C. .
 
SQL ARPIT YADAV.pptx
SQL ARPIT YADAV.pptxSQL ARPIT YADAV.pptx
SQL ARPIT YADAV.pptx
 
SQL_Introduction_Updated.pptx
SQL_Introduction_Updated.pptxSQL_Introduction_Updated.pptx
SQL_Introduction_Updated.pptx
 
Introduction to SQL.pptx
Introduction to SQL.pptxIntroduction to SQL.pptx
Introduction to SQL.pptx
 
An intoduction to sql and its components
An intoduction to sql and its componentsAn intoduction to sql and its components
An intoduction to sql and its components
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Database language
Database languageDatabase language
Database language
 
BASIC_OF_DATABASE_PPT__new[1].pptx
BASIC_OF_DATABASE_PPT__new[1].pptxBASIC_OF_DATABASE_PPT__new[1].pptx
BASIC_OF_DATABASE_PPT__new[1].pptx
 
Database Languages
Database LanguagesDatabase Languages
Database Languages
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Web app development_my_sql_08

  • 1. hasen@microcis.net July 15, 2013Hassen poreya Trainer, Cresco Solution Afghanistan Workforce Development Program Database Database Management System, MySQL
  • 2. Database A Database is a container that holds tables and other SQL structures related to those tables.
  • 4. Database Management System (DBMS)  Elmasri & Navathe (2007): “A database management system (DBMS) is a collection of programs that enables users to create and maintain a database.”
  • 5. Database Management System (DBMS)  A DBMS fulfills several purposes:  Defining databases  Constructing databases  Manipulating databases  Sharing databases among various users and applications
  • 6. Database Management System (DBMS)  MS Access  MySQL (Open Source)  SQL-Server (Microsoft)  Oracle  PostgreSQL  FoxPro  SQLite
  • 7. SQL (Structured Query Language)  SQL is a database language designed for  Retrieval and management of data in relational DBMS  Database schema creation and modification  It is used also in case of security, Authorization, Integrity  2 Originally, SQL was called SEQUEL (Structured English QUEry Language)  3 Three languages within a language:  The Data Definition Language (DDL)  The Data Manipulation Language (DML)  The Data Control Language (DCL)
  • 8. Data Definition Language (DDL)  The Data Definition Language (DDL) is the part of SQL.  You use to create, change, or destroy the basic elements of a relational database.  Definition Language (DDL) deals with the structure of a database.
  • 9. Data Definition Language (DDL)  The DDL consists of these three commands:  CREATE: You use the various forms of this command to build the essential structures of the database  ALTER: You use this command to change structures that You create  DROP: If you apply this command to a table, it destroys not only the table's data, but its structure as well.
  • 10. Data Manipulation Language (DML)  The Data Manipulation Language deals with the data contained within that structure.  The Data Manipulation Language (DML) is the part of SQL that operates on the data.  The DML statements that can be use is:  INSERT  UPDATE  DELETE  SELECT
  • 11. Data Control Language (DCL)  Protects your database from becoming corrupted.  The DCL provides security for your database  DCL hast four commands:  COMMIT  ROLLBACK  GRANT  REVOKE
  • 12. Data Control Language (DCL)  Database Name: Company  Tables: employee, project, works in
  • 13. Create Command (DDL)  SHOW databases;  To list name of available databases.  CREATE DATABASE name;  USE name;
  • 14. Create Command (DDL)  To create new table:  CREATE TABLE table_name (column1_name data_type1, column2_name data_type2…);
  • 15. Create Command (DDL)  To create table project:  To create table works_in:
  • 16. ALTER TABLE Commands  Add new column:  ALTER TABLE employee ADD COLUMN (salary INTEGER);  Change data type of a column:  ALTER TABLE employee MODIFY COLUMN salary FLOAT;  Delete column:  ALTER TABLE employee DROP COLUMN salary;
  • 17. DROP Commands  Delete Database:  DROP DATABASE Company;  Delete Table:  DROP TABLE employee;  Two other useful command:  SHOW TABLES; -- Show available tables (after selecting a database with USE)
  • 18. Commands  DESCRIBE table name;  Show structure of table
  • 19. Data types  INTEGER : integer  FLOAT : floating point number  DATE : a date, format: 'YYYY-MM-DD'  VARCHAR(N) : variable length string, the length is indicated by N, range 0-255  TEXT : text, maximum length of 65,535 characters  BOOLEAN : 0=false, any other value=true
  • 20. Exercise  Create a database “Student”  Each student has different information including ID, name, last name, class, phone number.  Table student.  Each student also needs a username and password to enter to the library system.  Table users  Do entry at least for five students!
  • 21. hasen@microcis.net July 15, 2013Hassen poreya Trainer, Cresco Solution Any Questions!