Is there any alternative to creating two tables: parent and child to implement parent child form. I am working with a database where the Parent Table contains repeated feilds on the Child. This makes the concept annoying to me. I could code with it that way but its anoying to me. I want to redesign the database, possibly merge the tables to 1 and use views instead of tables. I need suggestion on a work around and possible the pros and cons.
Thanks
You can Add Parent Id in same Table to avoid using 2 tables.
ex.
category_id ——– category_name ——— parent_category_id
1 ——————– CAT A ——————— 0
2 ——————– CAT CHILD A ———— 1
3 ——————– CAT CHILD A 1 ———- 1
4 ——————– CHILD OF A ————– 2
Likewise. Hope this will help.