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 1052207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:03:23+00:00 2026-05-16T17:03:23+00:00

I have a table which maintains categories from another site. I populate this table

  • 0

I have a table which maintains categories from another site.

I populate this table with the data i fetch from other site as xml.

The data are divided as categories and products.

Some products does not have a category and the category xml does not have the others category.

So what i thought was to add a category others and setting its primary auto increment ID field to -1. So while inserting values into products table for all the entries which dosent have a category i am setting to -1.

The auto increment initial values is 1.

Is this a good practice. will it be valid or will it be a problem sometimes later for some conditions(any)?

The db operations are working well but i want to know if it could be a problem later.

  • 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-05-16T17:03:24+00:00Added an answer on May 16, 2026 at 5:03 pm

    option one (my preference) – allow in products table categoryid == NULL. This is clearly shown non-categorized products.

    option two – create default category and assign product to this category if product category not specified

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

Sidebar

Related Questions

I have a table which stores the data related to posts in this format
I have a table which maintains performance data of a system, each record is
I have one table which contains events and dates, and another which contains the
I have a table which contains TV Guide data. In a simplified form, the
I have a table which is currently displayed like this: Question OptionType What is
I have a table A which maintains count of total users in Table B.
I have a GridView containing records from a table which can be deleted or
I have a table called products, and a mapping table called related_products which maintains
I have a relation that maintains monthly historical data. This data is added to
I have a table which contains two type of data, either for Company or

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.