Allow users to create their own categories and add items to it

I want to allow any user to create a category using a text field. I want to let them create any number of categories they want, with any name they want. The problem is I have no idea how to set up the tables to accomplish this. I know the PHP to check to see if it exists for the user and update or add it, how do I store it?

Here's how I thought about doing it.

Table: Categories Columns: category, id, userid

User adds a new category Create a new record that has a category, id, and userid.

User deletes a category Find the related row and remove it

What I'm concerned about is having a large number of users creating a large number of categories and the table having an excessive number of rows. Is that a valid concern? Will it cause performance issues if the number of rows gets into the millions?

Any suggestions appreciated.

Answers


What this boils down to is a one too many relationship, at the time I posted this I just didn't understand what that meant.


Need Your Help

Segmentation fault with variable function arguments

c variables segmentation-fault arguments

My program compiles without error, but when I run it, it quits with a segmentation fault after I input a value such a radius.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.