简体   繁体   中英

Database Table Design guidance

I am creating a table of pilots with the following fields, would there be any advantage to breaking the table down at each category shown into separate tables and link via the pilots primary key in a one to one relationship?

PILOT PROFILE
    username
    password
  BASIC INFO
    first_name
    last_name
    email
    date_of_birth
    address_line1
    address_line2
    town_city
    county
    postcode
    country
    tel_no
    mobile_no
  MEDICAL INFO
    med_class
    med_issued
    med_special
    med_verified
    med_verified_date
    med_verified_by
  LICENCE INFO
    licence_number
    licence_type
    licence_tailwheel
    licence_retractableGear
    licence_vpProp
    licence_turboCharged
    licence_cabinPressurisation
    licence_sep_L
    licence_sep_S
    licence_mep_L
    licence_mep_S
    licence_tmg
    licence_night
    licence_imc
    licence_ir
    licence_fi
    licence_fe
    licence_other
    licence_verified
    licence_verified_date
    licence_verified_by
  FLIGHT EXPERIENCE
    home_airport
    hours_total
    hours_pic
    hours_in12months
    hours_verified
    hours_verified_date
    hours_verified_by
  PAYMENT
    paid_date

No. Don't break up the row data in this context.

For reasons of performance at scale, sometimes it makes sense to break a table 1:1 into other tables, but given the information provided, this will absolutely not be necessary.

However , on a per-query basis, please do SELECT only the fields needed. Meaning: instead of using SELECT * at whim, use something like SELECT username, password FROM pilot . Side note: don't store your passwords clear text :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM