x

database cross table or one table is better

Hi all i have question.

this bellow table design is first 1. I've companies and their templates.templates in file table i related columns like below.

FileTemplate

ID - CompanyID - Description - FileID

second design

FileTemplate

ID - Description

CrossTable


ID - CompanyID - FileID - FileTemplateID

Now question , which design is better for perfomance and maintinance there is will be ver much data (1 million) will be very active table

more ▼

asked Sep 29, 2011 at 01:10 PM in Default

avatar image

sahinci
21 2 2 2

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

There's no easy way to answer this without understanding what kinds of queries are being run against the data AND the relationships of the data. The thing is, in your first design, will you be duplicating lots of data in order to store the information? If so, that can be a performance issue. But from what you've supplied, it's very hard to give you a definitive answer.

In general, default on the side of normalizing the data and the relationships and ensuring that those relationships are enforced. That's how SQL Server is designed to work and that's where the enhancements and optimizations focus.

more ▼

answered Sep 30, 2011 at 04:45 AM

avatar image

Grant Fritchey ♦♦
137k 20 46 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1183
x122
x84

asked: Sep 29, 2011 at 01:10 PM

Seen: 1064 times

Last Updated: Sep 29, 2011 at 01:10 PM

Copyright 2018 Redgate Software. Privacy Policy