• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Raj mysql
 

Raj mysql

on

  • 1,594 views

 

Statistics

Views

Total Views
1,594
Views on SlideShare
1,592
Embed Views
2

Actions

Likes
1
Downloads
34
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Raj mysql Raj mysql Presentation Transcript

    • MySQL Presented by Rajesh
    • WHAT IS MYSQL
      • MySQL is a database management system.
      • MySQL is a relational database management system.
      • MySQL is Open Source Software.
    • THE IDEA
      • Client PC mysql client mysql
      • Server PC MySQL Server safe_mysqld
      • QUERY
      • RESPONSE
      • Separate the logical part of the queries from the implementation logicalgly, and phisically.
    • HISTORY
      • The authors started to use mSQL, but they came to the conclusion that mSQL as not fast enough and not flexible enough to face their needs.
      • The reslt is a new SQL server - MySQL
      • The name MySQL The directories "my” Monty's daughter My
    • MAIN SUPPORTED PLATFORMS
      • First developed for Solaris and RedHat Linux .
      • FreeBSD.
      • OpenBSD.
      • Mac OS X Server.
      • Win95, Win98, NT, and Win2000.
      • All modern systems with working Posix threads and a C++ compiler.
    • DOWNLOAD
      • http://www.mysql.com/ Download instructions
      • http://download.sourceforge.net/mirrors/mysql/
      • http://www.analysisandsolutions.com/code/mybasic.htm
      • Beginners MySQL Tutorial on how to install and set up MySQL on a Windows machine.
    • INSTALLATION
      • Under RedHat Linux from an RPM package (install as root) rpm -i MySQL-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm
      • Under any (other) Linux (install as root) groupadd mysql useradd -g mysql mysql cd /usr/local gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - ln -s mysql-VERSION-OS mysql cd mysql scripts/mysql_install_db chown -R mysql /usr/local/mysql chgrp -R mysql /usr/local/mysql bin/safe_mysqld --user=mysql &
    •  
    •  
    •  
      • TO configure MY& SQL:
      • MySQL was successfully installed. Now we want to configure it. Leave the check box &quot;Configure the MySQL Server Now&quot; checked, and click &quot;Next>&quot;. After you do that, you should see a window that looks like this:
    •  
    • BASIC COMMANDS OF MYSQL
    • 1.CREATE Command The Create command is used to create a table by specifying the tablename, fieldnames and constraints as shown below: Syntax: $createSQL=(&quot;CREATE TABLE tblName&quot;); Example: $createSQL=(&quot;CREATE TABLE tblstudent(fldstudid int(10) NOTNULL AUTO_INCREMENT PRIMARY KEY,fldstudName VARCHAR(250) NOTNULL,fldstudentmark int(4) DEFAULT '0' &quot;);
    • Example: $createSQL=(&quot;CREATE TABLE tblstudent(fldstudid int(10) NOTNULL AUTO_INCREMENT PRIMARY KEY,fldstudName VARCHAR(250) NOTNULL,fldstudentmark int(4) DEFAULT '0' &quot;);
    • 2.SELECT Command
      • The Select command is used to select the records from a table using its field names. To select all the fields in a table, '*' is used in the command. The result is assigned to a variable name as shown below:
      • Syntax:
      • $selectSQL=(&quot;SELECT field_names FROM tablename&quot;);
      • Example:
      • $selectSQL=(&quot;SELECT * FROM tblstudent&quot;);
    • 3.DELETE COMMAND
      • The Delete command is used to delete the records from a table using conditions as shown below:
      • Syntax:
      • $deleteSQL=(&quot;DELETE * FROM tablename WHERE condition&quot;);
      • Example:
      • $deleteSQL=(&quot;DELETE * FROM tblstudent WHERE fldstudid=2&quot;);
    • 4.INSERT Command
      • The Insert command is used to insert records into a table. The values are assigned to the field names as shown below:
      • Syntax:
      • $insertSQL=(&quot;INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) &quot;);
      • Example:
      • $insertSQL=(&quot;INSERT INTO Tblstudent(fldstudName,fldstudmark)VALUES(Baskar,75) &quot;);
    • 5. UPDATE Command
      • The Update command is used to update the field values using conditions. This is done using 'SET' and the fieldnames to assign new values to them.
      • Syntax:
      • $updateSQL=(&quot;UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber&quot;)
      • Example:
      • $updateSQL=(&quot;UPDATE Tblstudent SET (fldstudName=siva,fldstudmark=100) WHERE fldstudid=2&quot;);
    • 6.DROP Command
      • The Drop command is used to delete all the records in a table using the table name as shown below:
      • Syntax:
      • $dropSQL=(&quot;DROP tblName&quot;);
      • Example:
      • $dropSQL=(&quot;DROP tblstudent&quot;);
    • ADVANTAGES
      • very fast
      • reliable and easy to use
      • multi-threaded multi-user and robust SQL database server.
    • DISADVANTAGES
      • Missing Sub-selects.
      • MySQL doesn't yet support the Oracle SQL extension: i SELECT ... INTO TABLE , but supports INSERT INTO ... SELECT ..
      • Does not support Stored Procedures and Triggers.
      • MySQL doesn't support views, but this is on the TODO.
    • Thank you