SlideShare a Scribd company logo
Including Constraints
Objectives ,[object Object],[object Object],[object Object],[object Object]
What are Constraints? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Constraint Guidelines ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Defining Constraints CREATE TABLE [ schema .] table   ( column   datatype  [DEFAULT  expr ] [ column_constraint ], ... [ table_constraint ][,...]); CREATE TABLE employees(   employee_id  NUMBER(6),   first_name  VARCHAR2(20),   ...   job_id  VARCHAR2(10) NOT NULL,   CONSTRAINT emp_emp_id_pk    PRIMARY KEY (EMPLOYEE_ID));
Defining Constraints ,[object Object],[object Object],column  [CONSTRAINT  constraint_name ]  constraint_type , column,... [CONSTRAINT  constraint_name ]  constraint_type ( column , ...),
The  NOT   NULL  Constraint ,[object Object],[object Object],… NOT NULL  constraint (No row can contain a null value for this column.) Absence of  NOT NULL  constraint (Any row can contain null for this column.) NOT NULL   constraint
The  NOT   NULL  Constraint ,[object Object],CREATE TABLE employees( employee_id  NUMBER(6), last_name  VARCHAR2(25) NOT NULL, salary  NUMBER(8,2), commission_pct NUMBER(2,2), hire_date  DATE  CONSTRAINT emp_hire_date_nn NOT NULL, ...  System named User named
The  UNIQUE  Constraint EMPLOYEES  UNIQUE  constraint INSERT INTO … Not allowed: already exists Allowed
The  UNIQUE  Constraint ,[object Object],CREATE TABLE employees( employee_id  NUMBER(6), last_name  VARCHAR2(25) NOT NULL, email  VARCHAR2(25), salary  NUMBER(8,2), commission_pct  NUMBER(2,2), hire_date  DATE NOT NULL, ...  CONSTRAINT emp_email_uk UNIQUE(email));
The  PRIMARY   KEY  Constraint DEPARTMENTS   PRIMARY KEY … INSERT INTO Not allowed (Null value) Not allowed  (50 already exists)
The  PRIMARY   KEY  Constraint ,[object Object],CREATE TABLE  departments( department_id  NUMBER(4), department_name  VARCHAR2(30)  CONSTRAINT dept_name_nn NOT NULL, manager_id  NUMBER(6), location_id  NUMBER(4), CONSTRAINT dept_id_pk PRIMARY KEY(department_id));
The  FOREIGN   KEY  Constraint DEPARTMENTS   EMPLOYEES … … FOREIGN KEY INSERT INTO Not allowed ( 9  does not exist) Allowed PRIMARY KEY
The  FOREIGN   KEY  Constraint ,[object Object],CREATE TABLE employees( employee_id  NUMBER(6), last_name  VARCHAR2(25) NOT NULL, email  VARCHAR2(25), salary  NUMBER(8,2), commission_pct  NUMBER(2,2), hire_date  DATE NOT NULL, ... department_id  NUMBER(4), CONSTRAINT emp_dept_fk FOREIGN KEY (department_id) REFERENCES departments(department_id), CONSTRAINT emp_email_uk UNIQUE(email));
FOREIGN   KEY  Constraint  Keywords ,[object Object],[object Object],[object Object],[object Object]
The  CHECK  Constraint ,[object Object],[object Object],[object Object],[object Object],[object Object],..., salary NUMBER(2) CONSTRAINT emp_salary_min  CHECK (salary > 0),...
Adding a Constraint Syntax ,[object Object],[object Object],[object Object],[object Object],ALTER TABLE   table ADD [CONSTRAINT  constraint ]  type  ( column );
Adding a Constraint ,[object Object],[object Object],[object Object],ALTER TABLE  employees ADD CONSTRAINT  emp_manager_fk  FOREIGN KEY(manager_id)  REFERENCES employees(employee_id); Table altered.
Dropping a Constraint ,[object Object],[object Object],ALTER TABLE  employees DROP CONSTRAINT  emp_manager_fk; Table altered. ALTER TABLE departments DROP PRIMARY KEY CASCADE; Table altered.
Disabling Constraints ,[object Object],[object Object],ALTER TABLE employees DISABLE CONSTRAINT emp_emp_id_pk CASCADE; Table altered.
Enabling Constraints ,[object Object],[object Object],ALTER TABLE employees ENABLE CONSTRAINT emp_emp_id_pk; Table altered.
Cascading Constraints ,[object Object],[object Object],[object Object]
Cascading Constraints ,[object Object],ALTER TABLE test1  DROP (pk) CASCADE CONSTRAINTS; Table altered. ALTER TABLE test1  DROP (pk, fk, col1) CASCADE CONSTRAINTS; Table altered.
Viewing Constraints ,[object Object],[object Object],SELECT constraint_name, constraint_type, search_condition FROM user_constraints WHERE table_name = 'EMPLOYEES'; …
Viewing the Columns Associated with Constraints ,[object Object],[object Object],SELECT constraint_name, column_name FROM user_cons_columns WHERE table_name = 'EMPLOYEES'; …
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Practice 10 Overview ,[object Object],[object Object],[object Object],[object Object]
 
 
 

More Related Content

What's hot

Sql commands
Sql commandsSql commands
Sql commands
Mohd Tousif
 
Sql
SqlSql
SQL Sort Notes
SQL Sort NotesSQL Sort Notes
SQL Sort Notes
ShivaAdasule
 
Lecture 3 sql {basics ddl commands}
Lecture 3 sql {basics  ddl commands}Lecture 3 sql {basics  ddl commands}
Lecture 3 sql {basics ddl commands}
Shubham Shukla
 
Database Management - Lecture 2 - SQL select, insert, update and delete
Database Management - Lecture 2 - SQL select, insert, update and deleteDatabase Management - Lecture 2 - SQL select, insert, update and delete
Database Management - Lecture 2 - SQL select, insert, update and delete
Al-Mamun Sarkar
 
Lecture 4 sql {basics keys and constraints}
Lecture 4 sql {basics  keys and constraints}Lecture 4 sql {basics  keys and constraints}
Lecture 4 sql {basics keys and constraints}
Shubham Shukla
 
MySQL Pro
MySQL ProMySQL Pro
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsAshwin Dinoriya
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
DataminingTools Inc
 
Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)  Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)
MuhammadWaheed44
 
RDBMS Lab03 applying constraints (UIU)
RDBMS Lab03 applying constraints (UIU)RDBMS Lab03 applying constraints (UIU)
RDBMS Lab03 applying constraints (UIU)
Muhammad T Q Nafis
 
Database Management System 1
Database Management System 1Database Management System 1
Database Management System 1
Swapnali Pawar
 
Introduction sql
Introduction sqlIntroduction sql
Introduction sqlsagarasuri
 
MULTIPLE TABLES
MULTIPLE TABLES MULTIPLE TABLES
MULTIPLE TABLES
ASHABOOPATHY
 
Web app development_my_sql_09
Web app development_my_sql_09Web app development_my_sql_09
Web app development_my_sql_09Hassen Poreya
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
Vibrant Technologies & Computers
 

What's hot (20)

Sql commands
Sql commandsSql commands
Sql commands
 
Sql
SqlSql
Sql
 
SQL Sort Notes
SQL Sort NotesSQL Sort Notes
SQL Sort Notes
 
Sql dml & tcl 2
Sql   dml & tcl 2Sql   dml & tcl 2
Sql dml & tcl 2
 
Lecture 3 sql {basics ddl commands}
Lecture 3 sql {basics  ddl commands}Lecture 3 sql {basics  ddl commands}
Lecture 3 sql {basics ddl commands}
 
Database Management - Lecture 2 - SQL select, insert, update and delete
Database Management - Lecture 2 - SQL select, insert, update and deleteDatabase Management - Lecture 2 - SQL select, insert, update and delete
Database Management - Lecture 2 - SQL select, insert, update and delete
 
Lecture 4 sql {basics keys and constraints}
Lecture 4 sql {basics  keys and constraints}Lecture 4 sql {basics  keys and constraints}
Lecture 4 sql {basics keys and constraints}
 
Sql Tags
Sql TagsSql Tags
Sql Tags
 
MySQL Pro
MySQL ProMySQL Pro
MySQL Pro
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
 
Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)  Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)
 
RDBMS Lab03 applying constraints (UIU)
RDBMS Lab03 applying constraints (UIU)RDBMS Lab03 applying constraints (UIU)
RDBMS Lab03 applying constraints (UIU)
 
Views and functions
Views and functionsViews and functions
Views and functions
 
Database Management System 1
Database Management System 1Database Management System 1
Database Management System 1
 
Introduction sql
Introduction sqlIntroduction sql
Introduction sql
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
MULTIPLE TABLES
MULTIPLE TABLES MULTIPLE TABLES
MULTIPLE TABLES
 
Web app development_my_sql_09
Web app development_my_sql_09Web app development_my_sql_09
Web app development_my_sql_09
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
 

Viewers also liked

Introduction to j_query
Introduction to j_queryIntroduction to j_query
Introduction to j_query
Basavaraj Hampali
 
J query introduction
J query introductionJ query introduction
J query introduction
SMS_VietNam
 
Introduction to queries
Introduction to queriesIntroduction to queries
Introduction to queriesBeatrice Aco
 

Viewers also liked (20)

Les05
Les05Les05
Les05
 
Les09
Les09Les09
Les09
 
Les07
Les07Les07
Les07
 
Les06
Les06Les06
Les06
 
Les02
Les02Les02
Les02
 
Xml1111
Xml1111Xml1111
Xml1111
 
Les06
Les06Les06
Les06
 
Introduction to j_query
Introduction to j_queryIntroduction to j_query
Introduction to j_query
 
J query introduction
J query introductionJ query introduction
J query introduction
 
Sql xp 03
Sql xp 03Sql xp 03
Sql xp 03
 
Introduction to queries
Introduction to queriesIntroduction to queries
Introduction to queries
 
Sql xp 04
Sql xp 04Sql xp 04
Sql xp 04
 
Sql xp 01
Sql xp 01Sql xp 01
Sql xp 01
 
Les16
Les16Les16
Les16
 
Les17
Les17Les17
Les17
 
Les15
Les15Les15
Les15
 
Les12
Les12Les12
Les12
 
Les20
Les20Les20
Les20
 
Les13
Les13Les13
Les13
 
Les11
Les11Les11
Les11
 

Similar to Les10

Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraintsVivek Singh
 
Oraclesql
OraclesqlOraclesql
Oraclesql
Priya Goyal
 
Les09
Les09Les09
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)
Achmad Solichin
 
zekeLabs sql-slides
zekeLabs sql-slideszekeLabs sql-slides
zekeLabs sql-slides
zekeLabs Technologies
 
SQL WORKSHOP::Lecture 11
SQL WORKSHOP::Lecture 11SQL WORKSHOP::Lecture 11
SQL WORKSHOP::Lecture 11Umair Amjad
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
Achmad Solichin
 
Les08
Les08Les08
Including Constraints -Oracle Data base
Including Constraints -Oracle Data base Including Constraints -Oracle Data base
Including Constraints -Oracle Data base
Salman Memon
 
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleDDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using Oracle
Farhan Aslam
 
Unit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptxUnit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptx
PetroJoe
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptx
jainendraKUMAR55
 
sql language
sql languagesql language
sql language
moman abde
 
SQL
SQLSQL
Sql commands
Sql commandsSql commands
Sql commands
Pooja Dixit
 

Similar to Les10 (20)

Les11 Including Constraints
Les11 Including ConstraintsLes11 Including Constraints
Les11 Including Constraints
 
Les11
Les11Les11
Les11
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraints
 
Oraclesql
OraclesqlOraclesql
Oraclesql
 
SQL
SQLSQL
SQL
 
Les09
Les09Les09
Les09
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)
 
zekeLabs sql-slides
zekeLabs sql-slideszekeLabs sql-slides
zekeLabs sql-slides
 
SQL WORKSHOP::Lecture 11
SQL WORKSHOP::Lecture 11SQL WORKSHOP::Lecture 11
SQL WORKSHOP::Lecture 11
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
 
Les08
Les08Les08
Les08
 
Including Constraints -Oracle Data base
Including Constraints -Oracle Data base Including Constraints -Oracle Data base
Including Constraints -Oracle Data base
 
DDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using OracleDDL(Data defination Language ) Using Oracle
DDL(Data defination Language ) Using Oracle
 
Unit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptxUnit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptx
 
Db1 lecture4
Db1 lecture4Db1 lecture4
Db1 lecture4
 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptx
 
Query
QueryQuery
Query
 
sql language
sql languagesql language
sql language
 
SQL
SQLSQL
SQL
 
Sql commands
Sql commandsSql commands
Sql commands
 

More from Vijay Kumar (6)

Les19
Les19Les19
Les19
 
Les18
Les18Les18
Les18
 
Les14
Les14Les14
Les14
 
Les08
Les08Les08
Les08
 
Les04
Les04Les04
Les04
 
Les03
Les03Les03
Les03
 

Recently uploaded

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 

Recently uploaded (20)

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 

Les10

  • 2.
  • 3.
  • 4.
  • 5. Defining Constraints CREATE TABLE [ schema .] table ( column datatype [DEFAULT expr ] [ column_constraint ], ... [ table_constraint ][,...]); CREATE TABLE employees( employee_id NUMBER(6), first_name VARCHAR2(20), ... job_id VARCHAR2(10) NOT NULL, CONSTRAINT emp_emp_id_pk PRIMARY KEY (EMPLOYEE_ID));
  • 6.
  • 7.
  • 8.
  • 9. The UNIQUE Constraint EMPLOYEES UNIQUE constraint INSERT INTO … Not allowed: already exists Allowed
  • 10.
  • 11. The PRIMARY KEY Constraint DEPARTMENTS PRIMARY KEY … INSERT INTO Not allowed (Null value) Not allowed (50 already exists)
  • 12.
  • 13. The FOREIGN KEY Constraint DEPARTMENTS EMPLOYEES … … FOREIGN KEY INSERT INTO Not allowed ( 9 does not exist) Allowed PRIMARY KEY
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.  
  • 29.  
  • 30.  

Editor's Notes

  1. Schedule: Timing Topic 45 minutes Lecture 25 minutes Practice 70 minutes Total