What is SQL? Learn SQL Database Server

You are currently viewing What is SQL? Learn SQL Database Server

SQL stands for Structured Query Language. SQL is used for relational databases, SQL is database management language. SQL is not a programming language. SQL is utilized to speak with a database. As per ANSI, it is the standard language specially used for the (RDMS)relational database management systems. SQL statements are utilized to perform tasks, for example, update information on a database or recover data from a database. Some basic relational database management systems that utilization SQL are Oracle, Sybase, Microsoft SQL Server, Access, Ingres, and etc. In any case, the standard SQL commands, for example, “Select”, “Addition”, “Update”, “Erase”, “Make”, and “Drop” can be used to achieve nearly everything that one needs to do with a database.

What is SQL Server?

The SQL Server is developed by Microsoft, SQL Server is the relational database management system. 1.0 version of the SQL server was released in 1989 by Microsoft and Sybase. The partnership ended in the early 1990s between these two companies. If your SQL slow then you have need to improve the SQL Performance. Within SQL Server there are a variety of topics such as architecture and internals that require their own subject of study. So if you are really interested in training in SQL servers it is something you will need to be aware of.

SQL Server Architecture

sql

SQL Server Management Studio(SSMS)

SQL management studio is a free window software that is used to manage the SQL server. Use SSMS to get to, design, oversee, direct, and build up all segments of SQL Server, Azure SQL Database, and SQL Data Warehouse. SSMS gives a solitary exhaustive utility that consolidates a general gathering of graphical apparatuses with various rich content editors to give access to SQL Server to designers and database heads of all expertise levels.

Setting Up Work Environment for SQL

On the off chance that you have no DBMS (Database Management System) as of now introduced on your system, you have a few choices to look over. You can introduce a free, open-source DBMS. MySQL is the most famous and generally bolstered open-source database on the board system. It is anything but difficult to download and utilize and accessible for the two Windows and Linux (or UNIX) working frameworks. You can download it free from here: https://dev.mysql.com/downloads/mysql/

You can likewise introduce SQL Server Express. It is a free form of Microsoft SQL Server which permits up to 10GB of database stockpiling. You can download the express version from here: https://www.microsoft.com/en-in/download/details.aspx?id=30438

If you are planning to develop your application in PHP and MySQL then for this you can install XAMPP and WampServer from here: http://www.wampserver.com/en/.

SQL Syntax

SELECT emp_name, hire_date, salary FROM employees WHERE salary > 5000;

 SELECT. this mean select emp_name and hire_date and salary from the employes table next is the condition part mean select those employees have a salary above 5000. and the semicolon ( ; ) is used to terminate the command.

SELECT * FROM employees;

This command means to select all fields from the employees’ table. ( * ) is used when we need to select all data or all fields from the table.

Creating a Database

Before doing anything with the data we should need to make a database first. We’re accepting that you as of now have a MySQL, or SQL Server accessible for your use, just as you’ve all the necessary privileges. After when you have SQL Server run this statement for creating a new database.

CREATE DATABASE database_name;

Creating a Table

After creating the database then you have to need to create the table in the database. The table is the collection of Columns and rows. The following statement is used for creating the table.

CREATE TABLE table_name (
    column1_name data_type constraints,
    column2_name data_type constraints,
    ....
);

CREATE TABLE is used to create the table next is the table name and in the brackets (_) , you need to describe your fields of the table. The first name of the field then types of this field.

Example

-- Syntax for MySQL Database 
CREATE TABLE persons (
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(50) NOT NULL,
    birth_date DATE,
    phone VARCHAR(15) NOT NULL UNIQUE
);
 
-- Syntax for SQL Server Database 
CREATE TABLE persons (
    id INT NOT NULL PRIMARY KEY IDENTITY(1,1),
    name VARCHAR(50) NOT NULL,
    birth_date DATE,
    phone VARCHAR(15) NOT NULL UNIQUE
);

Visit the database tutorial list. And make strong your database concept. click here. wuschools.com is always written about the database concept for the database lover. Ang writes about how database makes your life easy if you are a web site developer.

Leave a Reply