1 / 21

IT&F: SQL

IT&F: SQL. Stefano Grazioli. Critical Thinking. Lab 11:30-1:00 Easy meter . How do I talk to a DBMS?. SQL. In one hour. Before Querying…. Figure out what data is available Ask about the data model and the data dictionary, but… …they may not have it.

sorley
Download Presentation

IT&F: SQL

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. IT&F: SQL Stefano Grazioli

  2. Critical Thinking • Lab 11:30-1:00 • Easy meter

  3. How do I talk to a DBMS? SQL In one hour

  4. Before Querying…. • Figure out what data is available • Ask about the data model andthe data dictionary, but… • …they may not have it. A picture of the contents of the database A text description of the contents of the database (e.g. columns content)

  5. Real World Examples(fragments)

  6. SmallBank Ltd. Database example

  7. ACTUAL TABLE DIAGRAM Loan Officer Table LO id f name l name phone

  8. Data Model: SmallBank,Ltd. One Many

  9. Reading the Relationships 1 6 One 5 2 Many 3 4

  10. Navigating the Relationship (join) foreign key: a PK in another table, used to link the two tables

  11. Different “Dialects” Chen ModifiedChen (IE) IDEF1X 0:n 1:1 works in Employee Dept works in Employee Dept works in Employee Dept Dept Employee

  12. WINIT What Is NewIn Technology?

  13. Homework SQL Practice

  14. SQL • Structured Query Language • The standard language for databases • 70s: - Codd - SEQUEL – Structured English QUEry Language • commercialized it in 1979 • 1986 ISO/ANSI • Sometimes sought as a required skill in interviews

  15. SQL EXAMPLE: A QUERY SELECT First_Name, Last_Name, ssn FROM StudentTbl WHERE gpa > 3.0 ORDER BYLast_Name;

  16. 4+2 BASIC SQL COMMANDS • SELECT • INSERT • UPDATE • DELETE • CREATE • DROP

  17. Interacting with a DB (1) SQL Web server Data (Customer, Product, Order) Your browser DBMS You On your local machine(e.g., laptop, lab PC) On a Server

  18. Interacting with a DB (2) SQL Data (Customer, Product, Order) Some BIsoftware DBMS You On your local machine(e.g., laptop, lab PC) On a Server Example: Tableau, Excel

  19. Interacting with a DB (3) SQL SmallBank DB (Loan, Loan Officer, Customer…) Visual Studio SQL ServerDBMS You Your local machine(e.g., laptop, lab PC) Server F-sg6m-s4.comm.virginia.edu DEMO

  20. Suggestions Make sure that you can access the DB asap(this afternoon). Come to office hours or to the lab if you cannot.

  21. You do the talking • Name, Major • Learning Objectives • Things you like about the class • Things that can be improved • Attitude towards the Tournament

More Related