Hey,
I have some background with db creation and have done lot's of work creating and programming with RDBs.
I am currently working on a huge website and I am curious about cost/benifits of using a json array vs a relational table. My gut says I should be using a relational table instead of an array but I'm not sure how much of a problem it would be to use one vs the other.

IE:
My current structure for job applications is

CREATE TABLE tbl_job_applications_counselor
(
  id serial NOT NULL,
  application integer NOT NULL,
  "licenseType" character varying(16),
  "stateIssued" character varying(16),
  "licenseNumber" character varying(255),
  "licenseExpiration" date,
  "yearsLicensed" integer,
  approaches text,
  expertise text,
  "internetAtHome" boolean,
  "typingAbility" character varying(16),
  CONSTRAINT job_applications_counselor_pk PRIMARY KEY (id),
  CONSTRAINT job_applications_counselor_application_fk FOREIGN KEY (application)
      REFERENCES tbl_job_applications (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)

In an application they can select 3 areas of expertise and 2 approaches. Should I be creating two other tables for both of these values and have it relational?

I feel like I know the answer is yes but I need someone to verify this so I can slap myself in the right direction

Thanks

Recommended Answers

All 2 Replies

I would go for separte relational table for expertise and approches. Otherwise you have to struggle a lot to save, extract, report, query data in current case.
Also if your CEO ask to allow 5 expertise and 3 approches then all effort are to be made again.

You must and should go with the approach of using relational database.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.