SQLDeveloper Data Modeler - Logical Model

Slides:



Advertisements
Similar presentations
1 I Esempio di constraints. 2 DROP TABLE regions; CREATE TABLE regions ( region_id NUMBER CONSTRAINT region_id_nn NOT NULL, region_name VARCHAR2(25) );
Advertisements

SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
7 7 SQL Data Definition 4Spread throughout chapter 7.
SQL’s Data Definition Language (DDL) n DDL statements define, modify and remove objects from data dictionary tables maintained by the DBMS n Whenever you.
Cs3431 Constraints Sections 6.1 – 6.5. cs3431 Example CREATE TABLE Student ( sNum int, sName varchar (20), prof int, CONSTRAINT pk PRIMARY KEY (snum),
10 Copyright © Oracle Corporation, All rights reserved. Including Constraints.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
SQL Keys and Constraints Justin Maksim. Key Declaration Key constraint defined within the CREATE TABLE command Key can be declared using either the PRIMARY.
SQL DDL constraints Restrictions on the columns and tables 1SQL DDL Constraints.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 David M. Kroenke Database Processing Chapter 7 Structured Query Language.
Database Management System LICT 3011 Eyad H. Elshami.
SQL Data Definition (CB Chapter 6) CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
Deanery of Business & Computer Sciences SQL Structured Query Language Implementation Lecture – 8 Database Technology Level I.
Slide 1 Chapter 7 – Part 1 Data Definition Language & Data Manipulation Language.
14-1 Goals of Database Design A database should provide for efficient storage, update, and retrieval of data. A database should be reliable—the stored.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Intro to SQL| MIS 2502  Spacing not relevant › BUT… no spaces in an attribute name or table name  Oracle commands keywords, table names, and attribute.
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
11-1 Copyright  Oracle Corporation, All rights reserved. What Are Constraints? Constraints enforce rules at the table level. Constraints prevent.
Dec 8, 2003Murali Mani Constraints B term 2004: lecture 15.
1 SQL - II Data Constraints –Applying data constraints Types of data constraints –I/O constraints The PRIMARY KEY constraints The FOREIGN KEY constraints.
10 Copyright © Oracle Corporation, All rights reserved. Including Constraints.
CREATE TABLE CREATE TABLE statement is used for creating relations Each column is described with three parts: column name, data type, and optional constraints.
Chapter 7 SQL: Data Definition Pearson Education © 2009.
SQL introduction 2013.
SQL Structured Query Language. Aims  To introduce the implementation of a Physical design using SQL.  To introduce SQL Data Definition Language (DDL).
©Silberschatz, Korth and Sudarshan1 Structured Query Language (SQL) Data Definition Language Domains Integrity Constraints.
CREATE TABLE ARTIST ( ArtistID int NOT NULL IDENTITY (1,1), Namechar(25) NOT NULL, TEXT ERROR Nationality char (30) NULL, Birthdate numeric (4,0) NULL,
UNIVERSITAS BINA DARMA 2013 DATA DEFINITION LANGUAGE (DDL)
الفصل السادس لغة Structured Query Language) SQL الفصل السادس لغة Structured Query Language) SQL.
Dorm Name PK Occupancy Dorm Name PK Occupancy HighResDorm StartDate HighResDorm StartDate LowResDorm StartDate WaterSensorID WaterOnLineDate ElecSensorID.
MS SQL Create Table Cust USE jxc00 GO CREATE TABLE cust ( cust_id smallint IDENTITY(1,1) NOT NULL, cust_name char(10)
Structured Query Language
SQL: Schema Definition and Constraints Chapter 6 week 6
Insert, Update and the rest…
CS 3630 Database Design and Implementation
Referential Integrity MySQL
Minggu 5, Pertemuan 9 SQL: Data Definition
MySQL Explain examples
Referential Integrity
ETL Processing Mechanics of ETL.
STRUCTURED QUERY LANGUAGE
Structured Query Language (Data definition Language)
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Index Structure.
The Relational Model Relational Data Model
מודל הנתונים.
لغة قواعد البيانات STRUCTURED QUERY LANGUAGE SQL))
SQL OVERVIEW DEFINING A SCHEMA
SQL data definition using Oracle
COP4710 Database Management Connect to PostgreSQL sever via pgAdmin
For student, require values for name and address.
Referential Integrity
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
These are slides from Dr. Phil Cannata’s Class
CS122 Using Relational Databases and SQL
Oracle Data Definition Language (DDL)
Rob Gleasure robgleasure.com
Session - 6 Sequence - 1 SQL: The Structured Query Language:
COP4710 Database Management Connect to PostgreSQL sever via pgAdmin
Data Definition Language
Data Definition Language
CS122 Using Relational Databases and SQL
Instructor: Samia arshad
ETL Processing Mechanics of ETL.
Including Constraints
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
SQL (Structured Query Language)
Presentation transcript:

SQLDeveloper Data Modeler - Logical Model

SQLDeveloper Data Modeler - Relational Model

SQLDeveloper Data Modeler - DDL CREATE TABLE AIR_airline ( airline_id INTEGER NOT NULL , name VARCHAR2 (4000) ) ; ALTER TABLE AIR_airline ADD CONSTRAINT "AIR_airline PK PRIMARY KEY ( airline_id ) ; CREATE TABLE AIR_airplane ( airplane_id INTEGER NOT NULL , seats INTEGER , airline_id INTEGER ) ; ALTER TABLE AIR_airplane ADD CONSTRAINT "AIR_airplane PK” PRIMARY KEY ( airplane_id ) ; CREATE TABLE AIR_city ( city_id INTEGER NOT NULL , name VARCHAR2 (100 BYTE) , airport_code VARCHAR2 (10 BYTE) , city_id1 INTEGER ) ; CREATE UNIQUE INDEX AIR_city__IDX ON AIR_city (city_id1 ASC ) ; ALTER TABLE AIR_city ADD CONSTRAINT "AIR_city PK” PRIMARY KEY ( city_id ) ; CREATE TABLE AIR_services ( AIR_city_city_id INTEGER NOT NULL , AIR_airplane_airplane_id INTEGER NOT NULL ) ; ALTER TABLE AIR_services ADD CONSTRAINT AIR_services__IDX PRIMARY KEY ( AIR_city_city_id, AIR_airplane_airplane_id ) ; ALTER TABLE AIR_airplane ADD CONSTRAINT AIR_Relation_4 FOREIGN KEY(airline_id) REFERENCES AIR_airline (airline_id) ; ALTER TABLE AIR_city ADD CONSTRAINT AIR_Sister FOREIGN KEY (city_id1) REFERENCES AIR_city (city_id) ; ALTER TABLE AIR_services ADD CONSTRAINT FK_ASS_3 FOREIGN KEY (AIR_city_city_id) REFERENCES AIR_city (city_id) ON DELETE CASCADE ; ADD CONSTRAINT FK_ASS_4 FOREIGN KEY (AIR_airplane_airplane_id) REFERENCES AIR_airplane (airplane_id)

The Evolution of Data Models – Oracle Physical Model