Answer the question
In order to leave comments, you need to log in
What site would you recommend for creating categories and subcategories in SQL?
I'm pretty good with relational databases in access (creating schemas and relationships in visual mode), but I don't understand how it works in SQL.
Answer the question
In order to leave comments, you need to log in
hmm...i don't understand the question.
entity_id - INT
category_entity_id - int (link to table_category.entity_id)
entity_id - INT
parent_id - INT // parent id
category_name - varchar
So, no?
Maybe so, but in this diagram they are also considered as subcategories?
It's just that I think I'm making it harder for myself by trying to do it via CONSTRAINT like in the example below:
CREATE TABLE my_subcat_2(
id_subcat_2 NUMBER
, subcat_2_name VARCHAR2(100) NOT NULL
, CONSTRAINT my_subcat_2#p
PRIMARY KEY(id_subcat_2)
, CONSTRAINT my_subcat_2#R#my_master
FOREIGN KEY(id_subcat_2)
REFERENCES my_master(id_master)
)
;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question