Lecture 11 - SQL - SQL EEE 13 SQL Quick Facts ●...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SQL EEE 13 SQL Quick Facts ● Structured Query Language ● Languages commonly used to access a database – Update database information – Retrieve data from a database – Execute other operations on a database ● An American National Standards Institute (ANSI) standard computer language ● Works with database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase, MySQL, Postgresql, etc . SQL Non-Standard Features ● SQL databases supports major keywords according to the ANSI standard – SELECT, UPDATE, DELETE, INSERT, WHERE, and others ● Variations of the SQL language – Specific functions for their environment – Support proprietary extensions – Specific syntax of certain operations SQL Database System ● Contains one or more Database – Contains one or more tables ● Identified by a name (e.g. order, sales) – Tables contain records (rows) with data. SQL Database System Database 1 Database 2 Table 1 Table 2 Table 1 Table 2 Table 3 Example: Table “Students” Lastname Firstname StudentNo Course Log Anna 04-1234 BSCoE Flint Fred 04-2345 BSEE Me Bill 04-8123 BSECE Table Name: Students # of records / rows: 3 # of fields / columns: 4 LastName FirstName StudentNo Course ● Operation using an SQL command is callled a Query ● The SELECT SQL command retrieves information from the database SELECT LastName FROM Students; – result: ● Commands to modify database content are: Update, Insert and Delete SQL Queries LastName Log Flint Me SQL Data Manipulation Language (DML) ● The following commands form the Data Manipulation Language (DML) part of SQL: – SELECT- extracts data from a database table – UPDATE- updates data in a database table – DELETE- deletes data from a database table – INSERT INTO- inserts new data into a database table SQL Data Definition Language (DDL) ● The Data Definition Language (DDL) part of SQL permits database tables to be created or deleted. ● We can also define indexes (keys), specify links between tables, and impose constraints between database tables. SQL Data Definition Language (DDL) ● The most important DDL statements in SQL are: – CREATE TABLE- creates a new database table – ALTER TABLE - alters (changes) a database table – DROP TABLE- deletes a database table – CREATE INDEX - creates an index (search key) – DROP INDEX- deletes an index The SELECT Statement...
View Full Document

Page1 / 47

Lecture 11 - SQL - SQL EEE 13 SQL Quick Facts ●...

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

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