Your Ad Here
Welcome To Mega Star Party,Megafans,Chiru&Pawanfans, Ram Charanfans Site
Featured Blogs: Related To Naidu Community

Friday, May 15, 2009

SQL INNER JOIN Keyword

SQL LEFT JOIN Keyword :

The LEFT JOIN keyword returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2).

SQL LEFT JOIN Syntax :

SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name

PS: In some databases LEFT JOIN is called LEFT OUTER JOIN.
----------------------------------

SQL LEFT JOIN Example :
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

The "Orders" table:

O_Id OrderNo P_Id
------------------
1 77895 3
2 44678 3
3 22456 1
4 24562 1
5 34764 15

Now we want to list all the persons and their orders - if any, from the tables above.

We use the following SELECT statement:

SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
LEFT JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

The result-set will look like this:

LastName FirstName OrderNo
--------------------------
Hansen Ola 22456
Hansen Ola 24562
Pettersen Kari 77895
Pettersen Kari 44678
Svendson Tove

The LEFT JOIN keyword returns all the rows from the left table (Persons), even if there are no matches in the right table (Orders).

SQL INNER JOIN Keyword

SQL INNER JOIN Keyword :

The INNER JOIN keyword return rows when there is at least one match in both tables.

SQL INNER JOIN Syntax :

SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name

PS: INNER JOIN is the same as JOIN.
---------------------------------

SQL INNER JOIN Example :

The "Persons" table:

P_Id LastName FirstName Address City
-----------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

The "Orders" table:

O_Id OrderNo P_Id
-----------------
1 77895 3
2 44678 3
3 22456 1
4 24562 1
5 34764 15

Now we want to list all the persons with any orders.

We use the following SELECT statement:

SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
INNER JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

The result-set will look like this:

LastName FirstName OrderNo
--------------------------
Hansen Ola 22456
Hansen Ola 24562
Pettersen Kari 77895
Pettersen Kari 44678

SQL Joins

SQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables.
-------------------------------------------

SQL JOIN :

The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables.

Tables in a database are often related to each other with keys.

A primary key is a column (or a combination of columns) with a unique value for each row. Each primary key value must be unique within the table. The purpose is to bind data together, across tables, without repeating all of the data in every table.

Look at the "Persons" table:

P_Id LastName FirstName Address City
---------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Note that the "P_Id" column is the primary key in the "Persons" table. This means that no two rows can have the same P_Id. The P_Id distinguishes two persons even if they have the same name.

Next, we have the "Orders" table:

O_Id OrderNo P_Id
-------------------
1 77895 3
2 44678 3
3 22456 1
4 24562 1
5 34764 15

Note that the "O_Id" column is the primary key in the "Orders" table and that the "P_Id" column refers to the persons in the "Persons" table without using their names.

Notice that the relationship between the two tables above is the "P_Id" column.
-------------------

Different SQL JOINs :

Before we continue with examples, we will list the types of JOIN you can use, and the differences between them.

JOIN: Return rows when there is at least one match in both tables

LEFT JOIN: Return all rows from the left table, even if there are no matches in the right table

RIGHT JOIN: Return all rows from the right table, even if there are no matches in the left table

FULL JOIN: Return rows when there is a match in one of the tables

SQL Alias

With SQL, an alias name can be given to a table or to a column.
----------------------------

SQL Alias :

You can give a table or a column another name by using an alias. This can be a good thing to do if you have very long or complex table names or column names.

An alias name could be anything, but usually it is short.

SQL Alias Syntax for Tables :

SELECT column_name(s)
FROM table_name
AS alias_name

SQL Alias Syntax for Columns :

SELECT column_name AS alias_name
FROM table_name
----------------------------------
Alias Example :

Assume we have a table called "Persons" and another table called "Product_Orders". We will give the table aliases of "p" an "po" respectively.

Now we want to list all the orders that "Ola Hansen" is responsible for.

We use the following SELECT statement:

SELECT po.OrderID, p.LastName, p.FirstName
FROM Persons AS p,
Product_Orders AS po
WHERE p.LastName='Hansen'
WHERE p.FirstName='Ola'

The same SELECT statement without aliases:

SELECT Product_Orders.OrderID, Persons.LastName, Persons.FirstName
FROM Persons,
Product_Orders
WHERE Persons.LastName='Hansen'
WHERE Persons.FirstName='Ola'

As you'll see from the two SELECT statements above; aliases can make queries easier to both write and to read.

SQL BETWEEN Operator

The BETWEEN operator is used in a WHERE clause to select a range of data between two values.
-------------------------------

The BETWEEN Operator :

The BETWEEN operator selects a range of data between two values. The values can be numbers, text, or dates.

SQL BETWEEN Syntax :

SELECT column_name(s)
FROM table_name
WHERE column_name
BETWEEN value1 AND value2
---------------------------------

BETWEEN Operator Example
The "Persons" table:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select the persons with a last name alphabetically between "Hansen" and "Pettersen" from the table above.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE LastName
BETWEEN 'Hansen' AND 'Pettersen'

The result-set will look like this:

P_Id LastName FirstName Address City
-----------------------------------
1 Hansen Ola Timoteivn 10 Sandnes

Note: The BETWEEN operator is treated differently in different databases.

In some databases, persons with the LastName of "Hansen" or "Pettersen" will not be listed, because the BETWEEN operator only selects fields that are between and excluding the test values).

In other databases, persons with the LastName of "Hansen" or "Pettersen" will be listed, because the BETWEEN operator selects fields that are between and including the test values).

And in other databases, persons with the LastName of "Hansen" will be listed, but "Pettersen" will not be listed (like the example above), because the BETWEEN operator selects fields between the test values, including the first test value and excluding the last test value.

Therefore: Check how your database treats the BETWEEN operator.
-----------------------------------

Example 2 :

To display the persons outside the range in the previous example, use NOT BETWEEN:

SELECT * FROM Persons
WHERE LastName
NOT BETWEEN 'Hansen' AND 'Pettersen'

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

The IN Operator

The IN Operator :

The IN operator allows you to specify multiple values in a WHERE clause.

SQL IN Syntax :

SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)
-----------------------------------------
IN Operator Example
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select the persons with a last name equal to "Hansen" or "Pettersen" from the table above.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE LastName IN ('Hansen','Pettersen')

The result-set will look like this:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

SQL Wildcards

SQL wildcards can be used when searching for data in a database.
---------------------------------------------------------
SQL Wildcards :

SQL wildcards can substitute for one or more characters when searching for data in a database.

SQL wildcards must be used with the SQL LIKE operator.

With SQL, the following wildcards can be used:

Wildcard Description :

% A substitute for zero or more characters
_ A substitute for exactly one character
[charlist] Any single character in charlist
[^charlist]
or

[!charlist]
Any single character not in charlist
-------------------------------------

SQL Wildcard Examples :
We have the following "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
------------------------------------
Using the % Wildcard
Now we want to select the persons living in a city that starts with "sa" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City LIKE 'sa%'

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes

Next, we want to select the persons living in a city that contains the pattern "nes" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City LIKE '%nes%'

The result-set will look like this:

P_Id LastName FirstName Address City
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
-------------------------------------

Using the _ Wildcard
Now we want to select the persons with a first name that starts with any character, followed by "la" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE FirstName LIKE '_la'

The result-set will look like this:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes

Next, we want to select the persons with a last name that starts with "S", followed by any character, followed by "end", followed by any character, followed by "on" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE LastName LIKE 'S_end_on'

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
2 Svendson Tove Borgvn 23 Sandnes

-------------------------------------
Using the [charlist] Wildcard
Now we want to select the persons with a last name that starts with "b" or "s" or "p" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE LastName LIKE '[bsp]%'

The result-set will look like this:

P_Id LastName FirstName Address City
------------------------------------
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Next, we want to select the persons with a last name that do not start with "b" or "s" or "p" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE LastName LIKE '[!bsp]%'

The result-set will look like this:

P_Id LastName FirstName Address City
-----------------------------------
1 Hansen Ola Timoteivn 10 Sandnes

SQL LIKE Operator

The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.
--------------------------------
The LIKE Operator :

The LIKE operator is used to search for a specified pattern in a column.

SQL LIKE Syntax :

SELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern
--------------------------------

LIKE Operator Example :
The "Persons" table:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select the persons living in a city that starts with "s" from the table above.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City LIKE 's%'

The "%" sign can be used to define wildcards (missing letters in the pattern) both before and after the pattern.

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Next, we want to select the persons living in a city that ends with an "s" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City LIKE '%s'

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes

Next, we want to select the persons living in a city that contains the pattern "tav" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City LIKE '%tav%'

The result-set will look like this:

P_Id LastName FirstName Address City
------------------------------------
3 Pettersen Kari Storgt 20 Stavanger

It is also possible to select the persons living in a city that NOT contains the pattern "tav" from the "Persons" table, by using the NOT keyword.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City NOT LIKE '%tav%'

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes

SQL TOP Clause

The TOP Clause :
---------------------
The TOP clause is used to specify the number of records to return.

The TOP clause can be very useful on large tables with thousands of records. Returning a large number of records can impact on performance.

Note: Not all database systems support the TOP clause.

SQL Server Syntax :

SELECT TOP number|percent column_name(s)
FROM table_name

SQL SELECT TOP Equivalent in MySQL and Oracle

MySQL Syntax:

SELECT column_name(s)
FROM table_name
LIMIT number

Example :

SELECT *
FROM Persons
LIMIT 5

Oracle Syntax :

SELECT column_name(s)
FROM table_name
WHERE ROWNUM <= number

Example :

SELECT *
FROM Persons
WHERE ROWNUM <=5


------------------
SQL TOP Example :
The "Persons" table:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Tom Vingvn 23 Stavanger

Now we want to select only the two first records in the table above.

We use the following SELECT statement:

SELECT TOP 2 * FROM Persons

The result-set will look like this:

P_Id LastName FirstName Address City
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
---------------------------

SQL TOP PERCENT Example
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Tom Vingvn 23 Stavanger

Now we want to select only 50% of the records in the table above.

We use the following SELECT statement:

SELECT TOP 50 PERCENT * FROM Persons

The result-set will look like this:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes

Wednesday, May 13, 2009

SQL DELETE Statement

The DELETE statement is used to delete records in a table.
----------------------------
The DELETE Statement:
The DELETE statement is used to delete rows in a table.

SQL DELETE Syntax :
DELETE FROM table_name
WHERE some_column=some_value

"Note: Notice the WHERE clause in the DELETE syntax. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted! "
--------------------------
SQL DELETE Example :
The "Persons" table:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Johan Bakken 2 Stavanger
5 Tjessem Jakob Nissestien 67 Sandnes

Now we want to delete the person "Tjessem, Jakob" in the "Persons" table.

We use the following SQL statement:

DELETE FROM Persons
WHERE LastName='Tjessem' AND FirstName='Jakob'

The "Persons" table will now look like this:

P_Id LastName FirstName Address City
--------------------------------------4
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Johan Bakken 2 Stavanger

---------------------------------------
Delete All Rows :

It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact:

DELETE FROM table_name
or
DELETE * FROM table_name

"Note: Be very careful when deleting records. You cannot undo this statement!"

SQL UPDATE Statement

The UPDATE statement is used to update records in a table.
------------------------------
The UPDATE Statement :

The UPDATE statement is used to update existing records in a table.

SQL UPDATE Syntax :

UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value

"Note: Notice the WHERE clause in the UPDATE syntax. The WHERE clause specifies which record or records that should be updated. If you omit the WHERE clause, all records will be updated!"
-------------------------
SQL UPDATE Example :
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Johan Bakken 2 Stavanger
5 Tjessem Jakob

Now we want to update the person "Tjessem, Jakob" in the "Persons" table.

We use the following SQL statement:

UPDATE Persons
SET Address='Nissestien 67', City='Sandnes'
WHERE LastName='Tjessem' AND FirstName='Jakob'

The "Persons" table will now look like this:

P_Id LastName FirstName Address City
--------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Johan Bakken 2 Stavanger
5 Tjessem Jakob Nissestien 67 Sandnes
--------------------------------------

"SQL UPDATE Warning"
Be careful when updating records. If we had omitted the WHERE clause in the example above, like this:

UPDATE Persons
SET Address='Nissestien 67', City='Sandnes'

The "Persons" table would have looked like this:

P_Id LastName FirstName Address City
--------------------------------------
1 Hansen Ola Nissestien 67 Sandnes
2 Svendson Tove Nissestien 67 Sandnes
3 Pettersen Kari Nissestien 67 Sandnes
4 Nilsen Johan Nissestien 67 Sandnes
5 Tjessem Jakob Nissestien 67 Sandnes

SQL INSERT INTO Statement

The INSERT INTO statement is used to insert new records in a table.
-------------------------------
The INSERT INTO Statement :

The INSERT INTO statement is used to insert a new row in a table.

SQL INSERT INTO Syntax:

It is possible to write the INSERT INTO statement in two forms.

The first form doesn't specify the column names where the data will be inserted, only their values:

INSERT INTO table_name
VALUES (value1, value2, value3,...)

The second form specifies both the column names and the values to be inserted:

INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)


-----------------------------------
SQL INSERT INTO Example :
We have the following "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to insert a new row in the "Persons" table.

We use the following SQL statement:

INSERT INTO Persons
VALUES (4,'Nilsen', 'Johan', 'Bakken 2', 'Stavanger')

The "Persons" table will now look like this:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Johan Bakken 2 Stavanger

-------------------------------------
Insert Data Only in Specified Columns :
It is also possible to only add data in specific columns.

The following SQL statement will add a new row, but only add data in the "P_Id", "LastName" and the "FirstName" columns:

INSERT INTO Persons (P_Id, LastName, FirstName)
VALUES (5, 'Tjessem', 'Jakob')

The "Persons" table will now look like this:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Johan Bakken 2 Stavanger
5 Tjessem Jakob

SQL ORDER BY Keyword

The ORDER BY keyword is used to sort the result-set.
--------------------------------------------------------------------------------

The ORDER BY Keyword :

The ORDER BY keyword is used to sort the result-set by a specified column.

The ORDER BY keyword sort the records in ascending order by default.

If you want to sort the records in a descending order, you can use the DESC keyword.

SQL ORDER BY Syntax :

SELECT column_name(s)
FROM table_name
ORDER BY column_name(s) ASC|DESC
---------------------

ORDER BY Example :
The "Persons" table:

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Tom Vingvn 23 Stavanger

Now we want to select all the persons from the table above, however, we want to sort the persons by their last name.

We use the following SELECT statement:

SELECT * FROM Persons
ORDER BY LastName

The result-set will look like this:

P_Id LastName FirstName Address City
--------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
4 Nilsen Tom Vingvn 23 Stavanger
3 Pettersen Kari Storgt 20 Stavanger
2 Svendson Tove Borgvn 23 Sandnes


--------------------------------------
ORDER BY DESC Example:

Now we want to select all the persons from the table above, however, we want to sort the persons descending by their last name.

We use the following SELECT statement:

SELECT * FROM Persons
ORDER BY LastName DESC

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
4 Nilsen Tom Vingvn 23 Stavanger
1 Hansen Ola Timoteivn 10 Sandnes

SQL AND & OR Operators

The AND & OR operators are used to filter records based on more than one condition.

----------------------------------

The AND & OR Operators :

The AND operator displays a record if both the first condition and the second condition is true.

The OR operator displays a record if either the first condition or the second condition is true.


---------------------------------

AND Operator Example :
The "Persons" table:

P_Id LastName FirstName Address City
--------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select only the persons with the first name equal to "Tove" AND the last name equal to "Svendson":

We use the following SELECT statement:

SELECT * FROM Persons
WHERE FirstName='Tove'
AND LastName='Svendson'

The result-set will look like this:

P_Id LastName FirstName Address City
-----------------------------------
2 Svendson Tove Borgvn 23 Sandnes


------------------------------------

OR Operator Example :
Now we want to select only the persons with the first name equal to "Tove" OR the first name equal to "Ola":

We use the following SELECT statement:

SELECT * FROM Persons
WHERE FirstName='Tove'
OR FirstName='Ola'

The result-set will look like this:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes


------------------------------------

Combining AND & OR :

You can also combine AND and OR (use parenthesis to form complex expressions).

Now we want to select only the persons with the last name equal to "Svendson" AND the first name equal to "Tove" OR to "Ola":

We use the following SELECT statement:

SELECT * FROM Persons WHERE
LastName='Svendson'
AND (FirstName='Tove' OR FirstName='Ola')

The result-set will look like this:

P_Id LastName FirstName Address City
-------------------------------------
2 Svendson Tove Borgvn 23 Sandnes

SQL WHERE Clause

The WHERE clause is used to extract only those records that fulfill a specified criterion.

SQL WHERE Syntax :
-------------------
SELECT column_name(s)
FROM table_name
WHERE column_name operator value

WHERE Clause Example
---------------------
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select only the persons living in the city "Sandnes" from the table above.

We use the following SELECT statement:
-------------------------------------
SELECT * FROM Persons
WHERE City='Sandnes'

The result-set will look like this:
-------------------------------------
P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes

Quotes Around Text Fields:
----------------------------
SQL uses single quotes around text values (most database systems will also accept double quotes).

Although, numeric values should not be enclosed in quotes.

For text values:
------------------

This is correct:

SELECT * FROM Persons WHERE FirstName='Tove'

This is wrong:

SELECT * FROM Persons WHERE FirstName=Tove

For numeric values:
--------------------

This is correct:

SELECT * FROM Persons WHERE Year=1965

This is wrong:

SELECT * FROM Persons WHERE Year='1965'

Operators Allowed in the WHERE Clause
-------------------------------------
With the WHERE clause, the following operators can be used:

Operator Description
= Equal
<> Not equal
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
BETWEEN Between an inclusive range
LIKE Search for a pattern
IN If you know the exact value you want to return for at least one of the columns

"Note: In some versions of SQL the <> operator may be written as !="

SQL SELECT DISTINCT Statement

The SQL SELECT DISTINCT Statement
----------------------------------
In a table, some of the columns may contain duplicate values. This is not a problem, however, sometimes you will want to list only the different (distinct) values in a table.

The DISTINCT keyword can be used to return only distinct (different) values.

SQL SELECT DISTINCT Syntax
----------------------------
SELECT DISTINCT column_name(s)
FROM table_name

SELECT DISTINCT Example
------------------------
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
-----------------------------------
2 Svendson Tove Borgvn 23 Sandnes
------------------------------------
3 Pettersen Kari Storgt 20 Stavanger
--------------------------------------
Now we want to select only the distinct values from the column named "City" from the table above.

We use the following SELECT statement:
--------------------------------------
SELECT DISTINCT City FROM Persons

The result-set will look like this:
-----------------------------------
City
Sandnes
Stavanger
------------------------------------

SQL SELECT Statement

The SQL SELECT Statement
------------------------
The SELECT statement is used to select data from a database.

The result is stored in a result table, called the result-set.

SQL SELECT Syntax
------------------
SELECT column_name(s)
FROM table_name

and

SELECT * FROM table_name

An SQL SELECT Example
----------------------
The "Persons" table:

P_Id LastName FirstName Address City
------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
-----------------------------------
2 Svendson Tove Borgvn 23 Sandnes
-----------------------------------
3 Pettersen Kari Storgt 20 Stavanger
------------------------------------
Now we want to select the content of the columns named "LastName" and "FirstName" from the table above.

We use the following SELECT statement:
--------------------------------------
SELECT LastName,FirstName FROM Persons

The result-set will look like this:
-----------------------------------
LastName FirstName
------------------
Hansen Ola
-----------------
Svendson Tove
-----------------
Pettersen Kari
----------------

SELECT * Example
------------------
Now we want to select all the columns from the "Persons" table.

We use the following SELECT statement:
--------------------------------------

SELECT * FROM Persons

Tip: The asterisk (*) is a quick way of selecting all columns!

The result-set will look like this:
------------------------------------

P_Id LastName FirstName Address City
-------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
-------------------------------------
2 Svendson Tove Borgvn 23 Sandnes
------------------------------------
3 Pettersen Kari Storgt 20 Stavanger
------------------------------------

SQL Syntax

Database Tables
A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data.
Below is an example of a table called "Persons":
P_Id LastName FirstName Address City
------------------------------------------
1 Hansen Ola Timoteivn 10 Sandnes
------------------------------------------
2 Svendson Tove Borgvn 23 Sandnes
------------------------------------------
3 Pettersen Kari Storgt 20 Stavanger
------------------------------------------
The table above contains three records (one for each person) and five columns (P_Id, LastName, FirstName, Address, and City).

SQL Statements
--------------
Most of the actions you need to perform on a database are done with SQL statements.

The following SQL statement will select all the records in the "Persons" table:

SELECT * FROM Persons

Keep in Mind That...
----------------------
SQL is not case sensitive

Semicolon after SQL Statements?
--------------------------------
Some database systems require a semicolon at the end of each SQL statement.

Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.

We are using MS Access and SQL Server 2000 and we do not have to put a semicolon after each SQL statement, but some database programs force you to use it.

SQL DML and DDL
SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL).

The query and update commands form the DML part of SQL:
-------------------------------------------------------
SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
The DDL part of SQL permits database tables to be created or deleted. It also define indexes (keys), specify links between tables, and impose constraints between tables. The most important DDL statements in SQL are:

CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index

SQL Introduction

SQL is a standard language for accessing and manipulating databases.


--------------------------------------------------------------------------------

What is SQL?
SQL stands for Structured Query Language
SQL lets you access and manipulate databases
SQL is an ANSI (American National Standards Institute) standard

--------------------------------------------------------------------------------

What Can SQL do?
SQL can execute queries against a database
SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
SQL can create new tables in a database
SQL can create stored procedures in a database
SQL can create views in a database
SQL can set permissions on tables, procedures, and views

--------------------------------------------------------------------------------

SQL is a Standard - BUT....
Although SQL is an ANSI (American National Standards Institute) standard, there are many different versions of the SQL language.

However, to be compliant with the ANSI standard, they all support at least the major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.

Note: Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard!


--------------------------------------------------------------------------------

Using SQL in Your Web Site
To build a web site that shows some data from a database, you will need the following:

An RDBMS database program (i.e. MS Access, SQL Server, MySQL)
A server-side scripting language, like PHP or ASP
SQL
HTML / CSS

--------------------------------------------------------------------------------

RDBMS
RDBMS stands for Relational Database Management System.

RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.

The data in RDBMS is stored in database objects called tables.

A table is a collections of related data entries and it consists of columns and rows.

Wednesday, May 6, 2009

VBScript Keywords

Keyword&Description
-----------------------
empty(Keyword):
Used to indicate an uninitialized variable value. A variable value is uninitialized when it is first created and no value is assigned to it, or when a variable value is explicitly set to empty.

Example:
dim x 'the variable x is uninitialized!
x="ff" 'the variable x is NOT uninitialized anymore
x=empty 'the variable x is uninitialized!

Note: This is not the same as Null!!

isEmpty(Keyword):
Used to test if a variable is uninitialized.
Example: If (isEmpty(x)) 'is x uninitialized?

is nothing(Keyword):
Used to test if a value is an initialized object.
Example: If (myObject Is Nothing) 'is it unset?

Note: If you compare a value to Nothing, you will not get the right result! Example: If (myObject = Nothing) 'always false!

null(Keyword):
Used to indicate that a variable contains no valid data.
One way to think of Null is that someone has explicitly set the value to "invalid", unlike Empty where the value is "not set".

Note: This is not the same as Empty or Nothing!!

Example: x=Null 'x contains no valid data

isNull(Keyword):
Used to test if a value contains invalid data.
Example: if (isNull(x)) 'is x invalid?

true(Keyword):
Used to indicate a Boolean condition that is correct (true has a value of -1)
false Used to indicate a Boolean condition that is not correct
(false has a value of 0)

VBScript Looping

Looping statements are used to run the same block of code a specified number of times.

In VBScript we have four looping statements:

For...Next statement - runs code a specified number of times
For Each...Next statement - runs code for each item in a collection or each element of an array
Do...Loop statement - loops while or until a condition is true
While...Wend statement - Do not use it - use the Do...Loop statement instead

----------------------

For...Next Loop
Use the For...Next statement to run a block of code a specified number of times.

The For statement specifies the counter variable (i), and its start and end values. The Next statement increases the counter variable (i) by one.

The Step Keyword
With the Step keyword, you can increase or decrease the counter variable by the value you specify.

In the example below, the counter variable (i) is INCREASED by two, each time the loop repeats.

For i=2 To 10 Step 2
some code
Next

To decrease the counter variable, you must use a negative Step value. You must specify an end value that is less than the start value.

In the example below, the counter variable (i) is DECREASED by two, each time the loop repeats.

For i=10 To 2 Step -2
some code
Next

Exit a For...Next
You can exit a For...Next statement with the Exit For keyword.

For Each...Next Loop
A For Each...Next loop repeats a block of code for each item in a collection, or for each element of an array

Do...Loop
If you don't know how many repetitions you want, use a Do...Loop statement.

The Do...Loop statement repeats a block of code while a condition is true, or until a condition becomes true.

Repeat Code While a Condition is True
You use the While keyword to check a condition in a Do...Loop statement.

Do While i>10
some code
Loop

If i equals 9, the code inside the loop above will never be executed.

Do
some code
Loop While i>10

The code inside this loop will be executed at least one time, even if i is less than 10.

Repeat Code Until a Condition Becomes True
You use the Until keyword to check a condition in a Do...Loop statement.

Do Until i=10
some code
Loop

If i equals 10, the code inside the loop will never be executed.

Do
some code
Loop Until i=10

The code inside this loop will be executed at least one time, even if i is equal to 10.

Exit a Do...Loop
You can exit a Do...Loop statement with the Exit Do keyword.

Do Until i=10
i=i-1
If i<10 Then Exit Do
Loop

The code inside this loop will be executed as long as i is different from 10, and as long as i is greater than 10.

VBScript Conditional Statements

Conditional statements are used to perform different actions for different decisions.

In VBScript we have four conditional statements:

if statement - executes a set of code when a condition is true
if...then...else statement - select one of two sets of lines to execute
if...then...elseif statement - select one of many sets of lines to execute
select case statement - select one of many sets of lines to execute

--------------------------------------------------------------------------------

If....Then.....Else
Use the If...Then...Else statement if you want to

execute some code if a condition is true
select one of two blocks of code to execute
If you want to execute only one statement when a condition is true, you can write the code on one line:

if i=10 Then msgbox "Hello"

There is no ..else.. in this syntax. You just tell the code to perform one action if a condition is true (in this case if i=10).

If you want to execute more than one statement when a condition is true, you must put each statement on separate lines, and end the statement with the keyword "End If":

if i=10 Then
msgbox "Hello"
i = i+1
end If

There is no ..else.. in the example above either. You just tell the code to perform multiple actions if the condition is true.

If you want to execute a statement if a condition is true and execute another statement if the condition is not true, you must add the "Else" keyword.

VBScript Procedures

In VBScript, there are two kinds of procedures:

Sub procedure
Function procedure

--------------------------------------------------------------------------------

VBScript Sub Procedures
A Sub procedure:

is a series of statements, enclosed by the Sub and End Sub statements
can perform actions, but does not return a value
can take arguments
without arguments, it must include an empty set of parentheses ()
Sub mysub()
some statements
End Sub

or

Sub mysub(argument1,argument2)
some statements
End Sub


--------------------------------------------------------------------------------

VBScript Function Procedures
A Function procedure:

is a series of statements, enclosed by the Function and End Function statements
can perform actions and can return a value
can take arguments that are passed to it by a calling procedure
without arguments, must include an empty set of parentheses ()
returns a value by assigning a value to its name
Function myfunction()
some statements
myfunction=some value
End Function

or

Function myfunction(argument1,argument2)
some statements
myfunction=some value
End Function


--------------------------------------------------------------------------------

How to Call a Procedure
The line below shows how to call a Function procedure:

carname=findname()

Here you call a Function called "findname", the Function returns a value that will be stored in the variable "carname".

Or, you can do like this:

msgbox "Your car is a " & findname()

Here you also call a Function called "findname", the Function returns a value that will be displayed in the message box.

When you call a Sub procedure you can use the Call statement, like this:

Call MyProc(argument)

Or, you can omit the Call statement, like this:

MyProc argument

VBScript Variables

VBScript Variables
--------------------------------
As with algebra, VBScript variables are used to hold values or expressions.

A variable can have a short name, like x, or a more descriptive name, like carname.

Rules for VBScript variable names:

Must begin with a letter
Cannot contain a period (.)
Cannot exceed 255 characters
In VBScript, all variables are of type variant, that can store different types of data.


--------------------------------------------------------------------------------

Declaring (Creating) VBScript Variables
Creating variables in VBScript is most often referred to as "declaring" variables.

You can declare VBScript variables with the Dim, Public or the Private statement. Like this:

dim x;
dim carname;

Now you have created two variables. The name of the variables are "x" and "carname".

You can also declare variables by using its name in a script. Like this:

carname=some value

Now you have also created a variable. The name of the variable is "carname". However, this method is not a good practice, because you can misspell the variable name later in your script, and that can cause strange results when your script is running.

If you misspell for example the "carname" variable to "carnime", the script will automatically create a new variable called "carnime". To prevent your script from doing this, you can use the Option Explicit statement. This statement forces you to declare all your variables with the dim, public or private statement.

Put the Option Explicit statement on the top of your script. Like this:

option explicit
dim carname
carname=some value


--------------------------------------------------------------------------------

Assigning Values to Variables
You assign a value to a variable like this:

carname="Volvo"
x=10

The variable name is on the left side of the expression and the value you want to assign to the variable is on the right. Now the variable "carname" has the value of "Volvo", and the variable "x" has the value of "10".


--------------------------------------------------------------------------------

Lifetime of Variables
How long a variable exists is its lifetime.

When you declare a variable within a procedure, the variable can only be accessed within that procedure. When the procedure exits, the variable is destroyed. These variables are called local variables. You can have local variables with the same name in different procedures, because each is recognized only by the procedure in which it is declared.

If you declare a variable outside a procedure, all the procedures on your page can access it. The lifetime of these variables starts when they are declared, and ends when the page is closed.


--------------------------------------------------------------------------------

VBScript Array Variables
An array variable is used to store multiple values in a single variable.

In the following example, an array containing 3 elements is declared:

dim names(2)

The number shown in the parentheses is 2. We start at zero so this array contains 3 elements. This is a fixed-size array. You assign data to each of the elements of the array like this:

names(0)="Tove"
names(1)="Jani"
names(2)="Stale"


Similarly, the data can be retrieved from any element using the index of the particular array element you want. Like this:

mother=names(0)

You can have up to 60 dimensions in an array. Multiple dimensions are declared by separating the numbers in the parentheses with commas. Here we have a two-dimensional array consisting of 5 rows and 7 columns:

dim table(4,6)

VBScript How To

The HTML


Example Explained
------------------
To insert a VBScript into an HTML page, we use the tells where the VBScript starts and ends:
<%--




--%>
The document.write command is a standard VBScript command for writing output to a page.

By entering the document.write command between the tags, the browser will recognize it as a VBScript command and execute the code line. In this case the browser will write Hello World! to the page:
<%--




--%>
How to Handle Simple Browsers
----------------------------------
Browsers that do not support VBScript, will display VBScript as page content.

To prevent them from doing this, the HTML comment tag should be used to "hide" the VBScript.

Just add an HTML comment tag (end of comment) after the last VBScript statement, like this:
<%--




--%>

VBScript Introduction

What You Should Already Know
--------------------------------
Before you continue you should have a basic understanding of the following:

1)HTML / XHTML
If you want to study these subjects first, find the tutorials on our Home page.


--------------------------------------------------------------------------------

What is VBScript?

2)VBScript is a scripting language
3)A scripting language is a lightweight programming language
4)VBScript is a light version of Microsoft's programming language Visual Basic

--------------------------------------------------------------------------------

How Does it Work?

When a VBScript is inserted into an HTML document, the Internet browser will read the HTML and interpret the VBScript. The VBScript can be executed immediately, or at a later event.

Friday, March 13, 2009

Independent of Operating Systems

Since web services use XML based protocols to communicate with other systems, web services are independent of both operating systems and programming languages.

An application calling a web service will always send its requests using XML, and get its answer returned as XML. The calling application will never be concerned about the operating system or the programming language running on the other computer.

Benefits of Web Services


• Easier to communicate between applications
• Easier to reuse existing services
• Easier to distribute information to more consumers
• Rapid development

Web services make it easier to communicate between different applications. They also make it possible for developers to reuse existing web services instead of writing new ones.

Web services can create new possibilities for many businesses because it provides an easy way to distribute information to a large number of consumers. One example could be flight schedules and ticket reservation systems.

XML Based Web Protocols

Web services use the standard web protocols HTTP, XML, SOAP, WSDL, and UDDI.

HTTP

HTTP (Hypertext Transfer Protocol) is the World Wide Web standard for communication over the Internet. HTTP is standardized by the World Wide Web Consortium (W3C).

XML

XML (eXtensible Markup Language) is a well known standard for storing, carrying, and exchanging data. XML is standardized by the W3C.

SOAP

SOAP (Simple Object Access Protocol) is a lightweight platform and language neutral communication protocol that allows programs to communicate via standard Internet HTTP. SOAP is standardized by the W3C.

WSDL

WSDL (Web Services Description Language) is an XML-based language used to define web services and to describe how to access them. WSDL is a suggestion by Ariba, IBM and Microsoft for describing services for the W3C XML Activity on XML Protocols.

UDDI

UDDI (Universal Description, Discovery and Integration) is a directory service where businesses can register and search for web services.

UDDI is a public registry, where one can publish and inquire about web services.
________________________________________

.NET Web Services

Web services are small units of code built to handle a limited task.
________________________________________
What are Web Services?
• Web services are small units of code
• Web services are designed to handle a limited set of tasks
• Web services use XML based communicating protocols
• Web services are independent of operating systems
• Web services are independent of programming languages
• Web services connect people, systems and devices
________________________________________
Small Units of Code
Web services are small units of code designed to handle a limited set of tasks.
An example of a web service can be a small program designed to supply other applications with the latest stock exchange prices. Another example can be a small program designed to handle credit card payment.

.NET Software

.NET is a mix of technologies, standards and development tools
________________________________________
Windows.NET
Today, Windows 2000 and Windows XP form the backbone of .NET.
In the future, the .NET infrastructure will be integrated into all Microsoft's operating systems, desktop and server products.
Windows.NET is the next generation Windows. It will provide support for all the .NET building blocks and .NET digital media. Windows.NET will be self-supporting with updates via Internet as users need them.
________________________________________
Office.NET
A new version of Microsoft Office - Office.NET - will have a new .NET architecture based on Internet clients and Web Services.
With Office.NET, browsing, communication, document handling and authoring will be integrated within a XML-based environment which allow users to store their documents on the Internet.
________________________________________
ASP.NET
ASP.NET is the latest version of ASP. It includes Web Services to link applications, services and devices using HTTP, HTML, XML and SOAP.
New in ASP.NET:
• New Language Support
• Programmable Controls
• Event Driven Programming
• XML Based Components
• User Authentication
• User Accounts and Roles
• High Scalability
• Compiled Code
• Easy Configuration
• Easy Deployment
• Not ASP Compatible
• Includes ADO.NET

Visual Basic.NET

Visual Basic.NET has added language enhancements, making it a full object-oriented programming language.
________________________________________
SQL Server 2000

SQL Server 2000 is a fully web-enabled database.
SQL Server 2000 has strong support for XML and HTTP which are two of the main infrastructure technologies for .NET.
Some of the most important new SQL Server features are direct access to the database from a browser, query of relational data with results returned as XML, as well as storage of XML in relational formats.
________________________________________
Internet Information Services 6.0

IIS 6.0 has strong support for more programming to take place on the server, to allow the new Web Applications to run in any browser on any platform

NET Building Blocks

.NET Building Blocks is a set of core Internet Services.
________________________________________
Web Services
Web Services provide data and services to other applications.
Future applications will access Web Services via standard Web Formats (HTTP, HTML, XML, and SOAP), with no need to know how the Web Service itself is implemented.
Web Services are main building blocks in the Microsoft .NET programming model.
________________________________________
Standard Communication
Official Web standards (XML, UDDI, SOAP) will be used to describe what Internet data is, and to describe what Web Services can do.
Future Web applications will be built on flexible services that can interact and exchange data, without the loss of integrity.
________________________________________
Internet Storages
.NET offers secure and addressable places to store data and applications on the Web. Allowing all types of Internet devices (PCs, Palmtops, Phones) to access data and applications.
These Web Services are built on Microsoft's existing NTFS, SQL Server, and Exchange technologies.
________________________________________
Internet Dynamic Delivery
Reliable automatic upgrades by demand and installation independent applications.
.NET will support rapid development of applications that can be dynamically reconfigured.
________________________________________
Internet Identity
.NET supports many different levels of authentication services like passwords, wallets, and smart cards.
These services are built on existing Microsoft Passport and Windows Authentication technologies.
________________________________________
Internet Messaging
.NET supports integration of messaging, e-mail, voice-mail, and fax into one unified Internet Service, targeted for all kinds of PCs or smart Internet devices.
These services are built on existing Hotmail, Exchange and Instant Messenger technologies.
________________________________________
Internet Calendar
.NET supports Internet integration of work, social, and private home calendars. Allowing all types of Internet devices (PCs, Palmtops, Phones) to access the data.
These services are built on existing Outlook and Hotmail technologies.
________________________________________
Internet Directory Services
.NET supports a new kind of directory services that can answer XML based questions about Internet Services, far more exactly than search engines and yellow pages.
These services are built on the UDDI standard.

.NET Framework

The .NET Framework is the infrastructure for the new Microsoft .NET Platform.
The .NET Framework is a common environment for building, deploying, and running Web Services and Web Applications.
The .NET Framework contains common class libraries - like ADO.NET, ASP.NET and Windows Forms - to provide advanced standard services that can be integrated into a variety of computer systems.
The .NET Framework is language neutral. Currently it supports C++, C#, Visual Basic, JScript (The Microsoft version of JavaScript) and COBOL. Third-party languages - like Eiffel, Perl, Python, Smalltalk, and others - will also be available for building future .NET Framework applications.
The new Visual Studio.NET is a common development environment for the new .NET Framework. It provides a feature-rich application execution environment, simplified development and easy integration between a number of different development languages.
________________________________________
Additional Information
• The .NET plan includes a new version of the Windows operating system, a new version of Office, and a variety of new development software for programmers to build Web-based applications.
• The background for .NET is part of Microsoft's new strategy to keep Windows the dominant operating system in the market, as computing begins to move away from desktop computers toward Internet enabled devices, such as hand-held computers and cell phones.
• The most visual components of the new .NET framework are the new Internet Information Server 6.0, with ASP.NET and ADO.NET support, Visual Studio.NET software tools to build Web-based software, and new XML support in the SQL Server 2000 database.
• Bill Gates is supervising the .NET project.
________________________________________

.NET Internet Standards

.NET is built on the following Internet standards:
-----------------------------------------------------------
• HTTP, the communication protocol between Internet Applications
• XML, the format for exchanging data between Internet Applications
• SOAP, the standard format for requesting Web Services
• UDDI, the standard to search and discover Web Services

Microsoft. NET

The Microsoft. NET strategy was presented by Microsoft officials to the rest of the world in June 2000:
• .NET is Microsoft's new Internet and Web strategy
• .NET is NOT a new operating system
• .NET is a new Internet and Web based infrastructure
• .NET delivers software as Web Services
• .NET is a framework for universal services
• .NET is a server centric computing model
• .NET will run in any browser on any platform
• .NET is based on the newest Web standards