Lecture 5 - SQL I.ppt - Introduction to Database Systems IS...

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

IS 230 Lecture 5 Slide 1 Lecture 4 Basic SQL Introduction to Database Systems IS 230 This is the instructor’s notes and student has to read the textbook for complete material. Dr. Abdulrahman Alothaim
Image of page 1

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

IS 230 Lecture 5 Slide 2 Chapter 4 Outline SQL Data Definition and Data Types Specifying Constraints in SQL Basic Retrieval Queries in SQL INSERT , DELETE , and UPDATE Statements in SQL Additional Features of SQL
Image of page 2
IS 230 Lecture 5 Slide 3 Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured Query Language Statements for data definitions, queries, and updates (both DDL and DML) Core specification Plus specialized extensions
Image of page 3

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

IS 230 Lecture 5 Slide 4 SQL Data Definition and Data Types Terminology: Table , row , and column used for relational model terms relation, tuple, and attribute CREATE statement Main SQL command for data definition
Image of page 4
IS 230 Lecture 5 Slide 5 Schema and Catalog Concepts in SQL SQL schema Identified by a schema name Includes an authorization identifier and descriptors for each element Schema elements include Tables, constraints, views, domains, and other constructs Each statement in SQL ends with a semicolon
Image of page 5

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

IS 230 Lecture 5 Slide 6 Schema and Catalog Concepts in SQL (cont’d.) CREATE SCHEMA statement CREATE SCHEMA COMPANY AUTHORIZATION ‘Jsmith’; Catalog Named collection of schemas in an SQL environment SQL environment Installation of an SQL-compliant RDBMS on a computer system
Image of page 6
IS 230 Lecture 5 Slide 7 The CREATE TABLE Command in SQL Specify a new relation Provide name Specify attributes and initial constraints Can optionally specify schema: CREATE TABLE COMPANY.EMPLOYEE ... or CREATE TABLE EMPLOYEE ...
Image of page 7

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

IS 230 Lecture 5 Slide 8 The CREATE TABLE Command in SQL (cont’d.) Base tables ( base relations ) Relation and its tuples are actually created and stored as a file by the DBMS Virtual relations Created through the CREATE VIEW statement
Image of page 8
IS 230 Lecture 5 Slide 9
Image of page 9

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

IS 230 Lecture 5 Slide 10
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • YOUSRYE.TAHA

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern