sql training institute in ambala ! batra computer centre

29
SQL TRAINING IN AMBALA

Upload: jatin-batra

Post on 11-Apr-2017

77 views

Category:

Education


1 download

TRANSCRIPT

Page 1: SQL Training Institute in Ambala ! Batra Computer Centre

SQL TRAINING IN AMBALA

Page 2: SQL Training Institute in Ambala ! Batra Computer Centre

What we Learn TodayWhat is SQLWhy SQLBrief History of SQLSQL Commands Types:• DDL• DML• DCL

What is Database

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

1

Advantages of DatabaseTables in databaseOperations on Tables:

• Create• Insert• Display• Delete record• Update• Alter• Delete table

Page 3: SQL Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

2

Page 4: SQL Training Institute in Ambala ! Batra Computer Centre

What is SQL• SQL (Structured Query Language) is a

standardized programming language used for managing relational databases and performing various operations on the data in them. Initially created in the 1970s, SQL is regularly used by database administrators, as well as by developers writing data integration scripts and data analysts looking to set up and run analytical queries.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

3

Page 5: SQL Training Institute in Ambala ! Batra Computer Centre

Why SQLSQL is widely popular because it offers the following advantages: Allows users to access data in the relational database management

systems. Allows users to describe the data. Allows users to define the data in a database and manipulate that

data. Allows to embed within other languages using SQL modules, libraries

& pre-compilers.

Allows users to create and drop databases and tables. Allows users to create view, stored procedure, functions in a database. Allows users to set permissions on tables, procedures and views

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

4

Page 6: SQL Training Institute in Ambala ! Batra Computer Centre

A Brief History of SQL 1970 – Dr. Edgar F. "Ted" Codd of IBM is known as the

father of relational databases. He described a relational model for databases.

1974 – Structured Query Language appeared. 1978 – IBM worked to develop Codd's ideas and

released a product named System/R. 1986 – IBM developed the first prototype of

relational database and standardized by ANSI. The first relational database was released by Relational Software which later came to be known as Oracle

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

5

Page 7: SQL Training Institute in Ambala ! Batra Computer Centre

SQL CommandsThe standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into the following groups based on their nature:DDl – Data Definition LanguageDML – Data Manipulation LanguageDCL – Data Control Language

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

6

Page 8: SQL Training Institute in Ambala ! Batra Computer Centre

Data Definition Language

Data Definition Language (DDL) is a standard for commands that define the different structures in a database. DDL statements create, modify, and remove database objects such as tables, indexes, and users. Common DDL statements are CREATE, ALTER, and DROP.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

7

Page 9: SQL Training Institute in Ambala ! Batra Computer Centre

Commands In DDL

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

8

Command DescriptionCREATE Creates a new table, a view table, or other

object in the database.

ALTER Modifies an existing database object, such as a table

DROP Deletes an entire table, a view table or other objects in the database.

Page 10: SQL Training Institute in Ambala ! Batra Computer Centre

Data Manipulation Language

DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database. Examples: SELECT, UPDATE, INSERT statements. DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

9

Page 11: SQL Training Institute in Ambala ! Batra Computer Centre

Commands In DMLCommand Description

SELECT Retrieves certain records from one or more tables

INSERT Creates a record or insert values in existing or new table.

UPDATE Modifies the existing record.

DELETE Delete records

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

10

Page 12: SQL Training Institute in Ambala ! Batra Computer Centre

Data Control LanguageA data control language (DCL) is a syntax similar to a computer programming language used to control access to data stored in a database (Authorization). In particular, it is a component of Structured Query Language (SQL). Examples of DCL commands include: GRANT to allow specified users to perform specified tasks.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

11

Page 13: SQL Training Institute in Ambala ! Batra Computer Centre

Commands In DCL

Command Description

GRANT Gives a privileges to user.

REVOKE Takes back privileges granted from user.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

12

Page 14: SQL Training Institute in Ambala ! Batra Computer Centre

What is Database A database management system (DBMS) is

system software for creating and managing databases.

A database is a collection of information that is organized so that it can be easily accessed, managed and updated.

Data is organized into rows, columns and tables, and it is indexed to make it easier to find relevant information.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

13

Page 15: SQL Training Institute in Ambala ! Batra Computer Centre

Example Of Database

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

14

Page 16: SQL Training Institute in Ambala ! Batra Computer Centre

Advantages of Database• Data abstraction and independence• Data security• A locking mechanism for concurrent access• An efficient handler to balance the needs of multiple applications

using the same data• The ability to swiftly recover from crashes and errors, including

restartability and recoverability• Robust data integrity capabilities• Logging and auditing of activity• Simple access using a standard application programming interface

(API)• Uniform administration procedures for data

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

15

Page 17: SQL Training Institute in Ambala ! Batra Computer Centre

Table in a databaseA table is a data structure that organizes information into rows and columns. It can be used to both store and display data in a structured format.• For example, database store data in tables so

that information can be quickly accessed from specific rows.

• Websites often use tables to display multiple rows of data on page.

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

16

Page 18: SQL Training Institute in Ambala ! Batra Computer Centre

Example of Tables

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

17

Page 19: SQL Training Institute in Ambala ! Batra Computer Centre

Commands used in MySQL

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

18

Page 20: SQL Training Institute in Ambala ! Batra Computer Centre

How to create new Table

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

19

Page 21: SQL Training Institute in Ambala ! Batra Computer Centre

Example

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

20

Page 22: SQL Training Institute in Ambala ! Batra Computer Centre

Insert & Display Operation

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

21

Page 23: SQL Training Institute in Ambala ! Batra Computer Centre

Delete Operation

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

22

Page 24: SQL Training Institute in Ambala ! Batra Computer Centre

Update Operation

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

23

Page 25: SQL Training Institute in Ambala ! Batra Computer Centre

Alter Operation

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

24

Page 26: SQL Training Institute in Ambala ! Batra Computer Centre

Delete Table from Database

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

25

Page 27: SQL Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

26

Page 28: SQL Training Institute in Ambala ! Batra Computer Centre

CONTACT US

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

27

BATRA COMPUTER CENTRE

SCO 15, Dayal Bagh, Near Hanuman Mandir, Ambala Cantt. Phn No.: 9729666670,0171-4000670 Email: [email protected] Website: www.batracomputercentre.com

Page 29: SQL Training Institute in Ambala ! Batra Computer Centre

Ph. No. :9729666670,4000670 Website: www.batracomputercentre.com

28