Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Customizable Business Requirement

Author  Topic 

Blastrix
Posting Yak Master

208 Posts

Posted - 2005-02-24 : 16:56:03
I'm currently in the process of building a system that requires a very high degree of customization by its users. One of the big issues is that there will be many values that will be built into the system, but can be further extended by the users. An example would be company departments. The DB will have builtin or preset departments(Sales, Customer Service, etc...), a company may desire to also have a department "Assembly Line" or whatever. How would this be best represented? Should I use a one table approach along the lines of:


CREATE TABLE Departments (
DepartmentID int,
DepartmentName varchar(100),
IsBuiltin bit,
CompanyID int
)


or would a two table approach be better, and just use UNION queries?


CREATE TABLE Departments (
DepartmentID int,
DepartmentName varchar(100),
)

CREATE TABLE CompanyDepartments (
DepartmentID int,
DepartmentName varchar(100),
CompanyID int
)


That then brings up the business rule that a company should be able to ignore all builtin departments, and use only their own. That should be doable with another table such as IgnoredDepartments or some such.

What are your guys' thoughts?

Thanks,
Steve

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-02-24 : 19:22:39
I'd stick with a single table, if you have to isolate different types of departments you can create views for that. Would be best to have all the code work off of views instead of tables too, so if you have to modify the tables you can make it transparent to the rest of the application.
Go to Top of Page
   

- Advertisement -