Data Base Structure Question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
anishgiri
Forum Newbie
Posts: 7
Joined: Mon May 31, 2010 12:49 am

Data Base Structure Question

Post by anishgiri »

Let say in a company they have 10 divisions. And they want to have a database that will display, add, edit, search and delete employee info like, name, email, contact, division, etc.

Which is a better design. Creating a database for each division? Or a single database with different tables for each division?

When a single database is created for all the divisions, is it better to create separate table for each division than a single table?
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Data Base Structure Question

Post by JakeJ »

Definitely one database for all divisions. Just practice good normalization techniques.

For example, each division will have information particular to that division. So you'll want a table specifically for the division and assign an id to each division.

Then, in the employees table, you'll add the division id to that for easy cross referencing.f

And it goes on from there. Start with a good solid design because it's much harder to backtrack and correct than it is to start with a good design.
Post Reply