Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Fun question about views

Author  Topic 

btrimpop
Posting Yak Master

214 Posts

Posted - 2005-04-05 : 16:52:29
Hi all,

The company I work for has 2 large applications that do many of the same things (the funcationality compliments each other and one was aquired). The problem is much of the data is the same, but totally (radically) different schemas.

When adding new functionality to the applications I only want to write it once and use it in both. I was thinking of using views to normalize the schema access for the applications. This means I could eventually have many many views. Does anyone think there would be adverse performance issues using views this way?

In other words one schema might have 2 tables to get client names and addresses called client and addresses. The other schema might have 3 tables called people, peopletype, and peopleaddress. So I would use a view to normalize access in the different schemas and the application would access the data thru the view and it really would not care what the underlying tables are.


Thanks in advance


"In theory there is no difference between theory and practice. But in practice there is!"



jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-04-05 : 17:00:05
I think the views are a GREAT idea. Without knowing more details I can't say for sure, but I think if you can pull it off it would make things really efficient. However, if you are not using stored procedures in your app then you really should because that really provides a nice layer of abstraction between the physical tables and the application and they are much more flexible and power than Views in general. (though they are not as good for ad-hoc SQL statements).

- Jeff
Go to Top of Page

btrimpop
Posting Yak Master

214 Posts

Posted - 2005-04-05 : 17:12:42
Thanks Jeff, my thoughts too. I thought about using stored procs, problem is the acquired app also runs on Oracle and I don't want to write Oracle stored procs too.

"In theory there is no difference between theory and practice. But in practice there is!"



Go to Top of Page
   

- Advertisement -