什么时候应该使用数据库同义词? [英] When should database synonyms be used?

查看:190
本文介绍了什么时候应该使用数据库同义词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

我有语法下降,但我想知道是否有人可以提供数据库同义词非常有用的说明性用例。 div>

测试时非常适合演示模拟表。例如,如果您的源表包含数百万条记录,并且您想要测试一小部分数据,则可以使用同义词将源表重新定向到您所控制的较小表,以便您可以对各种场景进行排序。



这样,您可以更新/删除模拟表中的数据,而不影响您的源表。当您准备好使用源表时,您需要做的只是重新指导同义词。


I've got the syntax down but I'm wondering if somebody can provide an illustrative use case where database synonyms are very useful.

解决方案

It is excellent for staging mock tables when testing. For example, if your source tables contain millions of records and you want to test a small subset of data, you can use synonyms to re-direct the source table to a smaller table you control so you can stage various scenarios.

In this way, you can update/delete the data in the mock table without affecting your source table. When you are ready to use the source table, all you need to do is re-direct the synonym.

这篇关于什么时候应该使用数据库同义词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆