Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8919075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:55:26+00:00 2026-06-15T05:55:26+00:00

I have one database with 6 tables. One of the table is named category

  • 0

I have one database with 6 tables.

One of the table is named category and it has 5 or 6 categories in it.

For example: Movie category that has the comedy, drama, thriller, horror, romance sub categories etc.

So can I, in the table, add the sub categories, or should I create them like tables?

And if I have a lot of data to add in the database is there any easier way to do it?

I’m working with xampp.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:55:28+00:00Added an answer on June 15, 2026 at 5:55 am

    Add a categoryOf field to the category tabel, it will be used to store the id of the ‘parent category’.

    For a sub category use this field to point to the category of which it is a sub category of.
    Leave the field empty for (main) category entries

    For example:

    id  name         categoryOf
    0   comedy       NULL
    1   drama        NULL
    2   sub-comedy   0
    3   sub-drama    1
    4   sub-comedy2  0
    

    Note: Using this method, you can even add sub-sub-categories if you like…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database named contacts.db with a table named TABLE_NAME that has one
I have a database with many tables and one particular table has columns: name
I have a database table named 'student' in which there is one column named
I have a calendar table in my MYSQL database with one field named datefield
I Have a table in my databse that one of the columns named NumOfView
In a MySQL database I have two tables linked in a join. One table
What I have is two tables inside of a mysql database. One table contains
I have a Sqlite database that has a table consisting of company information (Companies)
i have one table named category. in this table i have two columns 1.)
I have a database with a table called categories. The table has 3 columns:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.