3024-Chap15 - 15. DEFINING AND MANIPULATING DATABASE DATA:...

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

View Full Document Right Arrow Icon
15. DEFINING AND MANIPULATING DATABASE DATA: SQL Structured Query Language ( SQL ) – language for designing, creating, populating, querying, and odifying relational databases modifying relational databases. Two parts to SQL: Data Definition Language (DDL) – used to define database, i.e., specify relational schema. Data Manipulation Language (DML) – used to manipulate database content, i.e., use database. 2010 John P. Shewchuk ISE 3024 Course Notes 15 – 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
QL is an O nternational Standards Organization) SQL is an ISO (International Standards Organization) standard. greed upon by organizations, people all over ag eed upo by o ga a o s, peop e a o e the world. Why use SQL when we have MS Access available? very relational database server understands SQL 1. Every relational database server understands SQL. 2. SQL statements can be used, with little or no modification, on databases from many different 2010 John P. Shewchuk ISE 3024 Course Notes 15 – 2 vendors.
Background image of page 2
ll database operations om specification and 3. All database operations from specification and creation through population, query, and update can be performed via this single language. 4. Many programming languages have been adapted to support the creation and execution of SQL statements. QL makes atabase programming asible 5. SQL makes database programming feasible. Additionally, as you will see, SQL is very easy to learn! y, y , Q y y • high-level language, i.e., uses standard English words. 2010 John P. Shewchuk ISE 3024 Course Notes 15 – 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
this chapter we will se our Anna’s Books database In this chapter, we will use our Anna s Books database to study how SQL can be used to •w r i te queries • add, modify, or delete data om an existing database from an existing database • define and create a new database We’ll also see • how SQL can be used to create a subset of our nna’s ooks database using QL erver Anna s Books database using SQL Server . • how we can convert our existing Anna’s Books ccess database to an QL Server atabase. 2010 John P. Shewchuk ISE 3024 Course Notes 15 – 4 Access database to an SQL Server database.
Background image of page 4
15.1 Creating Queries with SQL 15.1.1 Select and Project Queries (SQL) Select statements are the basis for most SQL queries. A single select statement can incorporate both selection nd projection operations and projection operations. Basic syntax for select statements: select <attributes> from <tables> where <condition> Let’s see how our select and project queries from Chapter 13 would be specified via SQL. 2010 John P. Shewchuk ISE 3024 Course Notes 15 – 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
uery1: ist all records for customers with the last Query1: List all records for customers with the last name ‘Smith’. elect rom ustomer here astName = ' mith ' select * from Customer where lastName = Smith Customer ustomerId astName irstName treet ity tate ip customerId lastName firstName street city state zip 3 Smith John 214 Church St. Blacksburg VA 24073 17 Davis Diane 185 Clay St. Blacksburg 24073 6 O’Keefe Patrick 35 Cambria St. Christiansburg 24061 mith
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 106

3024-Chap15 - 15. DEFINING AND MANIPULATING DATABASE DATA:...

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

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