raj mysql
DESCRIPTION
TRANSCRIPT
- 1. MySQL Presented by Rajesh
2. WHAT IS MYSQL
- MySQLis a database management system.
- MySQLis a relational database management system.
- MySQLis Open Source Software.
3. THE IDEA
- Client PCmysql clientmysql
- Server PCMySQLServersafe_mysqld
- QUERY
- RESPONSE
- Separate the logical part of the queries from the implementationlogicalgly, and phisically.
4. 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 nameMySQL The directories "myMonty's daughter My
5. MAIN SUPPORTED PLATFORMS
- First developed forSolarisand RedHatLinux .
- FreeBSD.
- OpenBSD.
- Mac OS X Server.
- Win95, Win98, NT, and Win2000.
- All modern systems with working Posixthreads and a C++ compiler.
6. 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.
7. 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 &
8. 9. 10. 11.
- TO configure MY& SQL:
- MySQL was successfully installed. Now we want to configure it. Leave the check box "Configure the MySQL Server Now" checked, and click "Next>". After you do that, you should see a window that looks like this:
12. 13. BASIC COMMANDS OF MYSQL 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=("CREATE TABLE tblName"); Example: $createSQL=("CREATE TABLE tblstudent(fldstudid int(10) NOTNULL AUTO_INCREMENT PRIMARY KEY,fldstudName VARCHAR(250) NOTNULL,fldstudentmark int(4) DEFAULT '0' "); 15. Example: $createSQL=("CREATE TABLE tblstudent(fldstudid int(10) NOTNULL AUTO_INCREMENT PRIMARY KEY,fldstudName VARCHAR(250) NOTNULL,fldstudentmark int(4) DEFAULT '0' "); 16. 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=("SELECT field_names FROM tablename");
- Example:
- $selectSQL=("SELECT * FROM tblstudent");
17. 3.DELETE COMMAND
- The Delete command is used to delete the records from a table using conditions as shown below:
- Syntax:
- $deleteSQL=("DELETE * FROM tablename WHERE condition");
- Example:
- $deleteSQL=("DELETE * FROM tblstudent WHERE fldstudid=2");
18. 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=("INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) ");
- Example:
- $insertSQL=("INSERT INTO Tblstudent(fldstudName,fldstudmark)VALUES(Baskar,75) ");
19. 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=("UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber")
- Example:
- $updateSQL=("UPDATE Tblstudent SET (fldstudName=siva,fldstudmark=100) WHERE fldstudid=2");
20. 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=("DROP tblName");
- Example:
- $dropSQL=("DROP tblstudent");
21. ADVANTAGES
- very fast
- reliable and easy to use
- multi-threaded multi-user and robust SQLdatabase server.
22. 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.
23. Thank you