Re: Different databases or schemas?
From: Wayne Snyder (wayne.nospam.snyder_at_mariner-usa.com)
Date: 12/02/04
- Next message: Wayne Snyder: "Re: constraints on views"
- Previous message: Uri Dimant: "Re: Updating Identical tables"
- In reply to: Magnus Bergh: "Different databases or schemas?"
- Next in thread: Magnus Bergh: "Re: Different databases or schemas?"
- Reply: Magnus Bergh: "Re: Different databases or schemas?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 08:18:42 -0500
SQL 2000 and prior do not use schemas in the proper ANSI way. Schemas are
attached to users. Yukon handles this better..If you have access to the
code, you'd have to change it to use the 2 part name.
If you put the tables in a single database, remember that a database is a
unit of backup and recovery... Will there be times when one of the apps
needs to be restored and the other does not?... That might be a problem
But the converse is also true. IF they share a single customer table , and
you use different databases, the customer table can get out of synce...ALso
you can not put FK constraints across databases.. so this is a tough issue
worthy of consideration..
My opinion on this varies, but you should know that there are good reasons
to do this EITHER way, and reasonable people will differ.
-- Wayne Snyder, MCDBA, SQL Server MVP Mariner, Charlotte, NC www.mariner-usa.com (Please respond only to the newsgroups.) I support the Professional Association of SQL Server (PASS) and it's community of SQL Server professionals. www.sqlpass.org "Magnus Bergh" <magnus.bergh@kaab.se> wrote in message news:MPG.1c190da5fb7eb4ee989683@news.microsoft.com... > I have a customer running several of our application that we are going > to convert to MS SQL. Each application has unique data and tables but > there are also some shared tables. For example Application 1 has a > uniquer Orderheader and Orderdetails tables but Csutomer table is shared > with application 2. > > What is the best approach, to setup different databases or to use a > single database but with different schemas? I would like to know the > advantages of each? > > Using a single database with several schemas seems like the best choice. > Then all our application is contained in a single database. > > It would look liek something like this: > > database.shared.Customer > database.app1.Orderheader > database.app2 Orderheader > > If using different databases I would make one database with shared data > and one for each application for each applications' unique tables.
- Next message: Wayne Snyder: "Re: constraints on views"
- Previous message: Uri Dimant: "Re: Updating Identical tables"
- In reply to: Magnus Bergh: "Different databases or schemas?"
- Next in thread: Magnus Bergh: "Re: Different databases or schemas?"
- Reply: Magnus Bergh: "Re: Different databases or schemas?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|