Foodb Database Schema Information
foods
Food table that contains external ids, identifiers, etc. The id is food_id for mapping in contents table
| Field Name | Description | Data Type |
|---|---|---|
| name | Food common name (may be different naming convention in different countries and areas) | string |
| name_scientific | Food scientific name. It's a good source for mapping the food | string |
| description | Manual written description | text |
| public_id | Foodb ID (i.e. it is not food_id that used for mapping in contents table) |
string |
contents
Association between foods table with compounds and nutrients table. Mapping based on source_id in food_id
| Field Name | Description | Data Type |
|---|---|---|
| source_id | Depends on source_type, it either maps with compound id or nutrient id | integer |
| source_type | Nutrient OR Compound | string |
| food_id | Food id (i.e. not food public id) | integer |
| orig_food_common_name | The original name of the food content (e.g. Coffee, instant, powder) | string |
| orig_min, orig_max | minimal concentration of source_id in food_id |
decimal |
| orig_content | Either average of origin_min and origin_max; or directly draw from paper and literature | decimal |
| orig_unit | Unit (e.g. mg/100g) | decimal |
compounds
This table contains information about compounds, which include the compound properties, external ids, identifiers
| Field Name | Description | Data Type |
|---|---|---|
| public_id | FDB_ID (e.g. FDB000004) | string |
| name | compound name | string |
| export | 1: currently used in foodb database; 2: current not used in foodb database (safe to ignore) | boolean (1 or 2) |
| description | Manual written or computer generated compound description | text |
| status | 0: quantified; 1: detected; 2: expected; 3: predicted | integer |
nutrients
This table contains information about nutrients, which include external ids and identifiers
| Field Name | Description | Data Type |
|---|---|---|
| name | Nutrient name | string |
| description | Nutrient description | string |
| public_id | Foodb nutrient id (i.e. different from nutrient_id) |
string |