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

National University of Modern Languages - NUML: (Department of Computer Science)

This document provides information about a lecture on Structured Query Language (SQL) given by Muhammad Noman Farooq. It introduces SQL and what it can do, how it is used in web development, and basic SQL concepts. It also discusses installing and using WAMP server, Apache web server, MySQL database, phpMyAdmin, and Sublime Text editor for SQL development. The lecture emphasizes learning SQL through hands-on coding in MySQL console using a simulated environment like XAMPP. It also highlights the importance of database modeling, normalization, and joins.

Uploaded by

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

National University of Modern Languages - NUML: (Department of Computer Science)

This document provides information about a lecture on Structured Query Language (SQL) given by Muhammad Noman Farooq. It introduces SQL and what it can do, how it is used in web development, and basic SQL concepts. It also discusses installing and using WAMP server, Apache web server, MySQL database, phpMyAdmin, and Sublime Text editor for SQL development. The lecture emphasizes learning SQL through hands-on coding in MySQL console using a simulated environment like XAMPP. It also highlights the importance of database modeling, normalization, and joins.

Uploaded by

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

National University of Modern

Languages - NUML
(Department of Computer Science)
Mr. Muhammad Noman Farooq
BSC-H (Computer Science)
MS (Telecomm. and Networks)
DWH & BI – Certified

Honors:
Gold Medalist!
Magna Cumm Laude
7 + years of Experience in Lectureship & Professional Trainings
Teradata + MySQL (Advanced) + Power BI + Tableau
Official E-Mail: [email protected]
Personal Email: [email protected]
Introduction to Database Systems

Structured Query
Language (SQL)
Lecture# 7
Structured Query
Language (SQL)
Introduction and Installations
What is SQL?
 SQL stands for Structured Query Language

 SQL lets you access and manipulate databases


What Can SQL do?
 SQL can execute queries against a database
 SQL can retrieve data from a database
 SQL can insert records in a database
 SQL can update records in a database
 SQL can delete records from a database
 SQL can create new databases
 SQL can create new tables in a database
 SQL can create stored procedures in a database
 SQL can create views in a database
 SQL can set permissions on tables, procedures, and views
Using SQL in Your Web Site
 To build a web site that shows data from a database, you
will need:
 An RDBMS database program (i.e. MS Access, SQL Server,
MySQL)
 To use a server-side scripting language, like PHP or ASP
 To use SQL to get the data you want
 To use HTML / CSS
Rules

 SQL is NOT case sensitive: select is the same as SELECT


 Semicolon is the standard way to separate each SQL
statement in database systems
Downloads

 XAMPP or WAMPP Server


 Apache
 PHP My Admin
 MY SQL
Web Server
 Web servers are computers that deliver (serves up) Web pages.
 Every Web server has an IP address and possibly a domain name.
For example, if you enter the URL
http://www.webopedia.com/index.html in your browser, this
sends a request to the Web server whose domain name
is webopedia.com. The server then fetches the page
named index.html and sends it to your browser.
 Any computer can be turned into a Web server by installing server
software and connecting the machine to the Internet. There are
many Web server software applications
WAMP Server
 Stands for "Windows, Apache, MySQL, and PHP.“ It is a
windows web development environment.
 It is installed as a software bundle (Apache, MySQL, and
PHP). It is often used for web development and internal
testing.
 LAMP is for Linux
 MAMP is for Mac
 SAMP is for Solaris
Apache
 Apache is the most popular Web server software.
 It enables a computer to host one or more websites that can
be accessed over the Internet using a Web browser.
 The most important part of the WAMP package is Apache
which is used to run the web server within Windows.
 By running a local Apache web server on a Windows machine,
a web developer can test web pages in a web
browser without publishing them live on the Internet.
Localhost
 "Localhost" refers to the local computer that a program is
running on.

 Localhost is often used in Web scripting languages like


PHP and ASP when defining what server the code should
run from or where a database is located.
SQL and MYSQL
 MySQL, pronounced either "My S-Q-L" or "My Sequel," is an open
source relational database management system.
 It is based on the structure query language (SQL), which is used
for adding, removing, and modifying information in the
database.
 A website that uses MySQL may include Web pages that access
information from a database. 
 Websites that use dynamic Web pages are often referred to as
database-driven websites.
 MySQL commands can be incorporated into the PHP code,
allowing part or all of a Web page to be generated from
database information.
PHP MyAdmin
 phpMyAdmin is a free software tool written in PHP, intended to
handle the administration of MySQL over the Web.

 phpMyAdmin supports a wide range of operations on MySQL.

 Frequently used operations (managing databases, tables, columns,


relations, indexes, users, permissions, etc) can be performed via
the user interface, while you still have the ability to directly
execute any SQL statement.
Sublime Text Editor

 Sublime Text is a sophisticated text editor for code, markup


and prose. You'll love the slick user interface, extraordinary
features and amazing performance.
Database Layer Vs Development Layer
 There are multiple approaches that are used to design Applications.

1. Database Layer (Full Structure via Database Coding)


2. Development Layer (Half structure via PHP Coding)

 In this subject of Database Systems; We will be coding


everything Via console in MySQL using XAMPP as a simulator because SQL is
magic and anything can be done via MySQL.
 As a Database Administrator, you must know how to
model and create Database Structure and Normalized tables and their
Relationships between them. Also, we must use Joining Concepts and
Functions to fetch out our desired results efficiently.
 There are many real-time examples of Access, MySQL
and Oracle; These Database Management Systems (DBMS) are used in many
Organizations for example Oracle is used in many Banks and in many
Factories. Many Database Administrator Jobs are available in Government
Institutions for example in Land Record Management System etc.
 So, we are doing everything via Database Layer
(Full Structure via Database Coding)
Recommended Readings

Lab Manual:

Lab Activities from Laboratory Manual (A Guide to


MySQL) prepared by Muhammad Nouman Farooq (Page
No. 2-111)

Chapter 4, 5, 6 & 8 from:

A Guide to SQL 8-Edition by Philip J. Prat and Mary Z. Last


17
 END OF LECTURE 7

18

You might also like