SQL Server 2008中的数据库设计 [英] database design in sql server 2008

查看:79
本文介绍了SQL Server 2008中的数据库设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4张桌子
表1有1列名为car
表2有2列名为car和name的列
表3有3列car,name和group
table4有4列名为car,name,group,owner的列,我想点击表中的列,以便表1,2和3中的car,name,group相同

I have 4 tables
table 1 has 1 column named car
table 2 has 2 columns named car and name
table 3 has 3 columns car ,name, and group
table4 has 4 columns named car ,name,group, owner i want to likn k the coulmns in the tables so that car,name,group in table1,2and 3 are the same

推荐答案

您好,
您可以使用主键和外键概念.
例如在表1中将car保留为主键,并引用所有三个表.
以相同的方式在各自的表中命名和分组.
它将有助于消除数据冗余.
Hi,
you can use primary key and foreign key concept.
like keep car as primary key in table1 and give its reference to all three tables.
in same way for name and group in their respective tables.
it will help to remove data redundancy.


这篇关于SQL Server 2008中的数据库设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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