Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2007, 01:27 AM
Authorized User
 
Join Date: Jul 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Make 2 or 1

Our company has its Departments And Services.

Now We are making it online.

Both have separate email list, phone numbers, and more.

Will I make one table and adds the field Type (Values: D or S).

Or make them separate.

Remember one thing If we merge them then Email And PhoneNumber Table will also me merge

other wise they will also separate.

What is better.

 
Old August 16th, 2007, 01:04 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Hi,

I'm sure there's many different ways to do this and many different preferences. Personally, I would make a bit column to identify whether or not the info was for Departments. If bit is '1' then its Departments. If bit is '0' then its Services. If the company adds more departments later on then you can add another bit column for the new department.

Then you won't have to worry about merging data later on if that happens. It will all be in the same tables. And you won't have any problem separating the data if you have to.

Hope this helps.

Rstelma

 
Old August 16th, 2007, 01:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Or you could create a separate table called DepartmentTypes with an Id and a Description. Then store a foreign key to the DepartmentTypes in your other tables.

Muhammad: care to respond to my personal message in reply to your? It looks like you're offended but I don't understand why... ;)

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone make this? JonathanRay C# 4 February 16th, 2007 08:57 AM
Can someone make this? JonathanRay C++ Programming 0 February 5th, 2007 10:40 PM
How can I make that? kalchev ASP.NET 2.0 Professional 0 April 3rd, 2006 07:01 AM
How to make a explorer in c#? gefferye C# 0 December 6th, 2005 08:27 AM
how to make a combobox? ashu_gupta75 Excel VBA 1 August 16th, 2004 02:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.