12_SQL - CSI1306F LECTURE12 (SQL ,

Info iconThis 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)”
Background image of page 1

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

View Full DocumentRight 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.
Background 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
Background image of page 3

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

View Full DocumentRight 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)
Background 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)
Background image of page 5

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

View Full DocumentRight 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)
Background 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
Background image of page 7

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

View Full DocumentRight 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-
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/01/2010 for the course COMPUTER S CSI1306 taught by Professor Aziri during the Spring '10 term at University of Ottawa.

Page1 / 52

12_SQL - CSI1306F LECTURE12 (SQL ,

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online