<div dir="ltr"><div>Hello,</div><div><br></div><div>I am working on the following github project: <a href="https://github.com/affluent-bilby-classifieds/react-admin-and-postgraphile-playground">https://github.com/affluent-bilby-classifieds/react-admin-and-postgraphile-playground</a></div><div><br></div><div>I am trying to create a menu database in postgres for a react-admin dashboard for a burger restaurant. <br></div><div>I am trying to normalize the "menu" table so that it has a category_id instead of a written char field. I have set this to   NUMERIC(2).</div><div>I then create the categories table with the id as the primary field. <br></div><div>Without going into further details about react-admin I will be able to select a category from a dropdown menu so long as I have setup my postgres database correctly.</div><div><br></div><div>I believe I need to JOIN the two tables (<a href="https://www.tutorialspoint.com/postgresql/postgresql_using_joins.htm">https://www.tutorialspoint.com/postgresql/postgresql_using_joins.htm</a>)</div><div><br></div><div>As I have never done this before please let me know if I am on the right track and if so how I would apply this join. If you have any further questions please let me know.</div><div><br></div><div>Thank you</div><div><br></div><div>Best regards,</div><div><br></div><div>Chris<br></div><div><br></div><div>This is my seed.sql file:</div><div><br></div><div>SET client_min_messages = error;<br><br>CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;<br><br>DROP TABLE IF EXISTS public.contacts CASCADE;<br><br>CREATE TABLE public.contacts (<br>    id             UUID PRIMARY KEY DEFAULT uuid_generate_v4() NOT NULL,<br>    email          VARCHAR(255) NOT NULL,<br>    firstname      VARCHAR(255),<br>    lastname       VARCHAR(255),<br>    website        VARCHAR(255),<br>    streetaddress  VARCHAR(255),<br>    phone          VARCHAR(255),<br>    companyname    VARCHAR(255),<br>    created_at     TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP<br>);<br><br>CREATE INDEX contacts_email_index ON public.contacts (email);<br><br><br>DROP TABLE IF EXISTS public.menu CASCADE;<br><br>CREATE TABLE public.menu (<br>    id             SERIAL PRIMARY KEY,<br>    title          VARCHAR(255) NOT NULL,<br>    category_id    NUMERIC(2)<br>    price          NUMERIC(8, 2),<br>    desc1          VARCHAR(255),<br>    isenabled      BOOLEAN NOT NULL DEFAULT TRUE,   <br>    created_at     TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP<br>);<br><br><br>DROP TABLE IF EXISTS public.menu.categories CASCADE;<br><br>CREATE TABLE public.menu.categories (<br>    id             SERIAL PRIMARY KEY,<br>    catname        VARCHAR2(255) NOT NULL,<br>    created_at     TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP<br>);<br><br><br><br><br><br><br><br><br><br>SET client_min_messages = INFO;<br></div><div><br></div></div>