Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE "BATTALIONS"
- ( "REGIMENT_ID" NUMBER(6,0),
- "NUMBE" VARCHAR2(20 BYTE),
- "COMMANDER_ID" NUMBER(6,0)
- );
- CREATE TABLE "PLATOONS"
- ( "UNIT_ID" NUMBER(6,0),
- "UNIT_NAME" VARCHAR2(15 BYTE),
- "COMMANDER_ID" NUMBER(6,0),
- "REGIMENT_ID" NUMBER(6,0)
- );
- CREATE TABLE "RANKS"
- ( "RANK_ID" NUMBER(4,0),
- "RANK_NAME" VARCHAR2(25 BYTE)
- );
- CREATE TABLE "SERVICE_HISTORY"
- ( "SOLIDER_ID" NUMBER(6,0),
- "START_DATE" DATE,
- "END_DATE" DATE
- ) ;
- CREATE TABLE "SOLIDERS"
- ( "SOLIDER_ID" NUMBER(6,0),
- "FIRST_NAME" VARCHAR2(25 BYTE),
- "LAST_NAME" VARCHAR2(25 BYTE),
- "DATE_OF_BIRTH" DATE,
- "PAY" NUMBER(8,0),
- "BARRACK_ID" NUMBER(6,0),
- "RANK_ID" NUMBER(6,0),
- "WEAPON_ID" NUMBER(6,0),
- "VEHICLE_ID" NUMBER(6,0),
- "SPECIALIZATION_ID" NUMBER(6,0),
- "UNIT_ID" NUMBER(6,0)
- );
- CREATE TABLE "SPECIALIZATIONS"
- ( "SPECIALIZATION_ID" NUMBER(6,0),
- "SPECIALIZATION_NAME" VARCHAR2(25 BYTE)
- );
- CREATE TABLE "VEHICLES"
- ( "VEHICLE_ID" NUMBER(6,0),
- "TYPE" VARCHAR2(20 BYTE),
- "MODEL" VARCHAR2(20 BYTE),
- "CREW_SIZE" NUMBER(6,0)
- );
- CREATE TABLE "WEAPONS"
- ( "WEAPON_ID" NUMBER(6,0),
- "NAME" VARCHAR2(20 BYTE),
- "TYPE" VARCHAR2(20 BYTE),
- "QUANTITY" NUMBER(4,0)
- );
- ALTER TABLE "BARACKS" MODIFY ("BARACK_ID" NOT NULL ENABLE);
- ALTER TABLE "BARACKS" ADD CONSTRAINT "BARACKS_PK" PRIMARY KEY ("BARACK_ID");
- ALTER TABLE "SERVICE_HISTORY" ADD PRIMARY KEY ("SOLIDER_ID");
- ALTER TABLE "SPECIALIZATIONS" MODIFY ("SPECIALIZATION_ID" NOT NULL ENABLE);
- ALTER TABLE "SPECIALIZATIONS" ADD CONSTRAINT "SPECIALIZATIONS_PK" PRIMARY KEY ("SPECIALIZATION_ID");
- ALTER TABLE "PLATOONS" MODIFY ("UNIT_ID" NOT NULL ENABLE);
- ALTER TABLE "PLATOONS" ADD CONSTRAINT "PLATOONS_PK" PRIMARY KEY ("UNIT_ID");
- ALTER TABLE "RANKS" MODIFY ("RANK_NAME" NOT NULL ENABLE);
- ALTER TABLE "RANKS" MODIFY ("RANK_ID" NOT NULL ENABLE);
- ALTER TABLE "RANKS" ADD CONSTRAINT "RANKS_PK" PRIMARY KEY ("RANK_ID");
- ALTER TABLE "WEAPONS" ADD CONSTRAINT "WEAPONS_PK" PRIMARY KEY ("WEAPON_ID");
- ALTER TABLE "WEAPONS" MODIFY ("QUANTITY" NOT NULL ENABLE);
- ALTER TABLE "WEAPONS" MODIFY ("NAME" NOT NULL ENABLE);
- ALTER TABLE "WEAPONS" MODIFY ("WEAPON_ID" NOT NULL ENABLE);
- ALTER TABLE "VEHICLES" ADD CONSTRAINT "VEHICLES_PK" PRIMARY KEY ("VEHICLE_ID");
- ALTER TABLE "VEHICLES" MODIFY ("CREW_SIZE" NOT NULL ENABLE);
- ALTER TABLE "VEHICLES" MODIFY ("VEHICLE_ID" NOT NULL ENABLE);
- ALTER TABLE "BATTALIONS" MODIFY ("REGIMENT_ID" NOT NULL ENABLE);
- ALTER TABLE "BATTALIONS" ADD CONSTRAINT "BATTALIONS_PK" PRIMARY KEY ("REGIMENT_ID");
- ALTER TABLE "SOLIDERS" MODIFY ("SOLIDER_ID" NOT NULL ENABLE);
- ALTER TABLE "SOLIDERS" ADD CONSTRAINT "SOLIDERS_PK" PRIMARY KEY ("SOLIDER_ID");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement