Udjuni.com

udjuni.com search:




SQL components


SQL is a language designed to create and maintain data in a relational database. There are many vendor specific versions of SQL, but underneath it all is the basic transact-SQL. In this basic language, we find what is commonly known in the database world as the "three SQL languages". These are:
  • Data Definition Language (DDL)
  • - This is the language structure that is used to define or create database objects such as tables, views, stored procedures, triggers and more. This language structure consists of three commands:

    CREATE - used to create objects
    ALTER - used to change the structure of an object
    DROP - used to delete an object

  • Data Manipulation Language (DML)
  • - This is the language structure that is used to manipulate or change the state of data in database tables. This language structure consists of four commands :

    INSERT - used to insert or add new data into a database table
    UPDATE - used to update or change table data
    DELETE - used to delete or remove data from a database table
    SELECT - used to retrieve data stored in database tables

  • Data Control Language (DCL)
- These is the language structure used to control how database tasks are performed and protect the database from harm, be it intentional or unintentional. This language consists of four commands:

COMMIT - used permanently store values used in a transaction into a database table.
ROLLBACK - used to reverse changes made to the table data during a transaction
GRANT - used to grant permissions to use database objects. For example, you can grant users permissions to view data from a certain table and not others. You can use this command to control who can perform what functions on your database.
REVOKE - used to take away granted permissions to perform certain database functions. For example, you granted permissions to user XYZ to delete data from table C. If for some reason, you wish to take away those permissions using the revoke command.


RELATED ARTICLES:


Common SQL Data types
Now that you have identified your data entities or tables, you have to define each attribute of the tables you have identified. These definitions include the name of the attribute and the type of data that can be stored in the field. Most relational database systems have a number of data types that

Selecting data from multiple tables
So far we have covered methods of retrieving data from single table. In real life however, you hardly get to only retrieve data from one table. In other words, to retrieve and interpret information, you normally get such information from different tables each of which will contain only information a

Updating and deleting data with SQL
In the posting “Introduction to SQL”, we covered the creation of data storage space or database and its entities. We then went a little further to cover a methods of entering data into those entities or tables and methods of retrieval. There are however, times when the data stored in

Java variables and data types
A variable is defined as a named piece of memory that a java program uses to store data. Each of these storage pieces can only store data of a certain type. In other words, if you defined as variable of type integer, that variable can only hold inte

Copying data from one table to the other
here are several ways to copy or move data from one table to another. Some methods are applicable when copying data from one table to another on the same database and other methods are applicable for copying data from one database to another and even or a different server. Bellow are several methods

PHP Flow control functions


PHP Flow control functions
Most scripts we have looked at so far are linear and flow only in one direction. For example we have looked at scripts that would take two numbers add them together and display the answer. In real world things hardly work that way. In most cases you are faced with different possibilities and

Did not find it? Try udjuni.com search:







© 2009 UdjunI LLC. All rights reserved | Privacy policy | Tutorial Index | RSS Feed