数据库设计及其关系 [英] database design and their relation ship

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

问题描述

PLZ帮助我设计数据库以及他们与其他领域的关系。

我为我的clg项目制作的网站,它是为一个提供学生注册的机构,也是一个安置者一个人推荐他们的工作和一个学生应用4个工作的部分。

所以PLZ帮助我设计数据库。和dfd以及它应该包括的主键和外键之间的关系plz帮助我

plz help me to design data base and and their relation ship withother field.
My websit which i was making for my clg project it was for a institution which provide student to enroll and also a placemen and a section where a person advirtise their job and a student apply 4 job.
So plz help me to design database.and dfd and what relationship betwent and primary key and foreign key it should include plz help me

推荐答案

要添加到OriginalGriff的答案,您应该浏览,阅读和理解的链接很少:

- 关系模型 [ ^ ]

- 实体关系模型 [ ^ ]

- 数据库规范化 [ ^ ]

- SQL PRIMARY KEY约束 [ ^ ]

- SQL FOREIGN KEY Constraint [ ^ ]
To add to OriginalGriff''s answer, few links you should go through, read and understand:
- Relational model[^]
- Entity-relationship model[^]
- Database normalization[^]
- SQL PRIMARY KEY Constraint[^]
- SQL FOREIGN KEY Constraint[^]


因为这是你的作业,我想你至少应该自己做一些!



所以,一些指示可以让你思考:



1)想想你的数据。这个想法是存储所有信息,而不重复除引用之外的任何内容。

2)每个表都需要一个主键。重要的是,这应该在表格中是唯一的,因此使用学生姓名可能不是一个好主意。使用int(设置为身份字段以便DB处理唯一性)或Guid(以便您处理唯一性是一个好主意。我更喜欢Guids,其他人更喜欢整数 - 如果我必须在我之后立即引用一个字段插入它,然后我使用Guid。

3)查看您的数据,以及您将如何使用它。在纸上试一试,并弄清楚您需要使用数据的方式如何影响它的最佳存储方式。在纸上设置表格,看看它是否有效。尝试更改它,看看它是否更好,或更糟。为什么?您可以对原始方案进行一些小改动,使其与新方案一样有效吗?重复直到你开心。

4)请记住,你可以拥有任意数量的桌子,但你不需要超过你需要的桌子! (3)中的练习应该给你一个好的,低的数字。



首先考虑,测试第二,最后实施。
Since this is your homework, I think you should do at least some of it yourself!

So, some pointers to get you thinking:

1) Think about your data. The idea is to store all the information, without repeating anything except references.
2) Each table needs a primary key. It is important that this should be unique within the table, so using a student name is probably not a good idea. Using an int (set as an identity field so that the DB handles uniqueness) or a Guid (so that you handle uniqueness is a good idea. I prefer Guids, others prefer ints - if I will have to refer to a field immediately after I insert it, then I use a Guid.
3) Look at your data, and how you are going to use it. Try it out on paper, and work out how the way you will need to use the data affects how it is best stored. Set up tables on paper, and see if it works. Try changing it, and see if that works better, or worse. Why? Is there a small change you could make to the original scheme that makes it work as well as the new one? Repeat until you are happy.
4) Remember that you can have as many tables as you want, but you don''t want more than you need! The exercise in (3) should have given you a good, low number.

Think first, test second, implement last.


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

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