Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 31st, 2007, 05:13 AM
Alien8n Alien8n is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 1 Alien8n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 19 sec
Reputation Power: 0
3 tables or 1 table?

There's a discussion regarding the best way to implement a table in SQL at work. Unfortunately no one here is really qualified in SQL (but we do have lots of Oracle and DB2 experience here).

The question is whether it's best to create one large table and update it 3 times or create 3 tables and update them individually. I'll try and explain.

We want a single unique ID. However we collect about 5 sets of data at different points of time. I'll use a parcel as an example.

Parcel collected by post office, creates Parcel ID, collection time, customer, delivery address.

Parcel delivered to sorting office, adding sort office number, time, any other info needed.

Parcel sent to recipient, adding vehicle id, eta, driver id etc.

Throughout the common factor is the parcel id, but for much of its life it means having lots of empty cells in the database.

So is it better practise to have 3 seperate tables linked on parcel id which only get filled in when the parcel arrives at that control point or have one large table and update the empty cells as and when needed?

Cheers.

Reply With Quote
  #2  
Old June 18th, 2007, 04:06 PM
gsmodi gsmodi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Location: India
Posts: 11 gsmodi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 4 m 3 sec
Reputation Power: 0
in most of d cases it is advised to break this table into three.

but in this case, as your fields will be filled and there's just a space consideration for a short time, it would be recommended that you converge it into a single table.



--
Gurpreet
http://gsmodi.blogspot.com

Reply With Quote
  #3  
Old August 10th, 2007, 02:24 AM
itrajesh itrajesh is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 1 itrajesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 54 sec
Reputation Power: 0
Post

Hi sir,

I understand u r problem,According to my Cicumstances u have Better to crate 3 Tables.Because in u r further Reports it is very easy to pick appropriate Fields in to u r Report

Thanking U

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > 3 tables or 1 table?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT