Re: How to store user's tastes

From: Luuk <luuk_at_invalid.lan>
Date: Mon, 22 Apr 2019 08:50:02 +0200
Message-ID: <5cbd6416$0$22340$e4fe514c_at_news.xs4all.nl>


On 22-4-2019 00:21, ^Bart wrote:

>> More difficult to keep the data consistent over tables.

>
> I created three tables:
>
...

> CREATE TABLE ingredientcategories
> (
> id_ingredientcategory TINYINT(7) NOT NULL AUTO_INCREMENT,
...

>
> CREATE TABLE ingredients

..

> FK_id_ingredientcategory TINYINT(15) NOT NULL,
...

> CREATE TABLE foodlists

...

> FK_id_ingredientcategory SMALLINT(7) NOT NULL,
...
>
> Yes, this is a good idea but I think I solved the problem by using three
> tables.
>
> ^Bart

[Quoted] But the type of ingredientcategory should be tha same in all three tables.

[Quoted] And, is TINYINT not a bit small to hold something like ingredientcategory? It will only hold 127 values (if you only use positive int's)

-- 
Luuk
Received on Mon Apr 22 2019 - 08:50:02 CEST

Original text of this message