MySQL
fusion
Team represent mysql
database
Web Technolgies
FOR FRONTSIDE PORTION
YOU HAVE DONE IT
•HTML (Hypertext Markup Language)
•CSS (Cascading Style Sheets)
• Dreamweaver
• Animation (Flash )
Web Technolgies
Server-side
PHP
ASP (Active Server Pages) &
ASP.NET
Java Servlets
XML
JSP (Java Server Pages)
10/23/08
3
LAMP
Apache (www.apache.org)
Most popular web page
serving software
Latest version: 2.0
LAMP
MySQL (www.mysql.com
)
Open source SQL
database that is free and
extremely powerful
Latest version: 4.1
(though 5.0.1 is testing
10/23/08 version) 5
LAMP
PHP (www.php.net)
PHP (Hypertext Preprocessor) is
mainly focused on server-side
scripting, so you can do
anything, such as collect form
data, generate dynamic page
content, or send and receive
.But PHP can do much more.
Latest version: 4.3 (though 5 is
10/23/08 testing) 6
MySQL Overview
Fast,free, stable database
Syntax is similar to Oracle
Many of the same features as
Oracle
Frequently used in
conjunction with Linux,
Apache, and PHP
10/23/08
7
MySQL datatype
1.Char(size)
It can hold upto 255 character.
2. Varchar(size)
It can hold upto 1 to 255 character.
3. Int
For integer value
4.Date
It take date as a input. yy-mm-dd
‘ 2008-02-23’
10/23/08
8
For open mysql
Open Dos prompt
C:\mysql\bin>mysql –h localhost –u
root –p
Pressenter
Mysql>_
10/23/08
9
Create database
Mysql>create database my;
enter
Output
Query OK, 1 row affected (0.00 sec)
For using your own database
mysql> use my;
Database changed
10/23/08
10
MySQL – Create Tables
Table structure for following examples
Mysql>Create table data(id int(5)
primary key,name varchar(15),dob
date);
enter
Query OK, 0 row affected (0.03 sec)
10/23/08
11
Desc command
For describe the table…………………
Mysql>desc data;
10/23/08
12
MySQL –insert data
mysql> insert into data
values('12345',‘incord’,'2007-02-20');
Press enter
Output
Query OK, 1 row affected (0.00 sec)
Multiple input with comma, sign.
10/23/08
13
select command
To see content of table:-------------
Mysql>select * from
data;
10/23/08
14
Security by md5
Cryptography
Encryption
And
decryption
10/23/08
15
MySQL –alter Tables
Mysql>alter table s add(primary
key(srno));
Mysql>alter table s add(grade
char(2));
10/23/08
16
Update command
Mysql>Update s set
name=‘riya’ where
srno=‘651’;
10/23/08
17
Delete command
Mysql>delete from s where
name=‘ajay’;
Mysql>delete from s;
It will delete all row.
10/23/08
18
Truncate command
Mysql>truncate table <table
name>;
Truncate operation drop and re-
create
the table ,which is much faster than
deleting rows one by one.
10/23/08
19
Drop Table
Mysql>drop table
s;
10/23/08
20
MySQL References
THE OFFICIAL MYSQL
WEBSITE................
http://www.mysql.com/
MYSQL QUERIES AND
COMMON
PROBLEMS........................
http://www.faqts.com/knowledge_base/index.p
html/fid/94