如何建立教师时间表的关系(表之间一对多,多对多) [英] How to make relations for instructor schedule(one to many and many to many between tables)

查看:153
本文介绍了如何建立教师时间表的关系(表之间一对多,多对多)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题



如何为教师计划进行数据库设计(仅限每个表与其他一对多的AND之间的关系多对多)



已经创建的表但是没有关系(部门,班级,讲师,课程,学生)



我需要在培训中心制作表关系教师计划,为微软产品提供课程



作为ACCESS,EXCEL,C#,SQL如下



*培训中心有更多教师。



*每位教师都会提供更多ACCESS课程, EXCEL,C#,SQL周刊从周日到周四。



*每位教练都会在培训中心的更多课程中提供ACCESS,EXCEL,C#,SQL课程。



*培训中心有10个班级,每个课程都可以在一周内上课。



*每个课程ACCESS, EXCEL,C#,SQL可以由更多的讲师给出。



*每位教师都会提供更多部分。



*每组学生分组为A,B, C,D,E,F。



*每个部分都可以在一周内由更多的导师给出。



*每个部分可以在一周内提供更多课程。



*每个部分都可以获得更多课程的更多课程。



所以我需要知道



教练Michel从时间2到时间4给C#和SQL课程每周日和周三每周A1课程和B1和C1



A和B以及C和D(每张桌子和其他桌子之间的关系)




我尝试了什么:



如何为教师安排制定关系(一对多,多对多)在表之间)

解决方案

因此,记下每个表的样本数据,并确定关系是什么。

例如,如果您有一个发票表和一个InvoiceItems表:

发票:

 Id日期客户
1 2016-11-01 JS bits
2 2016-11-02 JS Bits
3 2016-11-03 Mikes parts



InvoiceItems :

 Id InvoiceId项目
1 1有点
2 1更大的一点
3 1一点点
4 2一点点
5 3 A部分
6 3 B部分

然后很明显你在两个表之间有一对多的关系,InvoiceId是一个Invoices的外键.Id



找出您需要的关系,并通过对象资源管理器窗格中数据库的数据库图分支在SSMS中建立它们。 / BLOCKQUOTE>

Problem

How to make database design for Instructor Schedule(only relations between every table and other one to many AND Many to Many)

Tables already created but relation not make (Section,Class,Instructor,Courses,Student)

I need to make Tables Relation for Instructors schedule working in Training center give courses for Microsoft products

as ACCESS ,EXCEL,C#,SQL as following

* Training center Have more instructors .

* Every instructor give more courses in ACCESS ,EXCEL,C#,SQL weekly from Sunday to Thursday .

* Every instructor give Courses ACCESS ,EXCEL,C#,SQL in more classes inside Training center .

*Training center have 10 classes and every courses can given in more classes within week .

*Every courses ACCESS ,EXCEL,C#,SQL can given by more instructor .

*Every instructor give more sections .

* Section mean group of student every group of student classified to A,B,C,D,E,F.

* Every section can given by more instructor within week .

* Every section can given more courses in week .

* Every section can get more courses in more classes .

So that i need to know

Instructor Michel give Courses C# And SQL from time 2 to time 4 Every Sunday And Wednesday weekly in class A1 And B1 And C1

For section A And B and C And D (Relation between each table and others)


What I have tried:

How to make Relations for Instructor Schedule(one to many and many to many between tables)

解决方案

So write down sample data for each table, and establish what the relationships are.
For example, if you have an Invoices table and a InvoiceItems table:
Invoices:

Id       Date         Customer
1        2016-11-01   JS bits
2        2016-11-02   JS Bits
3        2016-11-03   Mikes parts


InvoiceItems:

Id       InvoiceId    Item
1        1            A bit
2        1            A bigger bit
3        1            A tiny bit
4        2            A tiny bit
5        3            A Part
6        3            B Part

Then it's obvious you have a one-to-many relations ship between the two tables, with InvoiceId being a Foreign key to Invoices.Id

Work out what relationships you need, and establish them in SSMS via "Database Diagrams" branch of the database in the Object Explorer pane.


这篇关于如何建立教师时间表的关系(表之间一对多,多对多)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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