Hello Folks,
I'm designing a db for a website that will utilize SQL Server 7. My question is what are the factors and issues involved when considering whether or not to segregate the records in one large table into two or more tables?
Consider the following two models (mock examples):
------------------------
Method 1 -- One Table)
--Table: "Ads" {w/ 35,000 car and boat ad records}
----Fields: "AdID", "AdTitle", "AdText", "AdStatus"
------------------------
Method 2 -- Two Tables)
--Table 1: "CarAds" {w/ 30,000 records}
----Fields: "AdID", "AdTitle", "AdText", "AdStatus"
--Table 2: "BoatAds" {w/ 5,000 records}
----Fields: "AdID", "AdTitle", "AdText", "AdStatus"
------------------------
Assume that: 1) car ads are read much more frequently than boat ads, 2) records are updated occasionally, and 3) the system is running at near capacity with one large table.
What is the better way to go?
My sense is that Model 2 might be better since "car" records will not be hampered by locks, reads, and writes for "boat" records and vise-versa. Of course this is not the academic way of doing things, but it might make sense in light of practical perfomance issues.
I guess it begs the question: what can a dbms handle better - one table with M+N records, or two tables with M and N records?
Lot of Q's for sure.
Thanks in advance, Jerry
I'm designing a db for a website that will utilize SQL Server 7. My question is what are the factors and issues involved when considering whether or not to segregate the records in one large table into two or more tables?
Consider the following two models (mock examples):
------------------------
Method 1 -- One Table)
--Table: "Ads" {w/ 35,000 car and boat ad records}
----Fields: "AdID", "AdTitle", "AdText", "AdStatus"
------------------------
Method 2 -- Two Tables)
--Table 1: "CarAds" {w/ 30,000 records}
----Fields: "AdID", "AdTitle", "AdText", "AdStatus"
--Table 2: "BoatAds" {w/ 5,000 records}
----Fields: "AdID", "AdTitle", "AdText", "AdStatus"
------------------------
Assume that: 1) car ads are read much more frequently than boat ads, 2) records are updated occasionally, and 3) the system is running at near capacity with one large table.
What is the better way to go?
My sense is that Model 2 might be better since "car" records will not be hampered by locks, reads, and writes for "boat" records and vise-versa. Of course this is not the academic way of doing things, but it might make sense in light of practical perfomance issues.
I guess it begs the question: what can a dbms handle better - one table with M+N records, or two tables with M and N records?
Lot of Q's for sure.
Thanks in advance, Jerry