Advertisement
Yahya-Ak-Ayoub

helal

Mar 23rd, 2021
583
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DROP TABLE  info_passengers CASCADE CONSTRAINT;
  2. DROP TABLE information_flights CASCADE CONSTRAINT;
  3. DROP TABLE info_tickt ;
  4. CREATE TABLE info_passengers (
  5.     name  VARCHAR2(15) NOT NULL ,
  6.     age NUMBER(2),
  7.     Nationality  VARCHAR2(10) NOT NULL,
  8.     NOpassport NUMBER(20) NOT NULL ,
  9.     CONSTRAINT const_NOpassport_pk PRIMARY KEY (NOpassport)
  10.     ) ;
  11.  
  12.    
  13.     CREATE  TABLE information_flights (
  14.         Nfligh23t VARCHAR2(15) NOT NULL ,
  15.         NumberFliight  VARCHAR2(15) NOT NULL,  
  16.         DateFlight DATE NOT NULL ,
  17.         Travel_destination VARCHAR2(15) NOT NULL ,
  18.         Flying_line VARCHAR2(15),
  19.         CONSTRAINT const_NFlights_pk PRIMARY KEY (NumberFliight) );
  20.  
  21.  
  22.         CREATE  TABLE info_tickt (
  23.             NoTickt NUMBER(20) NOT NULL ,
  24.             Gate VARCHAR2(9) NOT NULL ,
  25.             seat NUMBER(3) NOT NULL ,
  26.             prictickt NUMBER(4) NOT NULL ,
  27.             NOpassport NUMBER(20) NOT NULL ,
  28.             NumberFliight  VARCHAR2(15) NOT NULL  ,
  29.              CONSTRAINT const_NumberFliight_fk foreign KEY ( NumberFliight ) references information_flights ( NumberFliight )  );
Advertisement
RAW Paste Data Copied
Advertisement