# Good MySQL table structure

**URL:** <https://forum.kirupa.com/t/good-mysql-table-structure/300275>\
**Category:** programming\
**Created:** [November 18, 2009, 4:38pm UTC](https://forum.kirupa.com/t/good-mysql-table-structure/300275 "2009-11-18T16:38:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imagined](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@imagined](https://forum.kirupa.com/u/imagined)\
**Post date:** [November 18, 2009, 4:38pm UTC](https://forum.kirupa.com/t/good-mysql-table-structure/300275/1 "2009-11-18T16:38:23Z")

</div>

This is what I have (simplified version)

**USERS** table  
id  
username  
password

Each users has clients. The following table contains clients for all the users. userid column tells the app whose client it is.  
**CLIENTS** table  
id  
userid (user client belongs to)  
name  
email

When a USER logs in, he sees a list of his CLIENTS.  
SELECT \* FROM CLIENTS WHERE USERID = 1234

The same goes for appointments, projects, etc.

Do you suggest I try another approach? For example, what about creating a table for each user so the user can have all of its clients information in a table. Or would that be complicating things.

Example:  
table CLIENTS-1234  
table CLIENTS-1235  
table CLIENTS-1236

I’m sorry if this question is very basic. I’m going to start reading a book about just MySQL so I can make better, more informed MySQL database design decision.
