care

Tables (6)

Lighting (tbl_light)

  • lightong_id (light_id) — INT — Primary key — NOT NULL
  • animal_id — INT — Foreign key → animal.animal_id — NOT NULL
  • light_on_time (light_on_tm) — TIME
  • light_off_time (light_off_tm) — TIME
  • last_changed (last_chg) — TIMESTAMP

Schedule (tbl_sched)

  • schedule_id (sched_id) — INT — Primary key — NOT NULL
  • animal_id — INT — Foreign key → animal.animal_id — NOT NULL
  • lightong_id (light_id) — INT — Foreign key → Lighting.lightong_id — NOT NULL
  • env_id — INT — Foreign key → environment.env_id — NOT NULL
  • food_water_id (fw_id) — INT — Foreign key → foodwater.food_water_id — NOT NULL
  • schedule_type (scged_type) — VARCHAR(50)
  • schedule_time (sched_time) — TIMESTAMP
  • status — VARCHAR(20)
  • created_at (crt_at) — TIMESTAMP

animal (tbl_animal)

  • animal_id — INT — Primary key — NOT NULL
  • ID (user_id) — String — Foreign key → user.ID — NOT NULL
  • animal_name (animal_nm) — VARCHAR(100)
  • species — VARCHAR(100)
  • age — INT
  • created_at (crt_at) — TIMESAMP

environment (tbl_env)

  • env_id — INT — Primary key — NOT NULL
  • animal_id — INT — Foreign key → animal.animal_id — NOT NULL
  • temperature (temp) — DECIMAL
  • humidity — DECIMAL
  • last_updated (last_upd) — TIMESTAMP

foodwater (tbl_fw)

  • food_water_id (fw_id) — INT — Primary key — NOT NULL
  • animal_id — INT — Foreign key → animal.animal_id — NOT NULL
  • food_amount (food_amt) — DECIMAL(5,2)
  • water_amount (water_amt) — DECIMAL(5,2)
  • schedule_time (sched_time) — TIMESTAMP
  • last_fed — TIMESTAMP

user

  • ID (user_id) — String — Primary key — NOT NULL
  • NAME (user_name) — String
  • EMAIL (user_email) — String
  • PASSWORD (user_password) — String
  • CREATED (user_created) — String
  • UPDATE (user_updated) — String