SQL
Procedure to Run SQL Queries
This is a very easy procedure. If you try, you can do it in near about 1hr. You can do it without RDBMS Database. First of all, you have to create a zoho account at www.db.zoho.com .There are some categories of SQL like
1. Data Retrieval
2. Data Manipulation Language
3. Transaction Control
4. Data Definition Language
5. Data Control
Then create a database via any of the four options displayed i.e.
· Import via excel sheet
· Enter data right away
· Create database from template
· Create blank database
Then name the tables (in my case EMPLOYEE & DEPARTMENT). Then comes projection and selection which is a subset of rows and columns respectively and joining those by running queries. According to my database, three SQL queries were run and thus three query tables(views) were generated namely JOIN, AVERAGE AGE & SALARY. Like if you want to know the name of the employees with designation clerk or watchman, whose salary is less than Rs.50000, I will run a query like-
select”Name”,”Salary”,”Employee Designation” from “Employee” where(“Employee Designation” =’Watchman’or”Employee Designation” =’Clerk’)and”Salary”>50000
Now, there are many types of queries which you have to apply according to your need. There are some websites for reference like-
You can visit these websites and choose the type of query that you need to generate from your database. There are three query tables one is for joining the tables and the syntax is
Select <”Table1 Column Name1”>,<” Table1 Column Name2”>,<” Table1 Column Name3”>,<” Table2 Column Name1”>,<” Table2 Column Name2”> from <”Table1”>,<”Table2”> where <”Table1”>.<”Table1 Column Name4”> = <”Table2”>.<”Table2 Column Name2”>
Here,
Table1=Employee
Table2=Department
After’ where’ command column name4 elements of table1 (Employee) is made equal to column name2 elements of table2(Department).this means that combination of rows satisfying above restriction are only displayed. This helps in joining two tables but with customised view. As all the details of database is not needed by everyone. In this SQL query one thing should be kept in mind is that ‘select’ command should start the query and ‘from’ command should also be used so as to locate from which table the entities are taken from. Limitation of db.zoho.com is that only SELECT query can run.After this you can post it at www.blogger.com , www.wordpress.com and view your self-generated database on the web.To give an example, I have created a database of my own by using zoho. I have created two tables-1. EMPLOYEE2. DEPARTMENTAnd then I have given three queries like-1. Join2. Average age3. Salary < Rs.50000I have got the results and it is working fabulously. If you want to have a look at my self-created document, visit the links below,
February 24, 2008 at 7:55 am
did not see much of a join there … but OK good effort