PL-MYSQL BASIC

7 Likes Comment

WHAT IS DATABASE PROGRAMMING?
Software that is used to manage data and information structured as fields, records and files.
A database program is the heart of a business information system and provides file creation, data entry, update, query and reporting functions.

DATABASE LANGUAGE
A Database language has Data Definition Language(DDL), which is used to construct a database.
Data Manipulation Language (DML), which is used to access a database.
DDL implements database schema at the physical, logical and external level.
DML provides the statements to retrieve, modify, insert and delete the data from the database.

IS SQL A DATABASE?

SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database.

All the Relational Database Management Systems(RDBMS) like MySQL, MS Access, Oracle, and SQL server use SQL as their standard database language.

SQL

Structured Query Language (SQL) is a domain-specific language used to manage relational databases and manipulate the data stored inside them.
Developers use SQL statements to perform tasks in SQL Server, MySQL, Oracle, Access, MatiaDB and PostgreSQL and other popular databases.

SQL LANGUAGE
DML:
Select, Insert, Update, Delete
DDL:
Create, Alter, Drop
DCL:
Grant, Revoke
TCL:
Begin, Tran, Commit, Rollback

DDL
A DDL is a language used to define data structures and modify data.
DDL or Data Definition Language actually consists of SQL commands that can be used to define the database schema.
It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in the database.
For example, DDL commands can be used to add, remove, or modify tables with in a database.
EXAMPLES

DML
A data manipulation language (DML) is a computer programming language used for adding (inserting), deleting, and modifying (updating) data in a database.
A popular data manipulation language is that of Structured Query Language(SQL), which is used to retrieve and manipulate data in a relational database.
EXAMPLES

PROCEDURAL
in which the user specifies what data is needed and how to get it.
NON-PROCEDURAL
in which the user specifies only what data is needed.

DCL

EXAMPLES

BASIC STRUCTURE OF SQL

The basic structure of an SQL expression consists of three clauses:

AGGREGATE FUNCTIONS

An aggregate is a collection of people who happen to be at the same place at the same time but who have no other connection to one another.
EXAMPLE:

The people gathered in a restaurant on a particular evening are an example of an aggregate, not a group.

AGGREGATE FUNCTION IS SQL

COUNT counts how many rows are in a particular column.

SUM adds together all the values in a particular column.

MIN and MAX return the lowest and highest values in a particular column, respectively.

AVG calculates the average of a group of selected values.
NULL VALUES

The SQL NULL is the term used to represent a missing value. A NULL value in a table is a value in a field that appears to be blank. A field with a NULL value is a field with no value. It is different than a zero value or a field that contains space.

If a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value.
A Null value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation.

Check this

You might like

Saif

About the Author: Saif

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami