Le dim. 19 juin 2022 à 09:35, Håvard F. Aasen via Emc-developers <
emc-developers@lists.sourceforge.net> a écrit :

> On 18.06.2022 01:47, andy pugh wrote:
> > On Fri, 17 Jun 2022 at 17:07, Jose Luis <j.l.toledan...@gmail.com>
> wrote:
> >
> >> Still need to figure the parts from linuxcnc like where i can get or put
> >> the data.
> >
> > Dewey added an interface. I'll be honest and say that it isn't how I
> > would have done it. But I didn't do it so....
> >
> > https://linuxcnc.org/docs/devel/html/tooldatabase/tooldatabase.html
> >
>
> I was looking at these tables, and beside that table names are written
> in plural form,


Is that considered "bad" practice?


        toolID          TEXT PRIMARY KEY,
>         T_number        INTEGER,
>
> As this is described, it seems to me that toolID really is a description,
> and T_number could be used as the primary key, like so
>
>         toolID          INTEGER PRIMARY KEY, -- alias T_number
>         description     TEXT
>

So now it will become patent I hadn't really looked at it before... But I'd
actually go a step further and make:
* "tool_id" an auto-generated integer primary key (this has slept a day in
MB so just seconding Rod's point now)
* "tool_number" a user editable UNIQUE integer
* "tool_name" UNIQUE text
* "tool_description" text

Thinking again, uniqueness constraint on name and number could even be
optionnal and a user pref

_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to