Raj mysql

1,568
-1

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,568
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
37
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Raj mysql

  1. 1. MySQL Presented by Rajesh
  2. 2. WHAT IS MYSQL <ul><li>MySQL is a database management system. </li></ul><ul><li>MySQL is a relational database management system. </li></ul><ul><li>MySQL is Open Source Software. </li></ul>
  3. 3. THE IDEA <ul><li>Client PC mysql client mysql </li></ul><ul><li>Server PC MySQL Server safe_mysqld </li></ul><ul><li>QUERY </li></ul><ul><li>RESPONSE </li></ul><ul><li>Separate the logical part of the queries from the implementation logicalgly, and phisically. </li></ul>
  4. 4. HISTORY <ul><li>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. </li></ul><ul><li>The reslt is a new SQL server - MySQL </li></ul><ul><li>The name MySQL The directories &quot;my” Monty's daughter My </li></ul>
  5. 5. MAIN SUPPORTED PLATFORMS <ul><li>First developed for Solaris and RedHat Linux . </li></ul><ul><li>FreeBSD. </li></ul><ul><li>OpenBSD. </li></ul><ul><li>Mac OS X Server. </li></ul><ul><li>Win95, Win98, NT, and Win2000. </li></ul><ul><li>All modern systems with working Posix threads and a C++ compiler. </li></ul>
  6. 6. DOWNLOAD <ul><li>http://www.mysql.com/ Download instructions </li></ul><ul><li>http://download.sourceforge.net/mirrors/mysql/ </li></ul><ul><li>http://www.analysisandsolutions.com/code/mybasic.htm </li></ul><ul><li>Beginners MySQL Tutorial on how to install and set up MySQL on a Windows machine. </li></ul>
  7. 7. INSTALLATION <ul><li>Under RedHat Linux from an RPM package (install as root) rpm -i MySQL-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm </li></ul><ul><li>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 & </li></ul>
  8. 11. <ul><li>TO configure MY& SQL: </li></ul><ul><li>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: </li></ul>
  9. 13. BASIC COMMANDS OF MYSQL
  10. 14. 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;);
  11. 15. Example: $createSQL=(&quot;CREATE TABLE tblstudent(fldstudid int(10) NOTNULL AUTO_INCREMENT PRIMARY KEY,fldstudName VARCHAR(250) NOTNULL,fldstudentmark int(4) DEFAULT '0' &quot;);
  12. 16. 2.SELECT Command <ul><li>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: </li></ul><ul><li>Syntax: </li></ul><ul><li>$selectSQL=(&quot;SELECT field_names FROM tablename&quot;); </li></ul><ul><li>Example: </li></ul><ul><li>$selectSQL=(&quot;SELECT * FROM tblstudent&quot;); </li></ul>
  13. 17. 3.DELETE COMMAND <ul><li>The Delete command is used to delete the records from a table using conditions as shown below: </li></ul><ul><li>Syntax: </li></ul><ul><li>$deleteSQL=(&quot;DELETE * FROM tablename WHERE condition&quot;); </li></ul><ul><li>Example: </li></ul><ul><li>$deleteSQL=(&quot;DELETE * FROM tblstudent WHERE fldstudid=2&quot;); </li></ul>
  14. 18. 4.INSERT Command <ul><li>The Insert command is used to insert records into a table. The values are assigned to the field names as shown below: </li></ul><ul><li>Syntax: </li></ul><ul><li>$insertSQL=(&quot;INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) &quot;); </li></ul><ul><li>Example: </li></ul><ul><li>$insertSQL=(&quot;INSERT INTO Tblstudent(fldstudName,fldstudmark)VALUES(Baskar,75) &quot;); </li></ul>
  15. 19. 5. UPDATE Command <ul><li>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. </li></ul><ul><li>Syntax: </li></ul><ul><li>$updateSQL=(&quot;UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber&quot;) </li></ul><ul><li>Example: </li></ul><ul><li>$updateSQL=(&quot;UPDATE Tblstudent SET (fldstudName=siva,fldstudmark=100) WHERE fldstudid=2&quot;); </li></ul>
  16. 20. 6.DROP Command <ul><li>The Drop command is used to delete all the records in a table using the table name as shown below: </li></ul><ul><li>Syntax: </li></ul><ul><li>$dropSQL=(&quot;DROP tblName&quot;); </li></ul><ul><li>Example: </li></ul><ul><li>$dropSQL=(&quot;DROP tblstudent&quot;); </li></ul>
  17. 21. ADVANTAGES <ul><li>very fast </li></ul><ul><li>reliable and easy to use </li></ul><ul><li>multi-threaded multi-user and robust SQL database server. </li></ul>
  18. 22. DISADVANTAGES <ul><li>Missing Sub-selects. </li></ul><ul><li>MySQL doesn't yet support the Oracle SQL extension: i SELECT ... INTO TABLE , but supports INSERT INTO ... SELECT .. </li></ul><ul><li>Does not support Stored Procedures and Triggers. </li></ul><ul><li>MySQL doesn't support views, but this is on the TODO. </li></ul>
  19. 23. Thank you
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×