12_SQL - CSI1306F LECTURE12 (SQL ,

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CSI 1306 F “Computing Concepts for Business” LECTURE 12: “THE STRUCTURED QUERY LANGUAGE (SQL)”
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Communicating with the Database As it was mentioned earlier, one of the purposes of storing  information in databases is to quickly and efficiently  access the underlying data. The amount of stored data can rapidly increase and be in  the order of tens or even hundreds of millions of records  (e.g. a nationwide database) Database management systems  (DBMS), of which Access  is just one representative, need to communicate with the  database engine in order to retrieve data accurately and  swiftly. Thus, a “language” that can be understood by the  database engine has to be implemented.
Image of page 2
Structured Query Language (SQL) There are several relational database languages , and  one of them,  SQL  ( Structured Query Language seems the most popular and is reasonably standard.  It is a multi-purpose database language. Its commands:  define a schema for the database (data definition commands) e.g. create a table, create a relationship between two tables, etc. create and maintain a database instance (data manipulation  commands) e.g. insert, delete and update records in a table.  retrieve data in organized forms (query commands) with the SELECT command
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Most database management systems  (Oracle,  Ingres, DB2, Sybase) allow you to write applications  in an imperative language (often it is C), in which  SQL commands are embedded, that is, can be called  as procedures We will use  SQL with Microsoft Access  to illustrate  SQL programming. More specifically, we will focus  on commands for data retrieval  rather than data  manipulation commands. Structured Query Language (SQL)
Image of page 4
Structured Query Language (SQL) Then, if your organization uses relational database  management software, you will be able to write your  own queries (and even practice, using Access)
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Structured Query Language (SQL) Data Definition Language (DDL) (create table, drop table, alter table) Data Manipulation Language (DML) (insert, delete, update) Query Language (QL) (select)
Image of page 6
E-R Diagram for Examples Lab PK Course Student PK Studnum Employee PK Empnum Course PK Course Class PK Course PK Section PK Day PK Time Room PKRoomnum Assignment PK Course PK Assignnum Mark PK Studnum PK Course PK Assignnum has 1 m make up  m 1 is held  in m 1 hosts 1 m can be  taken by m m has 1 m grade m 1 receives m 1 enrolled  in m m
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Database for Examples STUDENT Studnum Surname Initials Address Birthdate Sex 86004 RUSSELL F.K.A. 90 Green St., KITCHENER ONT 1967/09/21 M EMPLOYEE Empnum Empname Initials Address Home- phone Labpay Rank Room- num 60432 GORDON R.S. -1.0 PROF 2267 COURSE Course Credit Hours Description
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern