Skip to content

Database for recording allergic reactions and meals. / アレルギー反応と食事を記録するためのシンプルなデータベースの雛形です。 SQLiteで「*.db」ファイルを作成しています。

License

Notifications You must be signed in to change notification settings

machistore/allergic-reactions-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

allergic reactions database

This is a simple database template for recording allergic reactions and meals.
The "*.db" file was created in SQLite.

アレルギー反応と食事を記録するためのシンプルなデータベースの雛形です。
SQLiteで「*.db」ファイルを作成しています。

DEMO

Example of recording a database with "DB Browser for SQLite".1

「DB Browser for SQLite」を使ってデータベースを記録した例です。2

demo12

Features

We have made it as simple as possible to manage the presence or absence of allergy symptoms first.

できるだけシンプルかつ、アレルギー症状の有無をまずは管理できるようにつくりました。

table list テーブルリスト

name
テーブル名
Description
説明
allergens Allergy Causes
アレルギーの原因
diagnoses diagnoses
診断内容
diagnosticians diagnostician
診断した者
meals What you ate
食事内容
reactions Allergic reactions
アレルギー反応の有無
sqlite_sequence autoincrement of siagnostician
siagnosticianのautoincrement

table configuration テーブルの構成

allergens table configuration アレルギー原の食材テーブル

cid name type notnull dflt_value pk hidden
0 id INTEGER 1 1 0
1 allergen TEXT 0 0 0
2 diagnostician_id INTEGER 0 0 0
  1. id(Primary key)
  2. allergen
    • Foods to which you are allergic (e.g., cherries)
    • アレルギーの原因となる食材(例:さくらんぼ)
  3. diagnostician_id
    • Diagnosed (see diagnostician table)
    • 診断した者(diagnostician table 参照)

diagnoses table configuration アレルギーの診断テーブル

cid name type notnull dflt_value pk hidden
0 id INTEGER 1 1 0
1 created_at TEXT 0 datetime('now', 'localtime') 0 0
2 updated_at TEXT 0 datetime('now', 'localtime') 0 0
3 reaction_id INTEGER 0 0 0
4 allergen_id INTEGER 0 0 0
5 meal_id INTEGER 0 0 0
6 diagnostician_id INTEGER 0 0 0
7 treatment TEXT 0 0 0
  1. id(Primary key)
  2. created_at
    • Date and time the data was created(auto-date).
    • データをつくった日時(自動作成)
  3. updated_at
    • Date and time the data was updated(auto-date).
    • データを更新した日時(自動作成)
  4. reaction_id
    • Allergic reaction (yes or no, see reaction table).
    • アレルギー反応(あり or なし,reaction table 参照)
  5. allergen_id
    • Allergic reaction (yes or no, see reaction table).
    • アレルゲンの名前(allergen table 参照)
  6. meal_id
    • Meal table (see meal table).
    • 食事内容(meal table 参照)
  7. deagnostician_id
    • Persons diagnosed (see deagnostician table).
    • 診断した者(deagnostician table 参照)
  8. treatment
    • Notes on treatment methods, etc.
    • 治療方法などのメモ

diagnosticians table configuration 診断者テーブル

cid name type notnull dflt_value pk hidden
0 id INTEGER 1 1 0
1 diagnostician TEXT 0 0 0
  1. id(Primary key)
  2. diagnostician
    • Person who made the diagnosis (e.g., the person himself/herself, Doctor xx)
    • 診断した者(例:本人,xx医師)

meals table configuration 食事テーブル

cid name type notnull dflt_value pk hidden
0 id INTEGER 1 1 0
1 created_at INTEGER 0 datetime('now', 'localtime') 0 0
2 url TEXT 0 0 0
3 memo TEXT 0 0 0
  1. id
    • id(Primary key)
  2. created_at
    • The date the data was created(auto-date).
    • データを作成した日付(自動作成)
  3. url
    • This is a path of images taken of the meal.
      • It is assumed that the contents of the meal will be recorded using a service that manages images taken with a smartphone or other device in the cloud and records URLs and other links.
    • 食事の内容を撮影した画像のパス(URL)
      • 食事の内容はスマートフォンなどで撮影した画像をクラウドで管理するサービスなどを利用して、 URLなどリンク先を記録するように想定しています。
  4. memo
    • A brief note of the meal.
    • 食事の内容の簡単なメモ書き

reactions table configuration アレルギー反応テーブル

cid name type notnull dflt_value pk hidden
0 id INTEGER 1 1 0
1 created_at TEXT 0 datetime('now', 'localtime') 0 0
2 reaction INTEGER 0 0
3 symptom TEXT 0 0 0
  1. id
    • id(Primary key)
  2. created_at
    • The date the data was created(auto-date).
    • データを作成した日付(自動作成)
  3. reaction
    • Presence of allergic symptoms (None: 0, Yes: 1)
    • アレルギー症状の有無(なし:0、あり:1)
  4. symptom
    • Description of allergy symptoms (e.g., nausea)
    • アレルギー症状の内容(例:吐き気)

E-R diagram

ER_diagram

Requerement

An environment that can operate SQLite is required.

SQLiteが動作する環境が必要です。

Installation

Unzip the zip file downloaded from "Release" and open the "allergic_reactions.db" file in the "allergic-reactions-database-0.1.0" folder with "DB Browser for SQLite".
Or, use SQLite from a command prompt.

Release」からダウンロードしたzipファイルを解凍し、「allergic-reactions-database-0.1.0」フォルダの中の「allergic_reactions.db」ファイルを"DB Browser for SQLite"で開く、
もしくはコマンドプロンプトなどからSQLiteをお使いください。

Author

License

"marionette_palettes" is under The MIT License(https://licenses.opensource.jp/MIT/MIT.html)

Copyright (c) 2022 Katsutoshi Machida

Footnotes

  1. Please obtain and use "DB Browser for SQLite" by yourself.
    Downloads

  2. 「DB Browser for SQLite」は、ご自身で入手しご利用ください。
    Downloads

About

Database for recording allergic reactions and meals. / アレルギー反応と食事を記録するためのシンプルなデータベースの雛形です。 SQLiteで「*.db」ファイルを作成しています。

Resources

License

Stars

Watchers

Forks

Packages

No packages published