|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Database with many tables or multiple databases with lesser tablesWe are building a large application (a financial system) that, after
normalization, would approximately need 1500 or so tables. The question is should we build this as one database or should we separate it out into multiple databases. There is a case for separating out into 5 or so databases based on functional modules within the financial system (GL, AP, AR etc.) . Problem though is they are related to one another in some way. In a single database case, some standard tables (like U.S. States, Notes etc.) can be a single table. Also it avoids cross database talks so ease of development is more. What are the performance advantages/disadvantages of one way or the other? Does SQL Server performance get affected if the number of tables is large, as in my case? Any inputs, suggestions? Thanks Naveen Naveen wrote:
Show quote > We are building a large application (a financial system) that, after Keep them in one database, there is nothing to be gained by splitting > normalization, would approximately need 1500 or so tables. The question is > should we build this as one database or should we separate it out into > multiple databases. > There is a case for separating out into 5 or so databases based on > functional modules within the financial system (GL, AP, AR etc.) . Problem > though is they are related to one another in some way. > In a single database case, some standard tables (like U.S. States, Notes > etc.) can be a single table. Also it avoids cross database talks so ease of > development is more. > What are the performance advantages/disadvantages of one way or the other? > Does SQL Server performance get affected if the number of tables is large, as > in my case? Any inputs, suggestions? > > Thanks > Naveen them apart. That said, you can create multiple filegroups within a single database, and specific tables can be stored in specific filegroups. A common optimization tactic is to put high-traffic tables into seperate filegroups that are isolated on seperate disk spindles, which spreads the I/O across multiple hardware channels. Naveen (Nav***@discussions.microsoft.com) writes:
> We are building a large application (a financial system) that, after The number of tables has little do to with it. But if the database gets> normalization, would approximately need 1500 or so tables. The question is > should we build this as one database or should we separate it out into > multiple databases. > There is a case for separating out into 5 or so databases based on > functional modules within the financial system (GL, AP, AR etc.) . Problem > though is they are related to one another in some way. > In a single database case, some standard tables (like U.S. States, Notes > etc.) can be a single table. Also it avoids cross database talks so ease > of development is more. > What are the performance advantages/disadvantages of one way or the > other? Does SQL Server performance get affected if the number of tables > is large, as in my case? Any inputs, suggestions? huge, you may want to consider filegroups and that sort of thing. Having separate databases only makes sense if one module has to be available while another is down for maintenance. What you could consider, though, if you are on SQL 2005 (and which you should be if you are in the development stage now) is to use different schemas for the various modules. This gives no performance benefits, but can be an ease for development, as different components gets separate name spaces. -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx Naveen wrote:
Show quote > We are building a large application (a financial system) that, after Use multiple databases only if they will have different requirements> normalization, would approximately need 1500 or so tables. The question is > should we build this as one database or should we separate it out into > multiple databases. > There is a case for separating out into 5 or so databases based on > functional modules within the financial system (GL, AP, AR etc.) . Problem > though is they are related to one another in some way. > In a single database case, some standard tables (like U.S. States, Notes > etc.) can be a single table. Also it avoids cross database talks so ease of > development is more. > What are the performance advantages/disadvantages of one way or the other? > Does SQL Server performance get affected if the number of tables is large, as > in my case? Any inputs, suggestions? > > Thanks > Naveen for availability, security or other admin-related reasons. There is no performance advantage to be had from creating additional databases (unless you put them on different servers). I'm curious as to why you would bother creating your own GL, AP, AR functionality if the task is as complex as you seem to suggest. Why wouldn't you buy rather than build? -- David Portas, SQL Server MVP Whenever possible please post enough code to reproduce your problem. Including CREATE TABLE and INSERT statements usually helps. State what version of SQL Server you are using and specify the content of any error messages. SQL Server Books Online: http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx -- >> We are building a large application (a financial system) that, after normalization, would approximately need 1500 or so tables. << We have to take your word for it, but I have found that a bit largerthan most Fortune 500 systems. But who cares, if the data model is right. And if they are part of the same data model, they should be in one DB -- would put male employees in one schema and female employess in a second schema? With various products, you can partition the tables, do some indexing tricks, etc. but that is implementation and not design. >> The question is should we build this as one database or should we separate it out into multiple databases. <<Unh? Is it one data model or many different universes of discourse? >> There is a case for separating out into 5 or so databases based on functional modules within the financial system (GL, AP, AR etc.) . << "functional modules within the financial system" -- Like a 1950'sCOBOL system! Nothing like an RDBMS at all! No concept of a universe of discourse at all. >> though is they are related to one another in some way. In a single database case, some standard tables (like U.S. States, Notes etc.) can be a single table. << NO, THEY CANNOT!! A table a set of entities or relationships of thesame kind. Were the kid on dope in the back of my database class? Look up the OTLT or MUCK design flaw. >> Also it avoids cross database talks so ease of development is more. << Ease of developement is not the important thing. Data quality,maintainabilty and those other things they told you about in the Software Engineering course you should have taken are ORDERS OF MAGNITUDE more important (literally -- did you ever read Boehm's research, etc.?). |
|||||||||||||||||||||||