1 / 17

The SQL Language

The SQL Language. Presented by Reggie James, Isel Liunoras, and Chris Rollins. Table of Contents. What is SQL? History Timeline Features Advantages/Disadvantages Programming Examples Conclusion. What Is SQL?. SQL stands for Structured Query Language SQL is a declarative language

ejosephine
Download Presentation

The SQL Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The SQL Language Presented by Reggie James, Isel Liunoras, and Chris Rollins

  2. Table of Contents • What is SQL? • History • Timeline • Features • Advantages/Disadvantages • Programming Examples • Conclusion

  3. What Is SQL? • SQL stands for Structured Query Language • SQL is a declarative language • Results in one statement of the desired result (i.e. ML and Haskell) • Unlike procedural languages (many lines of code) • Used for RDBMS (Relational Database Management System)

  4. History of SQL

  5. In 1970, Dr. E “Ted” Codd introduced the relational model for databases In 1974, IBM started to develop System/R (predecessor to SQL) In 1978, System/R released by IBM In 1982, IBM released SQL/DS and DB25 The versions used today are SQL 89, SQL 92 and SQL 99. Most businesses are still using SQL 92 History of SQL

  6. Dr. E.F. “Ted” Codd

  7. Relational Data Model • Data model used for business data management • In this model, data are organized into tables • The set of names of the columns is called the schema of the table

  8. Timeline of SQL

  9. Features of SQL

  10. Features of SQL • Runs queries of databases • Exists on Windows and UNIX platforms • There are different versions of SQL that are still existing • Backwards compatible

  11. Disadvantages and Advantages

  12. Code cannot be reused Can’t link databases graphically Disadvantages

  13. Advantages to SQL • User can customize query with unlimited parameters • Takes up less space than the GUI interfaces such as: Access and Paradox • Easy to learn • High Productivity • Integration with Oracle and Microsoft

  14. Programming Examples

  15. Programming Example LOOP over each student record IF this record has major = ‘Nutrition’ THEN DELETE this record; END IF; END LOOP;

  16. Another Programming Example DECLARE V_NewMajor VARCHAR2(10) := ‘History’; V_FirstName VARCHAR2(10) := ‘Scott’; v_LastName VARCHAR2(10) := ‘Urman’; BEGIN UPDATE students SET major = v_NewMajor WHERE first_name = v_LastName; IF SQL%NOTFOUND THEN INSERT INTO students (ID, first_name, last_name, major) VALUES (student_sequence.NEXTVAL,v_FirstName,v_LastName, v_NewMajor); END IF; END;

  17. Conclusion • SQL is a very powerful query language provided that the user is familiar • SQL is relatively easy to learn • Upcoming product releases will change the relative strengths of the database management systems • Making it more powerful • Making it more efficient

More Related