Professional Documents
Culture Documents
SQL Introduction
Structured Query Language
Originally called SEQUEL from Structured English QUEry Language SQL has a standard SQL provides both
Data Definition Language (DDL) Data Manipulation Language (DML)
DBMS may provide higher level approach, but SQL is important for tougher queries, using host programming or web programming.
Step 1: Make long rows by combining rows from the various tables in FROM clause in every possible way each row in first table with each row in second table with each row in third table, etc. Step 2: Keep the long rows that satisfy WHERE condition.
OR (aliasing)
StudentInterest(StudentID, InterestID)
Interests(InterestID, InterestName, Category, URL)
we need to have
Students.StudentID = StudentInterest.StudentID AND StudentInterest.InterestID = Interests.InterestID
we need to have
Students.StudentID = StudentMajor.StudentID AND StudentMajor.MajorID = Majors.MajorID