Aircrafts Table

From Openflyers

Jump to: navigation, search

Contents

Contenu actuel de la table aircrafts

nom du champtypedescription
NUMint(10)Aircraft ID (PRIMARY KEY)
CALLSIGNvarchar(255)Aircraft Callsign (UNIQUE)
TYPEvarchar(255)Aircraft Type
FLIGHT_HOUR_COSTSvarchar(255)Aircraft flight hour cost
SEATS_AVAILABLEtinyint(3)Number of seats in the aircraft
COMMENTSvarchar(255)Comments on the aircraft
ORDER_NUMint(10)Used to sort all aircrafts (UNIQUE)

Nouvelle table aircraft_type

nom du champtypedescription
idint(10)ID (PRIMARY KEY)
admin_descvarchar(255)AircraftType's description for admin (UNIQUE)
namevarchar(255)AircraftType's name
seats_availabletinyint(3)Number of seats in the aircraft
commentsvarchar(255)Comments on the type of the aircraft
order_numint(10)Used to sort all types (UNIQUE)
flight_time_formulaVARCHAR(255)Formule pour calculer le temps de vol
counter_stateTINYINT0 = heures minutes

1 = heures centiemes

TOLERANCEINTCounter tolerance en sexacentimal
autonomyINTAutonomy

Le champ type de la table aicraft passe de VARCHAR(255) à INT(10) et pointe sur le id de la table aircraft_type

Le champ seats_available de la table aircraft disparait

Ajouts dans la table aircrafts

Pour le calcul des potentiels restants

ChampTypeDéfautExtraDescription
REF_DATEDATE0000-00-00Reference date

No data should be recorded in Flight table before this date

REF_HRSINT0Total time at Ref_date in minute
INSP_DATEDATE0Last inspection date
INSP_TIMEINT0Last inspection time
INTERVAL_VISITTINYINT50Time between 2 visit
TOLERANCE_TIMETINYINT10Maximum over time allocated


Penser à faire un script qui update les champs ref_date et insp_date (qui sont nulls quand on alter la table aircrafts, même en mettant DEFAULT 0 ...) pour y mettre 0.

Pour les temps de vol et les vérifications

ChampTypeDéfautExtraDescription
LAST_COUNTERINT0Last counter
ACTIVATEDTINYINT10 = no active

1 = Active aircraft


Pour les places autorisées par type d'avion

Création de la table aircrafttype_allowed_function

ChampTypeDéfautDescription
id_aircraft_typeINTid de l'avion
place_numINTnuméro de place (commence à 0)
id_functionINTid de la fonction de la personne assise la place numero place_num

[}

Personal tools