MySQL
What MySQL exactly is??
MySQL is an open source RDBMS
Now whats dis RDBMS
Allows u to access and manipulate data within their databases, protect the data from corruption and inconsistence
Difference b/w DBMS and RDBMS
RDBMS is specific to relational databases and it not only supports storage of data in table like structure but also relationships b/w those tables
Why MySQL...
- Open source
- Written in C & C++
- Multi threaded application
- Platform Independent
Where MySQL...
Downloading and Installing...
- You can download from http://dev.mysql.com/downloads/
- Followed by simple installation process
Managing Databases...
- Creating
- Modifying
- Deleting
Creating database
Syntax : create database <databasename>;
>>>create database sfd;
Using database
Syntax : use <databasename>;
>>> use sfd;
Deleting database
Syntax : drop <databasename>;
drop sfd;
Creating table
Syntax : create table<tablename>(
<columnname1> <datatype>(<size>) <constraints>
..............
.............);
Managing Tables...
- Creating
- Modifying
- Deleting
Constraints
- Primary key
- Foreign key
- Unique
- Not Null
- Default
- Check
Some basic commands...
- create : to create
- delete : to delete
- drop : to remove
- select : used to view the data in the table
- update: to update the data in any existing column
- insert: to insert a new row
- alter : to add a new column or modify the existing one
Clauses of Select statement
- Where
- Group By
- Having
- Order By
Functions in MySQL...
String Functions...
- ASCII()
- LENGTH()
- CONCAT()
- INSTR()
- LCASE()
- UCASE()
- REVERSE()
- SUBSTR()
Numeric Functions ...
- MOD()
- POW()
- ROUND()
- TRUNCATE()
- SQRT()
Date and Time Functions ...
- CURDATE()
- NOW()
- DATE()
- MONTH()
- YEAR()
- DAY()
- DAYOFMONTH()
Summary Functions ...
- AVG()
- SUM()
- MIN()
- MAX()
- COUNT()
Connecting MySQL...
- PHP Application
- JAVA Application
- JAVA Web Application
- ASP.NET/C# Appliaction
FURTHER REFRENCES
- http://www.sqlcourse.com
- http://www.youtube.com
- https://www.mysql.com
mysql
By Pulkit Goyal
mysql
- 980