chapter03

chapter03 - Concepts of Database Management Fifth Edition...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Concepts of Database  Concepts of Database  Management, Fifth Edition Management, Fifth Edition Chapter 3:  Chapter 3:  The Relational Model 2: SQL The Relational Model 2: 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
2 3 Objectives Introduce the structured query language (SQL) Use simple and compound conditions in SQL Use computed fields in SQL Use built-in SQL functions Use subqueries in SQL Group records in SQL
Background image of page 2
3 3 Objectives (Con’t) Join tables using SQL Perform union operations in SQL Use SQL to update database data Use an SQL query to create a table in a database
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 3 SQL (Structured Query Language) Provides users with the capability to query a relational database Must enter commands to obtain desired results Developed under the name SEQUEL at IBM
Background image of page 4
5 3 Table Creation SQL CREATE TABLE Used to describe layout of a table Typical restrictions placed by DBMS Names cannot exceed 18 characters Names must start with a letter Names can contain only letters, numbers, and underscores (_) Names cannot contain spaces
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 3 Typical Data Types INTEGER Numbers without a decimal point SMALLINT Uses less space than INTEGER DECIMAL(p,q) P number of digits; q number of decimal places CHAR(n) Character string n places long DATE Dates in DD-MON-YYYY or MM/DD/YYYY
Background image of page 6
7 3 Simple Retrieval SELECT-FROM-WHERE-- basic form of SQL retrieval command SELECT clause – lists fields that you wish to display FROM clause – lists table or tables that contain data to display in query results WHERE clause – optional section used to list any conditions to be applied to the data to retrieve
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 3 Figures 3.1-3.2: Simple Retrieval
Background image of page 8
9 3 Figures 3.3-3.4: SQL Query to List Part Table
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 3 Figures 3.5-3.6: SQL Query with Where Condition
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/17/2008 for the course IS 158 taught by Professor Moffitt during the Spring '08 term at CSU Fresno.

Page1 / 51

chapter03 - Concepts of Database Management Fifth Edition...

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

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