我如何使用规范化连接两个表 [英] How can i connect two table with the use of normalisation

查看:74
本文介绍了我如何使用规范化连接两个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

任何人都可以解释规范化以及如何连接两个表.一个是具有角色ID的主键,menuid.另一个表具有菜单ID和子菜单ID.我制作了第二个表菜单ID外键.我如何映射多个子菜单该表中的菜单.

问候
scp

Hello All,

Can any body can explain about normalisation.and how to connect two table .one is primary key with role id ,menuid.other table have menu id and sub menu id.I made 2nd table menu id foreign key.how can i map multiple sub menu from that table.

Regards
scp

推荐答案

标准化是重新组织数据以减少冗余的过程.请参见此处 [
Normalization is the process of reorganizing data to reduce redundancy. See here[^] for more details on Normalization.

What you are trying to do here is actually a JOIN. You are joining two tables (with menuid acting as the foerign key).
For eg, to get multiple submenus for menu id 4, your query will look like
select * from A, B where A.menuid = B.menuid and menuod = 4


这篇关于我如何使用规范化连接两个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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