SlideServe
Menu
Préférences
© SlideServe · v2026

Database Systems: Design, Implementation, and Management

buckminster-haney avatar
6 diapositives · 292 Views · Nov 20, 2014

Database Systems: Design, Implementation, and Management. Chapter 7 Introduction to Structured Query Language (SQL). Data Definition Language (DDL) and Data Manipulation Language (DML). Data Definition Language (DDL) defines the structure of the database

Database Systems: Design, Implementation, and Management - slide 1
01 / 6Database Systems: Design, Implementation, and Management
1 / 17

Télécharger la présentation

Database Systems: Design, Implementation, and Management
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Database Systems: Design, Implementation, and Management Chapter 7 Introduction to Structured Query Language (SQL)

  2. Data Definition Language (DDL) andData Manipulation Language (DML) • Data Definition Language (DDL)defines the structure of the database • E.g. tables, columns, keys, indexes, etc. • Data Manipulation Language (DML)manipulates the actual data contents • E.g. adding, modifying and deleting data • Understanding the difference between these two types of SQL commands will help you master SQL

  3. Create, Read, Edit/Update, Delete (CRED/CRUD): Four major kinds of database operations • Create • DDL: CREATE tables and other structures • DML: INSERT data into tables • Read • DDL: SELECT (system catalogue queries) • DML: SELECT • Edit/Update • DDL: ALTER table and other structures • DML: UPDATE table • Delete • DDL: DROP tables and other structures • DML: DELETE from table

  4. WHERE versus HAVING • WHERE is used to restrict a subset of rows from a regular query result • Usually a SELECT query, but also UPDATE and DELETE • HAVING is used to restrict a subset of rows when using a GROUP BY aggregation • HAVING only works with GROUP BY • Mnemonics to not confuse the two: • SELECT FROM WHERE? (WHERE is the normal clause for a SELECT statement) • G-H (GROUP BY goes with HAVING)

  5. Set date and number formats in Oracle • Some data (e.g. dates and numbers) assume that certain formats are being used • ALTER SESSION is used to set environment variables, including date and number formats • If you have problems entering dates, execute this SQL command before your other commands: • alter session set nls_date_format = 'dd-mm-yyyy'; • With language and number format problems, try: • alter session set nls_language = English; • alter session set nls_territory = Canada;

  6. Sources • Most of the slides are adapted from Database Systems: Design, Implementation and Management by Carlos Coronel and Steven Morris. 11th edition (2015) published by Cengage Learning. ISBN 13: 978-1-285-19614-5 • Other sources are noted on the slides themselves