作者:手机用户2502876011 | 来源:互联网 | 2023-10-10 16:01
WhenIcreateaviewIcanbaseitonmultiplecolumnsfromdifferenttables.WhenIwanttocreate
When I create a view I can base it on multiple columns from different tables. When I want to create a lookup table I need information from one table, for example the foreign key of an order table, to get customer details from another table. I can create a view having parameters to make sure it will get all data that I need. I could also - from what I have been reading - make a lookup table. What is the difference in this case and when should I choose for a lookup table?? I hope this ain't a bad question, I'm not very into db's yet ;).
当我创建一个视图时,我可以将它基于来自不同表的多个列。当我想创建一个查找表时,我需要来自一个表的信息,例如订单表的外键,以从另一个表中获取客户详细信息。我可以创建一个具有参数的视图,以确保它将获得我需要的所有数据。我也可以 - 从我一直在阅读的内容 - 制作一个查找表。在这种情况下有什么区别,我何时应该选择查找表?我希望这不是一个糟糕的问题,我不是很喜欢db的;)。
5 个解决方案