SQL Data Definition
The Structured Query Language (SQL) is the standard interface to manage and access data in a relational database. Unlike many other programming languages, SQL is declarative and focuses on what should be accomplished rather than how to accomplish it. This feature allows DBMSs to optimize queries – often extensively – with minimal involvement from the programmer.
Learning Objectives
- Create a relational table using the
CREATE TABLE
SQL command - Select appropriate data types for attributes in relations
- Manipulate data using the following SQL commands:
INSERT
UPDATE
DELETE
How to Complete this Lesson
Complete the following learning activities: (3.75–4.25 hours total)
- Read the following sections in Fundamentals of Database Management
Systems Chapter 7: Logical Database
Design
(15 minutes)
- Building the Data Structure with SQL
- Manipulating the Data with SQL
- Attend the class meeting (60 minutes)
- Choose one of the resources for learning SQL and complete the relevant portions for creating tables and inserting, updating, and deleting tuples to review the concepts covered in class (30–60 minutes)
- Start the SQL programming exercise (PEX)
(60 minutes)
- Accept the assignment with GitHub Classroom
- Complete queries 1–5 (ConstructCo database)
- Work on the schema design for the project
(60 minutes)
- Identify (or create) representative data
Resources
- Questions for the Structured Query Language (SQL) (45–90 minutes)