Your SlideShare is downloading. ×
Airport traffic control simple database model
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Airport traffic control simple database model

335
views

Published on

zaid daood

zaid daood


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
335
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Near East University Oracle database project Airport traffic control simple database model 2013 Under the supervision of Prf. omer gumus By Zaid dawad al-rustom 20112465 |Page0
  • 2. AbstractIn this report I will discuss an airport traffic control , first thing everyairport need for control traffic that mange all the flight and try to makeeverything is safety and without any error , for that the controller need toget all the information at the exact time and all the update at time.What we need?Simple survey on an airport and register all things related with the flightand fields and garages ….etc.DiscussionFirst thing should detect the important table and the contains and allrelation between them, and what constraint need for table, how to choosethe table names and how to write the columns names how to build thetables.What does this database try to do?This database trying to gather all data and details that air traffic controllerneed to control one flight (flying or landing) , gathering the data in tablenamed checking table to check every details related with flight and at lastthe controller will decide if pass or fail and give the signal to responsibleperson.Tables names: 1- Plane 2- Flights 3- Captains 4- fields 5- companies 6- weather 7- controller 8- criteria 9- checking table
  • 3. Tables Contains with data types and constraints:1- PlaneAny details related with the plane. Column name data type constrain  planeID …………………………….NUMBER (20)…… ….pk  planeNo……………….……….. VARCHAR2 (10)...NOTNULL  planeType (type on plane size)..… VARCHAR2 (15)…….  planelandDATE…….. ……….… VARCHAR2 (20) planelandTime ……………….... … VARCHAR2 (20)  planeflyDATE …………..…..… VARCHAR2 (20)  planeflyTime ………………….... … VARCHAR2 (20)  compID……………………. NUMBER (4)…………….fk 2-flightsFlights information. Column name data type constrain  flightID………………..….… NUMBER (4)………..….pk  flightNo…………………... VARCHAR2 (10)………..NOTNULL  flightDirecton…...………... VARCHAR2 (20)  flightDate ……………….… VARCHAR2 (20)  flightTime ……………… … VARCHAR2 (20)  weatherID……………………. NUMBER (4)…………….fk3-captainsA planes captain information. Column name data type constrain  captainID…………………… NUMBER (4)…………..….pk  captainName…...……………VARCHAR2 (20)…..…..NOTNULL  captainTel…………………... VARCHAR2 (15)  captainAdd…….………..…... VARCHAR2 (20)  fieldsID…………………… NUMBER (4)………….fk
  • 4. 4- fields Column name data type constrain  fieldsID…………………… NUMBER (4)………….pk  flyingFNo……………..…….. VARCHAR2 (10)……..NOTNULL  flyingFAvalabilty…………..NUMBER(1) "0-available,1- notavailable"……………………………………………check  landingFNo ………………….VARCHAR2 (10)……..NOTNULL  landingFAvalability…………..NUMBER(1) "0-available,1- notavailable"…………………………………………..check  compID……………………. NUMBER (4)…………….fk  5-companiesAirplane Companys information. Column name data type constrain  compID……………………. NUMBER (4)…………….pk  compName………………… VARCHAR2 (20)……..NOTNULL  compAdd……………………………... VARCHAR2 (20)  compTel………………… VARCHAR2 (15)  controlerID……………..… NUMBER (4)……….….fk 6-weatherThis table store the real weather that controller need for. Column name data type constrainweatherID……………………. NUMBER (4)…………….pkwindspeed………………… VARCHAR2 (20)……..NOTNULLcloudDensity………………… VARCHAR2 (20).Temperature………………… VARCHAR2 (20).Rain gauge………………… VARCHAR2 (20).
  • 5. 7-controllerThe person that control the traffic. Column name data type constrain  controlerID……………..… NUMBER (4)……….….pk  controlerName……….…… VARCHAR2 (20)……..NOTNULL  controledate……….…… VARCHAR2 (20)  controletime……….…… VARCHAR2 (20)  criteriaID ………….. NUMBER (4)…………………….fk8-criteriathe criteria that controller depend on it, this table contain some fact andrules that the controller need for. Column name data type constrain  criteriaID ………….. NUMBER (4)…………………….…….pk  weatherdetails …..….VARCHAR2 (011)…………....NOTNULL  faieldsdetails…….….VARCHAR2 (011)  captainsdetails…..….VARCHAR2 (011)  planedetails…..….VARCHAR2 (011)  flightID………………..….… NUMBER (4)………..….fk 9-checking table Column name data type constrain  checkID………….. NUMBER (20)………………….pk  checkNo ………….VARCHAR2 (20)……………....NOTNULL  chekDate………... ..DATE  checkTime..……….DATE  planeID…………....NUMBER(4)……………………….fk
  • 6. Database schema and show relations:Sql commands and declaring the work:1-plane table Creating table codeCREATE TABLE "SYSTEM"."PLANE" ( "PLANEID" NUMBER(4,0) NOT NULL ENABLE, "PLANENO" VARCHAR2(10 BYTE) NOT NULL ENABLE, "PLANETYPE" VARCHAR2(15 BYTE), "PLANELANDDATE" VARCHAR2(20 BYTE), "PLANELANDTIME" VARCHAR2(20 BYTE), "PLANEFLYDATE" VARCHAR2(20 BYTE), "PLANEFLYTIME" VARCHAR2(20 BYTE), CONSTRAINT "PLANE_PK" PRIMARY KEY ("PLANEID")USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICSSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULTFLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  • 7. TABLESPACE "SYSTEM" ENABLE, CONSTRAINT "CAP" FOREIGN KEY ("PLANEID") REFERENCES "SYSTEM"."COMPANIES" ("COMPID") DISABLE ) 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 DEFAULTFLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; First inserting codeinsert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1212,PLANE_SEQ.NEXTVAL,boeing717,1912013,2:30am,2012013,3:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1313,PLANE_SEQ.NEXTVAL,avanger201,1512013,12:30am,1212013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1414,PLANE_SEQ.NEXTVAL,boeing777,1712013,1:30am,1612013,3:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1515,PLANE_SEQ.NEXTVAL,boeing787,2312013,1:30am,2112013,3:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1616,PLANE_SEQ.NEXTVAL,airbus787,2012013,6:30am,1912013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1717,PLANE_SEQ.NEXTVAL,airbus202,1312013,6:30am,1012013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1818,PLANE_SEQ.NEXTVAL,boeing771,1412013,6:30am,1312013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (1919,PLANE_SEQ.NEXTVAL,airbus771,1512013,6:30am,1212013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (2020,PLANE_SEQ.NEXTVAL,airbus301,1712013,6:30am,1512013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)values (2121,PLANE_SEQ.NEXTVAL,boeing213,1812013,6:30am,1712013,4:35pm)insert into plane(PLANEID,planeno,planetype,planeflydate,planeflytime,planelanddate,planelandtime)
  • 8. values (2222,PLANE_SEQ.NEXTVAL,airbus213,1112013,6:30am,1012013,4:35pm) Figure 1 inserting data Updating codeupdate plane set planetype=boeing767 where planeid=1212 Figure 2 update
  • 9. Delete codedelete plane where planeid=2222 Figure 3 Selectingselect planeno,planetype,planeflytime from planeselect planeid,planetype,planelandtime from plane
  • 10. Figure 4 View report CREATE OR REPLACE FORCE VIEW "SYSTEM"."PLANE_REPORT" ("PLANEID", "PLANENO", "PLANETYPE") AS SELECT planeid,planeno,planetype FROM plane; Figure 5Flights tables Create table CREATE TABLE "SYSTEM"."FLIGHTS"
  • 11. ( "FLIGHTID" NUMBER(4,0) NOT NULL ENABLE, "FLIGHTNO" VARCHAR2(20 BYTE), "FLIGHTDIRECTION" VARCHAR2(20 BYTE), "FLIGHTDATE" VARCHAR2(20BYTE), "FLIGHTTIME" VARCHAR2(20 BYTE), CONSTRAINT "FLIGHTS_PK" PRIMARY KEY("FLIGHTID")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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE, CONSTRAINT "COMPID" FOREIGN KEY ("FLIGHTID") REFERENCES "SYSTEM"."COMPANIES" ("COMPID") ENABLE ) 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; Insert datainsert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3030,flight_seq.nextval,istanbul,1912013,2:30am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3131,flight_seq.nextval,ankara,1712013,4:50am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3232,flight_seq.nextval,antip,1512013,7:55am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3434,flight_seq.nextval,borsa,2312013,4:30am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3535,flight_seq.nextval,diarbaker,2212013,6:30am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3636,flight_seq.nextval,istanbul,2512013,11:30am)
  • 12. insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3737,flight_seq.nextval,adana,2712013,9:30am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3838,flight_seq.nextval,mersin,2212013,12:30am)insert into flights(flightid,flightno,flightdirection,flightdate,flighttime)values (3939,flight_seq.nextval,mardin,2812013,4:30am) Figure 6 Updateupdate flightsset flighttime=2:45where flightdirection=istanbul
  • 13. Figure 7 Deletedelete flights where flightdirection=borsa Figure 8
  • 14. Selectselect flightdirection,flightdate,flighttime from flights; Figure 9 View report CREATE OR REPLACE FORCE VIEW "SYSTEM"."FLIGHT_REPORT" ("FLIGHTDIRECTION","FLIGHTDATE", "FLIGHTTIME") AS SELECT flightdirection,flightdate,flighttime FROM flights; Figure 10
  • 15. CAPTAIN’s tables Create tableCREATE TABLE "SYSTEM"."CAPTAINS" ( "CAPTAINID" NUMBER(4,0) NOT NULL ENABLE, "CAPTAINNAME" VARCHAR2(20 BYTE) NOT NULL ENABLE, "CAPTAINADD" VARCHAR2(10 BYTE), "CAPTAINTEL" VARCHAR2(20 BYTE), CONSTRAINT "CAPTAINS_PK" PRIMARY KEY ("CAPTAINID") 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE, CONSTRAINT "CAPTAINS_COMPANIES_FK1" FOREIGN KEY ("CAPTAINID") REFERENCES "SYSTEM"."COMPANIES" ("COMPID") ENABLE ) 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; Insert datainsert into captains(captainid,captainname,captainadd,captaintel)values (3030,ahmed,lefkosa,05488228807)insert into captains(captainid,captainname,captainadd,captaintel)values (3131,zaid,gonyli,0533456679)insert into captains(captainid,captainname,captainadd,captaintel)values (3232,mustafa,deraboy,0533421345)insert into captains(captainid,captainname,captainadd,captaintel)values (3434,amjad,raies,0533424387)
  • 16. insert into captains(captainid,captainname,captainadd,captaintel)values (3535,abdullah,deraboy,0533429876)insert into captains(captainid,captainname,captainadd,captaintel)values (3636,safwan,girne kapi,0533422365)insert into captains(captainid,captainname,captainadd,captaintel)values (3737,ali,magusa,0533423948)insert into captains(captainid,captainname,captainadd,captaintel)values (3838,omer,dipkarpaz,053342039)insert into captains(captainid,captainname,captainadd,captaintel)values (3939,dilovan,kacmenkoy,053341234) Figure 11
  • 17. Updateupdate aptains set captainadd=deraboy where aptainname=zaid; Figure 12 Deletedelete captains where captainname=dilovan; Figure 13
  • 18. Selectselect captainname,captainadd,captaintel from captains Figure 14 View report Figure 15
  • 19. COMPANIES Create table CREATE TABLE "SYSTEM"."COMPANIES" ( "COMPID" NUMBER NOT NULL ENABLE, "COMPNAME" VARCHAR2(10 BYTE) NOT NULL ENABLE, "COMPADD" VARCHAR2(20 BYTE), "COMPTEL" VARCHAR2(20 BYTE), CONSTRAINT "COMPANIES_PK" PRIMARY KEY ("COMPID") 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE ) 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; Insert datainsert into companies(compid,compname,compadd,comptel)values (3030,atlasjet,lefkosa,05488223456)insert into companies(compid,compname,compadd,comptel)values (3131,pegasus,lefkosa,05488274839)insert into companies(compid,compname,compadd,comptel)values (3333,zaid,lefkosa,05488234839)insert into companies(compid,compname,compadd,comptel)values (3232,onur,lefkosa,05488274839)insert into companies(compid,compname,compadd,comptel)
  • 20. values (3434,turkish,lefkosa,0548876839)insert into companies(compid,compname,compadd,comptel)values (3535,greece,lefkosa,0548876839)insert into companies(compid,compname,compadd,comptel)values (3636,emarat,lefkosa,0548876456)insert into companies(compid,compname,compadd,comptel)values (3737,saudia,lefkosa,0533876456)insert into companies(compid,compname,compadd,comptel)values (3838,pegasus,girne,0533876456)insert into companies(compid,compname,compadd,comptel)values (3939,atlas,girne,0533876456) Figure 16 Updatingupdate companiesset compadd=girnewhere compname=zaid
  • 21. Figure 17 Selectselect compname,compadd,comptel from companies Figure 18
  • 22. View report Figure 19CONTROLLER Create tableCREATE TABLE "SYSTEM"."CONTROLLER" ( "CONTROLLERID" NUMBER(4,0) NOT NULL ENABLE, "CONTROLLERNAME" VARCHAR2(20 BYTE) NOT NULL ENABLE, "CONTROLEDATE" VARCHAR2(20 BYTE), "CONTROLETIME" VARCHAR2(20 BYTE), CONSTRAINT "CONTROLLER_PK" PRIMARY KEY ("CONTROLLERID")USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICSSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "SYSTEM" ENABLE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGINGSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ;
  • 23. Insert datainsert into controller(controllerid,controllername,controledate,controletime)values (3030,omet,17012013,2:10)insert into controller(controllerid,controllername,controledate,controletime)values (3131,azad,22012013,3:50)insert into controller(controllerid,controllername,controledate,controletime)values (3232,saman,15012013,4:50)insert into controller(controllerid,controllername,controledate,controletime)values (3434,deyar,16012013,7:30)insert into controller(controllerid,controllername,controledate,controletime)values (3535,waleed,19012013,8:45)insert into controller(controllerid,controllername,controledate,controletime)values (3636,darbaz,24012013,9:30)insert into controller(controllerid,controllername,controledate,controletime)values (3737,ibrahim,26012013,12:30)insert into controller(controllerid,controllername,controledate,controletime)values (3838,mahmood,13012013,10:30)insert into controller(controllerid,controllername,controledate,controletime)values (3939,rayan,11012013,5:45) Figure 20
  • 24. Updateupdate plane set controllername=erdam where controletime=2:10; Figure 21 Deletedelete controller where controllername=erdam Figure 22
  • 25. Selectselect controllername,controletime from controller Figure 23 View reportFigure 24
  • 26. FIELDS Create table CREATE TABLE "SYSTEM"."FIELDS "( "FIELDID" NUMBER(4,0) NOT NULL ENABLE , "FLYINGFIELDNO" VARCHAR2(10 BYTE) NOT NULL ENABLE , "LANDINGFIELDNO" VARCHAR2(20 BYTE ,) "FLYINGFAVAIL" NUMBER(1,0 ,) "LANDINGFAVAIL" NUMBER , CONSTRAINT "LANDINGFAVAIL1" CHECK (LANDINGFAVAIL BETWEEN 0 AND 1)ENABLE , CONSTRAINT "FLYINGFAVAIL1" CHECK (FLYINGFAVAIL BETWEEN 0 AND 1) ENABLE , CONSTRAINT "FIELDS_PK" PRIMARY KEY ("FIELDID)" 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE) 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; Insert data)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3030,12,14,1,0)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3131,11,15,0,0)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail
  • 27. )values (3232,9,13,0,1)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3434,6,3,1,1)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3535,11,2,0,0)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3636,7,12,1,1)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3737,5,11,0,1)insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3838,13,14,1,0insert into fields(fieldid,flyingfieldno,landingfieldno,flyingfavail,landingfavail)values (3939,15,6,1,1) Figure 25 Updateupdate fields set flyingfavail=1 where flyingfieldno=11
  • 28. Figure 26 Deletedelete fields where flyingfieldno=13 72 Figure Selectselect fieldid,flyingfieldno,flyingfavail from fields
  • 29. select fieldid,landingfieldno,landingfavail from fields Figure 28 Figure 29
  • 30. WEATHER Create table CREATE TABLE "SYSTEM"."WEATHER" ( "WEATHERID" NUMBER(4,0) NOT NULL ENABLE, "WEATHER" VARCHAR2(20 BYTE) NOT NULL ENABLE, "CLOUDDENSITY" VARCHAR2(20 BYTE), "TEMPERATURE" VARCHAR2(20 BYTE), "RAINGAUGE" VARCHAR2(20 BYTE), CONSTRAINT "WEATHER_PK" PRIMARY KEY ("WEATHERID") 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE ) 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; Insert datainsert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3030,shiny,partly,17,no)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3131,cloudy,fully,11,2m2)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3232,shiny,no,15,no)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3434,rainy,full,6,12m2)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3535,Snow,full,2,no)
  • 31. insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3636,snow,full,0,no)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3737,shiny,no,10,no)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3838,shiny,no,14,no)insert into weather(weatherid,weather,clouddensity,temperature,raingauge)values (3939,rainy,fully,9,10m2) Figure 30
  • 32. Updateupdate weather set temperature=2 where temperature=0 Figure 31 Deletedelete weather where raingauge=10m2 Figure 32
  • 33. Selectselect weather,temperature,raingauge from weather Figure 33CRITERIA Create table CREATE TABLE "SYSTEM"."CRITERIA" ( "CRITERIAID" NUMBER(4,0) NOT NULL ENABLE, "WEATHERDETAILS" VARCHAR2(100 BYTE) NOT NULL ENABLE, "FIELDSDETAILS" VARCHAR2(100 BYTE), "CAPTAINDETAILS" VARCHAR2(100 BYTE), "PLANEDETAILS" VARCHAR2(100 BYTE), CONSTRAINT "CRITERIA_PK" PRIMARY KEY ("CRITERIAID") 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ENABLE
  • 34. ) 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_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ; Insert datainsert into criteria(criteriaid,weatherdetails,fieldsdetails,captaindetails,planedetails)values(3030,http://www.fly.faa.gov/flyfaa/usmap.jsp,http://airtrafficcontrol.minneapolis.edu/admissionrequirements,http://www.avjobs.com/careers/detail.asp?RecID=2#.UPMDnh30BnE,http://www.bls.gov/ooh/transportation-and-material-moving/air-traffic-controllers.htm) Figure 34CHECKINGTABLE Create table CREATE TABLE "SYSTEM"."CHECKINGTABLE" ( "CHECKID" NUMBER(4,0) NOT NULL ENABLE, "CHECKNO" VARCHAR2(10 BYTE) NOT NULL ENABLE, "CHECKDATE" VARCHAR2(20 BYTE),
  • 35. "CHECKTIME" VARCHAR2(20 BYTE), CONSTRAINT "CHECKINGTABLE_PK" PRIMARY KEY ("CHECKID")USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICSSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "SYSTEM" ENABLE, CONSTRAINT "C1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."CAPTAINS" ("CAPTAINID") ENABLE, CONSTRAINT "CL1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."CONTROLLER" ("CONTROLLERID") ENABLE, CONSTRAINT "CO1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."COMPANIES" ("COMPID") ENABLE, CONSTRAINT "F1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."FLIGHTS" ("FLIGHTID") ENABLE, CONSTRAINT "FE1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."FIELDS" ("FIELDID") ENABLE, CONSTRAINT "P1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."PLANE" ("PLANEID") ENABLE, CONSTRAINT "W1" FOREIGN KEY ("CHECKID") REFERENCES "SYSTEM"."WEATHER" ("WEATHERID") ENABLE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGINGSTORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHEDEFAULT CELL_FLASH_CACHE DEFAULT)TABLESPACE "SYSTEM" ;
  • 36. Insert datainsert into checkingtable(checkid,checkno,checkdate,checktime)values (3030,check_seq.NEXTVAL,1912013,2:30am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3131,check_seq.NEXTVAL,1512013,3:40am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3232,check_seq.NEXTVAL,1312013,12:45am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3434,check_seq.NEXTVAL,1012013,10:30am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3535,check_seq.NEXTVAL,1112013,11:30am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3636,check_seq.NEXTVAL,1212013,9:45am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3737,check_seq.NEXTVAL,2212013,12:45am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3838,check_seq.NEXTVAL,1112013,5:30am)insert into checkingtable(checkid,checkno,checkdate,checktime)values (3939,check_seq.NEXTVAL,912013,3:45am) Figure 35

×