--------------------------------------------------------
--  Fichier cr�� - ???-???-09-2022   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table VISITE
--------------------------------------------------------

  CREATE TABLE "E22B336U"."VISITE" 
   (	"MEDECIN" NUMBER(10,0), 
	"PATIENT" NUMBER(10,0), 
	"DATE_VISITE" VARCHAR2(20 BYTE), 
	"PRIX" VARCHAR2(20 BYTE)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
REM INSERTING into E22B336U.VISITE
SET DEFINE OFF;
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('1','1','10/11/2022','150');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('1','2','15/11/2022','200');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('1','5','10/11/2022','111');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('2','3','12/11/2022','800');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('2','4','20/11/2022','18');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('3','6','18/11/2022','888');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('4','7','21/11/2022','450');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('5','8','10/11/2022','1300');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('6','9','14/11/2022','500');
Insert into E22B336U.VISITE (MEDECIN,PATIENT,DATE_VISITE,PRIX) values ('7','10','15/11/2022','1');
--------------------------------------------------------
--  DDL for Index VISITE_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "E22B336U"."VISITE_PK" ON "E22B336U"."VISITE" ("MEDECIN", "PATIENT", "DATE_VISITE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
--------------------------------------------------------
--  Constraints for Table VISITE
--------------------------------------------------------

  ALTER TABLE "E22B336U"."VISITE" MODIFY ("MEDECIN" NOT NULL ENABLE);
  ALTER TABLE "E22B336U"."VISITE" MODIFY ("PATIENT" NOT NULL ENABLE);
  ALTER TABLE "E22B336U"."VISITE" MODIFY ("DATE_VISITE" NOT NULL ENABLE);
  ALTER TABLE "E22B336U"."VISITE" ADD CONSTRAINT "VISITE_PK" PRIMARY KEY ("MEDECIN", "PATIENT", "DATE_VISITE")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"  ENABLE;
--------------------------------------------------------
--  Ref Constraints for Table VISITE
--------------------------------------------------------

  ALTER TABLE "E22B336U"."VISITE" ADD CONSTRAINT "MED" FOREIGN KEY ("MEDECIN")
	  REFERENCES "E22B336U"."MEDECIN" ("MEDECIN_ID") ENABLE;
  ALTER TABLE "E22B336U"."VISITE" ADD CONSTRAINT "PAT" FOREIGN KEY ("PATIENT")
	  REFERENCES "E22B336U"."PATIENT" ("PATIENT_ID") ENABLE;
