Download presentation
Presentation is loading. Please wait.
1
Review HW #4 Answer questions about Microsoft Visio Introduce SQL Introduce SQL Server 2008 environment for programming SQL Will meet in AB208 (computer lab) for class on 2/16. Remember whether you are 9:30AM or 11AM?? 1
2
SQL (structured query language) is a non-procedural language designed to process data. Data processing operations include: ◦ Creating tables ◦ Create and enforcing constraints ◦ Adding, changing, deleting data ◦ Accessing data (either through single rows or aggregation) SQL is an ANSI (American National Standards Institute) standard language 2
3
A front-end programming tool Does not: ◦ Make pretty output (forms/reports) ◦ Make pretty websites ◦ Make anything pretty for users to look at!! ◦ Do extensive calculations ◦ Do statistical calculations 3
4
All commands are considered to be “queries” Any command acts upon the database: ◦ creating database objects, ◦ altering (changing) database objects, ◦ adding/deleting/changing data inside a database object, ◦ looking at data inside a database object. Operates with an implied loop; no explicit loops. The programmer has no control over the execution of the loop, so it is important to understand the implied loop. 4
5
5 Data Definition Commands (DDL) Data Manipulation Commands (DML) Data Control Commands (DCL) CREATEINSERTGRANT ALTERUPDATEREVOKE DROPDELETECOMMIT TRUNCATEROLLBACK SELECTSET TRANSACTION
6
SQL statements start with a command, and then include few or many modifiers/extensions for the command. SQL statements are not case sensitive. Can span more than one physical line; it is a free form language. SQL keywords cannot be abbreviated or split across lines. 6
7
Keywords and/or main clauses are typically placed on separate lines. Tabs and indentation are used to enhance readability. Keywords are typically aligned in the first column. Keywords are usually capitalized. Data are usually in lowercase or a combination of uppercase and lowercase. Comments are included sparingly, but usefully. 7
8
8 CREATE TABLE tblEmployee (EmployeeIDCHAR(5)PRIMARY KEY, LastNameVARCHAR(30), BillingRateMONEY);
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.