-1

I'm trying to figure out how to set up the Database structure.

There are ~10000 employees.There will be a table to store the basic details of the employee, and another table for storing transactions of the employee, so I decided to create separate tables for all the employee to record their transactions, which means ~10000 tables.

So my question is, is it efficient to create that much of tables(~10000), or any other approach you can suggest, I will be using MySQL as database and a Java client, in a LAN.

1
  • 2
    Would you create 10,000 unique classes in Java to model these employees? No, you would not. What are the commonalities for the employees? Name, dates, etc right? Why wouldn't your table reflect those common elements?
    – billinkc
    Oct 10, 2013 at 14:13

1 Answer 1

7

No, that would be wrong. You create a table for all transactions and create a foreign key to the employee table. I suggest you read a bit about database design before proceeding.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.