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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:54:24+00:00 2026-05-12T16:54:24+00:00

I am trying to decide whether to create a global view table or 1

  • 0

I am trying to decide whether to create a global view table or 1 for each section. for example, Lets say I have products, categories and pages.

Do I have 3 tables e.g:

CREATE TABLE `tbl_products` (
`p_id` INT NOT NULL ,
`p_views` INT NOT NULL ,
INDEX ( `p_id` ) 
) ENGINE = MYISAM 

CREATE TABLE `tbl_categories` (
`c_id` INT NOT NULL ,
`c_views` INT NOT NULL ,
INDEX ( `c_id` ) 
) ENGINE = MYISAM 

CREATE TABLE `tbl_pages` (
`pg_id` INT NOT NULL ,
`pg_views` INT NOT NULL ,
INDEX ( `pg_id` ) 
) ENGINE = MYISAM 

Or do I have 1 table storing all e.g.

CREATE TABLE `tbl_views` (
`view_id` INT NOT NULL ,
`view_type` VARCHAR( 10 ) NOT NULL ,
`view_views` INT NOT NULL ,
INDEX ( `view_id` ) 
) ENGINE = MYISAM 

Where view_type is either products, categories or pages.

What would the advantages/disadvantages be of each solution?

Thanks in advance.

  • 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-12T16:54:24+00:00Added an answer on May 12, 2026 at 4:54 pm

    I really like the 1 table method, this keeps the database uncluttered, which i think is important.

    Also, later on you may want to add another type, you wouldnt have to add another table, just a row with a different view_type.

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

Sidebar

Related Questions

I'm still trying to decide whether my (home) project should use UTF-8 strings (implemented
I am trying to decide whether to learn ASP.NET MVC (or to spend the
I'm trying to decide whether it is better to use static methods for loading/saving
I'm trying to decide whether to use a Rails or a Django guru to
I'm trying to decide whether to switch from having Hibernate sprinkled all over to
I am trying decide on how I want to handle the UI for an
I'm trying to decide on the best strategy for accessing the database. I understand
I'm trying to decide what to put in a dialog box that tells the
We are trying to decide how to handle object persistence accross postbacks, to avoid
I am trying to decide if a string is a number in Ruby. This

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.