这是用户在 2024-5-25 16:19 为 https://app.immersivetranslate.com/word/ 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

Welcome to the class.
欢迎来到课堂。

I hope I'm audible.
我希望我能听到。

Let me know if you have any questions.
如果您有任何问题,请告诉我。

Resuming things are working fine
恢复一切正常

and sharing the lecture sites with you. And yeah, I started the recording as well.
并与您分享讲座网站。是的,我也开始了录音。

Okay. So if you remember, I was discussing about the course project, which is an extremely important component of this course.
好。所以如果你还记得,我正在讨论课程项目,这是本课程的一个极其重要的组成部分。

So now we have Reese
所以现在我们有了里斯

to the point
切中要害

where we need to, you know, work on our
我们需要的地方,你知道,在我们的

project.
项目。

So here is the first deadline, or the deliverables, you may call it, or the deadlines, you may call it so. What I did in in the last lecture.
所以这是第一个截止日期,或者可交付成果,你可以这样称呼它,或者最后期限,你可以这样称呼它。我在上一堂课上做了什么。

We had this discussion I came up with a link.
我们进行了讨论,我想出了一个链接。

And then, you know, that is a link to the Google, Doc, or Google Excel sheet, you may call it.
然后,你知道,这是一个指向 Google、Doc 或 Google Excel 表格的链接,你可以称之为它。

But yeah, you don't have the access to that. Therefore, you know I share an excel sheet with Professor Zong Zhang. I hope that is working out. If not, then we'll work it out. But anyway.
但是,是的,您无权访问它。因此,你知道我和张宗教授共用一张excel表。我希望这正在奏效。如果没有,那么我们会解决的。但无论如何。

what you have to do this is our first deadline that is today.
你必须做的是我们今天的第一个截止日期。

So today it is seventh of May 2024, and it is 8 pm. In New York time. So you still have time, if you have not done that. So it's very simple. What we need from you in this
所以今天是 2024 年 5 月 7 日,现在是晚上 8 点。在纽约时间。所以你还有时间,如果你还没有这样做的话。所以这很简单。我们需要你在这方面做什么

deliverable is the most important thing.
可交付成果是最重要的。

Okay, so what is the most important thing? Well, if you want to work in this for this project in a team
好的,那么最重要的是什么?好吧,如果你想在一个团队中为这个项目工作

or a group. Then you must do it. Now.
或一组。那么你必须这样做。现在。

Okay, so you need to
好的,所以你需要

reach out to your friends in the class. If they want to work with you, then, yeah, you need to form a team.
联系班上的朋友。如果他们想和你一起工作,那么,是的,你需要组建一个团队。

And once you have formed a team, you need to decide a topic
一旦你组建了一个团队,你就需要决定一个主题

be a topic we are not providing to you. Okay, so just look around, discuss with your friends. So, as an example, say, you and your friends
成为我们不提供给您的主题。好的,所以环顾四周,和你的朋友讨论。所以,举个例子,比如说,你和你的朋友

in the group they love. Soccer.
在他们喜欢的团体中。足球。

Okay? So yeah, you might think about creating a database on soccer. Right? So this is something you have to do form your team and come up with a topic.
好?所以,是的,你可能会考虑创建一个关于足球的数据库。右?所以这是你必须组建你的团队并提出一个主题的事情。

And yeah, you need to provide your team's information as well as the topic on
是的,您需要提供团队的信息以及主题

a shared Google sheet. Now it is not a shared Google Sheet. This is an excel sheet
共享的 Google 表格。现在它不是共享的 Google 表格。这是一张 excel 表格

to you. It should not matter right. What we need from you is your groups, information, and the topic.
给你。这应该无关紧要。我们需要您提供您的小组、信息和主题。

you know. Excuse me a lot of times. The students they want to work alone. So that is also allowed.
你知道的。对不起,很多次了。他们想单独工作的学生。所以这也是允许的。

You can work in a team of size. One.
您可以在一个规模的团队中工作。一。

2, 3, or 4 4 is the maximum group size.
2、3 或 4 4 是最大组规模。

Okay, fine. So that is a simple, you know, deliverable. Then the next deliverable that we have is on Thursday this week.
好的,好吧。所以这是一个简单的,你知道的,可交付的。然后,我们的下一个可交付成果是本周的星期四。

So on Thursday this week, by 1159 Pm. New York time, what would we need?
所以在本周的星期四,到下午1159点。纽约时间,我们需要什么?

We need you people to write a statement about your database project and this slide I I did cover in in the last lecture, but just for the sake of completion, I thought, Okay, let's go with that one more time.
我们需要你们写一篇关于你们的数据库项目的声明,以及我在上一堂课中介绍过的这张幻灯片,但为了完成,我想,好吧,让我们再来一次。

So after picking the the topic and after forming the team, you have to describe your project insane in plain, simple English. Okay, so here in in this
因此,在选择主题并组建团队之后,您必须用简单明了的英语描述您的项目。好的,就在这里

statement, what we want, we want you to provide to us the summary
声明,我们想要什么,我们希望您向我们提供摘要

about your project. Okay, so the summary should be between half a page to one page. We don't want it to be very detailed.
关于您的项目。好的,所以摘要应该在半页到一页之间。我们不希望它非常详细。

because the intention is to get to know about what you want to do
因为目的是了解你想做什么

as an example, you know.
举个例子,你知道的。

for a larger enterprise. Say, something like Amazon.
对于大型企业。比如说,像亚马逊这样的东西。

Alright. It is possible to have multiple databases based on, you know, the Amazon as an enterprise.
好。可以拥有多个基于亚马逊企业的数据库。

So one of the project could be based on only the items which are sold in Amazon.
因此,其中一个项目可以仅基于在亚马逊上销售的商品。

the the database could be about the employees who are working in Amazon.
该数据库可能是关于在亚马逊工作的员工。

Alright. So in this statement, we want to know, like, what is it that you want to do, or what aspect
好。所以在这个陈述中,我们想知道,比如,你想做什么,或者哪个方面

of this organization you'll have in your database.
您的数据库中将包含此组织。

Okay.
好。

so that's what we would need in the second deadline, which is on this Thursday.
这就是我们在本周四的第二个截止日期所需要的。

And now, after that, you know the real deliverable that we have is coming over here. The real first deliverable I'll call is over here. What is it? Well.
现在,在那之后,你知道我们真正的可交付成果即将到来。我将要调用的真正的第一个可交付成果就在这里。这是什么?井。

once you have decided about the topic, and you have written the statement, now is the stage where you will start the design of your database
一旦你决定了主题,并且你已经写了陈述,现在是你开始设计数据库的阶段

alright. So at this stage you will start the design. And how do we design our database? Well, for that you will have to draw the relational data model or the Rdm, that we have been learning so far. Okay, but your Rdm would be little detail.
好。因此,在此阶段,您将开始设计。我们如何设计我们的数据库?好吧,为此,您必须绘制关系数据模型或 Rdm,这是我们迄今为止一直在学习的。好的,但是你的 Rdm 会很详细。

Why? Because if you look at all the audience that we have drawn. Then those were very simple ones. Right? The the very first we did draw had only one entity. Okay, which was very simple. And then, as we started learning about relationships, the the audience, they started becoming that they, this, they they became more interesting.
为什么?因为如果你看看我们吸引的所有观众。然后这些都是非常简单的。右?我们画的第一个只有一个实体。好吧,这很简单。然后,当我们开始了解人际关系时,观众,他们开始变得更有趣。

more interesting, because in in the relationships. We had more than one entity, and we had different kind of connections.
更有趣的是,因为在人际关系中。我们有不止一个实体,我们有不同类型的联系。

Now.
现在。

probably I discussed about it right that your idm, so your project should have at least 5 entities and at least 5 relationships.
可能我讨论过你的 idm,所以你的项目应该至少有 5 个实体和至少 5 个关系。

So if you have 5 entities and 5 relationships, then your audium is going to be slightly complex compared to what we have been doing in the lecture.
因此,如果您有 5 个实体和 5 个关系,那么与我们在讲座中所做的相比,您的听觉会稍微复杂一些。

Okay? So
好?所以

when is this thing? Right? So this is the, you know, first year next week.
这是什么时候?右?所以这是,你知道的,下周的第一年。

So, as I said, you'll be very busy. Okay, so from your team, think about the project topic and finish your initial. Rdm.
所以,正如我所说,你会很忙。好的,所以从你的团队中,考虑项目主题并完成你的首字母。Rdm。

okay, so there is this concept of initial
好的,所以有这个初始的概念

right, and there will be a final. I'll explain to you what would be final. But yes, the first rdm, that you'll be writing or designing, we will call that as the initial rdm.
对,会有决赛。我会向你解释什么是最终的。但是,是的,您将要编写或设计的第一个 rdm,我们将其称为初始 rdm。

so that thing should be uploaded on the learning management system that you're using, or whatever link Professor Zank provides you, or submission of your rdm, we can, seeing, you know, if it could be a printed Rdm. As well. Probably we'll get in touch.
所以这个东西应该上传到你正在使用的学习管理系统上,或者赞克教授给你的任何链接,或者提交你的rdm,我们可以看看,你知道,它是否可以是一个打印的Rdm。也许我们会联系的。

you know, if a process and needs some explanation, I can share that with him. But anyway.
你知道,如果一个过程需要一些解释,我可以和他分享。但无论如何。

by this date, which is next week, Thursday, you should have drawn the first rdm. Of your project.
到这个日期,也就是下周的星期四,你应该已经画好了第一个RDM。您的项目。

and that should be provided by 1159 pm. New York time.
这应该在下午 1159 点之前提供。纽约时间。

And one good thing about this initial rdm, is that
关于这个初始 rdm 的一个好处是,

you won't be graded at that time. But you must have it. Okay.
届时您将不会被评分。但你必须拥有它。好。

let me know if you have any question on what I have said.
如果您对我所说的话有任何疑问,请告诉我。

All right.
好吧。

So once you have drawn your rdm, then what we will do, we will start the presentation.
因此,一旦您绘制了 rdm,那么我们将要做的是,我们将开始演示。

Okay, so I, I mentioned this thing that in in this course is 305. The students will have to do 2 presentations.
好的,所以我,我在本课程中提到了这个东西是 305。学生必须做 2 次演讲。

Okay, 2 presentations. You have to do
好的,2个演示文稿。你必须做

presentations.
介绍。

So in those presentations. What will happen? I will be listening to you people, and you will be showing us the your Rdm. Right? I'll have some questions, so maybe your friends will have some questions, and those questions are just to help you people out.
所以在那些演讲中。会发生什么?我会听你们的,你们会向我们展示你们的 Rdm。我会有一些问题,所以也许你的朋友会有一些问题,这些问题只是为了帮助你们。

I guess, just to understand what kind of a project you're working on
我想,只是为了了解你正在从事什么样的项目

right. What are your entities? What are the kind of relationships that you are thinking about?
右。你的实体是什么?你正在考虑什么样的关系?

So this presentation will start from
因此,本次演讲将从

the

20 first of may, right? So we'll have to see
20 五月一日,对吧?所以我们必须看看

So today is 7. Yeah, 2 weeks from now.
所以今天是 7 点。是的,从现在起 2 周。

in 2 weeks from now on that Tuesday. This is a. This is Tuesday, New York time, I think.
从现在起 2 周后的那个星期二。这是一个。我想,今天是纽约时间星期二。

The group will start presentation right? So we'll have to figure out. We should have some sign up sheet. I'll work on that, and I'll share that with Zang.
小组将开始演示,对吗?所以我们必须弄清楚。我们应该有一些报名表。我会努力的,我会和臧分享。

And yeah, you will start. Giving your Rdm. Presentation in the class.
是的,你会开始。在课堂上做你的 Rdm. 演讲。

And in this rdm, you will explain your. You will explain your project not to detail.
在这个 rdm 中,您将解释您的。您将详细解释您的项目。

because we will not think about implementation at that stage.
因为我们不会在那个阶段考虑实施。

It will be just the design phase. Okay. So in in this demonstration, or the presentation, which could be some 5 to 10 min very short.
这只是设计阶段。好。因此,在这个演示或演示中,可能只有 5 到 10 分钟的时间很短。

Alright. So you will just say, as an example like, my project is about, say, movies. And you, you know, just show us the
好。所以你会说,举个例子,我的项目是关于电影的。而你,你知道,只要向我们展示

your rdm, you'll just walk us through that. These are the entities that I have, and these are the kind of relationships that I'm thinking about. And you know, this is going to be one too many, many, too many that kind of detail you could discuss.
您的 RDM,您将引导我们完成它。这些是我所拥有的实体,这些是我正在考虑的那种关系。你知道,这将是太多、太多、太多的细节,你可以讨论。

So you'll briefly explain your project.
因此,您将简要解释您的项目。

and you will also show how your Rdm, your diagram models your problem. Your problem means your project.
您还将展示您的 Rdm、图表如何对您的问题进行建模。你的问题意味着你的项目。

So now the the question arises, fine. Each project will be presenting the Rdm. What will the other people do like me, the Co. Instructor and the other students in the class. What are they supposed to do
所以现在问题来了,好吧。每个项目都将展示 Rdm。其他人会怎么做,比如我、公司讲师和班上的其他学生。他们应该做什么

now? The class will be expected to understand your Rdm. Or your diagram and provide constructive feedback.
现在?该课程将被要求了解您的 Rdm。或者你的图表,并提供建设性的反馈。

This is, you know, a very fun fun activity in Stony Brook University.
你知道,这是石溪大学的一项非常有趣的活动。

because when the students they do their presentation. The other students who are listening to their presentation. They ask a lot of very interesting questions, and they also provide constructive feedback.
因为当学生做他们的演讲时。正在听他们演讲的其他学生。他们问了很多非常有趣的问题,也提供了建设性的反馈。

And this constructive feedback is kind of some suggestions right like. Say, if you thought of the multiplicity between 2 entities to be, say, one to one.
这种建设性的反馈是一些建议,对吧。比如说,如果你认为 2 个实体之间的多重性是一对一的。

then you know the the students or the instructor along with the Co. Instructor, will will probably discuss that. Is it really one to one? Can it be one too many or many too many. Then, in that discussion, you know, it may work out that you know what
然后你知道学生或讲师以及公司讲师可能会讨论这个问题。真的是一对一吗?可以是一个太多还是太多太多。然后,在那次讨论中,你知道,你可能会知道什么

you thought of the relationship to be one to one. But in the discussion it came out to be many to many. And it has happened a lot of times. This happened.
你认为这种关系是一对一的。但在讨论中,结果是多对多。这种情况已经发生过很多次了。这发生了。

Okay, so that's a
好的,这是一个

what I should say, That's
我应该说的是,那是

that's a very positive thing about the presentation. You will be provided constructive feedback.
这是演讲的一件非常积极的事情。您将获得建设性的反馈。

So on the basis of the constructive feedback. What you have to do, you need to revise your
因此,在建设性反馈的基础上。你要做的,你需要修改你的

project diagram. Okay? So that's an advantage. Actually, because if you presented your Rdm and we found something missing in your rdm, we will tell you to fix your rdm, okay, so you can fix your Rdm. And later on you'll present your Rdm. And then the chances are that after correcting the the
项目图。好?所以这是一个优势。实际上,因为如果您出示了 Rdm,而我们发现您的 rdm 中缺少一些东西,我们会告诉您修复您的 rdm,好吧,这样您就可以修复您的 Rdm。稍后,您将展示您的 Rdm。然后很有可能在纠正

you know the error that you have in the Rdm you might end up earning 100%.
您知道您在 Rdm 中的错误,您最终可能会获得 100%。

Okay? So you will be graded on your final rdm.
好?因此,您将在最终的 rdm 上评分。

final. Rdm, will be created.
最后。Rdm,将被创建。

Okay, now, what is what is going to be the final rdm, final, rdm, is your initial audience with modifications if required.
好的,现在,最终的 rdm、final、rdm 是什么,是你的初始受众,如果需要,可以进行修改。

If your initial Rdm. Looked perfect, then then that's alright. You know you. We won't ask you to to change your rdm. Because you know it was perfect. The initial one was perfect.
如果你最初的 Rdm. 看起来很完美,那就没关系了。你认识你。我们不会要求您更改 rdm。因为你知道它是完美的。最初的一个是完美的。

But in case we found something missing in your initial audio, we will ask you to change this audium. Okay? So that that thing can happen.
但是,如果我们发现您的初始音频中缺少某些内容,我们将要求您更改此音频。好?这样事情就会发生。

sir.
先生。

Fine, what will happen
好吧,会发生什么

after the presentation? Or in the presentation? We'll give you the feedback.
演讲结束后?还是在演示文稿中?我们会给你反馈。

And now, if your Rdm. Was perfect, or you were able to revise your rdm. Then what you'll do after that.
现在,如果你的 Rdm 是完美的,或者你能够修改你的 rdm。那你之后会做什么。

then the next stage will be the implementation. Let me write this here an implementation.
然后下一阶段将是实施。让我在这里写一个实现。

So what will you do in this implementation? You will have to create
那么,在这个实现中你会做什么呢?你将不得不创建

the tables in the Ms. Axis. Okay. Now question arises, how many tables we have to create and what will these tables represent?
Ms. Axis 中的表格。好。现在问题来了,我们必须创建多少个表,这些表将代表什么?

So we will discuss about these things right? Or probably you have already seen that
所以我们会讨论这些事情,对吧?或者您可能已经看到了

every entity that you have in your Rdm will map to a table. Okay? So as an example, you were working on on the movies database. And you found, say, 6 entities and someone relationships. Okay? So since you identified 6 entities, so you must have 6 tables.
您在 Rdm 中拥有的每个实体都将映射到一个表。好?举个例子,你正在研究电影数据库。比如说,你发现了 6 个实体和某人的关系。好?因此,既然您标识了 6 个实体,那么您必须有 6 个表。

and each of these tables will will have the data corresponding to each entity.
这些表中的每一个都将具有与每个实体相对应的数据。

As an example for actors entity. You will have that test table for the producers entity. You will have a producer table. Alright. So similarly, you can think about it. Okay.
作为参与者实体的示例。您将拥有生产者实体的测试表。您将有一个生产者表。好。所以同样,你可以考虑一下。好。

so for entities. The re, the relation is that the the rule is state forward.
所以对于实体。re,关系是规则是状态向前的。

If you have any number of entities.
如果您有任意数量的实体。

then you should have a number of tables as well.
那么你也应该有一些表。

Now for relationships. It matters right it if the relationship is many to many. Then, yeah, we would need one additional table for this, many to many relationship. Okay, yeah.
现在是人际关系。如果关系是多对多的,那就很重要了。然后,是的,我们需要一个额外的表,多对多的关系。好的,是的。

But anyway, the design that you create
但无论如何,你创造的设计

in the audience. When you're implementing it, then you will have to
在观众席上。当你实现它时,你将不得不

to create the the corresponding tables, and that's what you're doing in MSXS.
创建相应的表,这就是您在 MSXS 中执行的操作。

Now in the table when you're creating those. When you know for entities table, you must have the for the primary keys
现在在创建这些内容时在表格中。当你知道 for 实体表时,你必须有 for 主键

and for relationships. You should have proper foreign keys.
以及人际关系。您应该有正确的外键。

Okay, so these things we have discussed because we looked at some relationships. Right? So we started with what
好的,我们已经讨论了这些事情,因为我们看了一些关系。右?所以我们从什么开始

one to many relationship. Then we learned about many to many relationships. And then the next lecture, or the next topic that we'll discuss about these lecture slides is going to be one to May of under a relationship. Okay? So yeah.
一对多关系。然后我们了解了许多对许多的关系。然后下一堂课,或者我们将要讨论的关于这些讲座幻灯片的下一个主题,将是一段关系中的五月。好?所以是的。

it all depends right for and for relationship. You must have foreign keys.
这完全取决于关系和关系。您必须有外键。

Now, these things should be completed by
现在,这些事情应该由

this deadline, which is eleventh of June.
这个截止日期是6月11日。

Okay, so that is again, a Tuesday, and on this deadline, which is sick eleventh of June, we also want you to submit. Your revised Rdm. Revise is the same as final.
好的,这又是星期二,在这个截止日期,也就是6月11日,我们也希望你提交。您修订后的 Rdm. 修订版与最终版相同。

final or revised. I mean the same thing. Okay, initial is the one yet that you will, you know, design for the first time, and then, if we have some recommendation of the improvement, then the next version that you'll create with those improvements, improvements would be called the Revised Rtm. Or the final.
最终版或修订版。我也是一样的意思。好的,初始是你第一次设计的版本,然后,如果我们有一些改进建议,那么你将用这些改进创建的下一个版本,改进将被称为修订版 Rtm。或者决赛。

Any questions, guys till this point.
任何问题,伙计们,直到这一点。

Okay, so if you don't have any questions, then I'll take you to the next slide.
好的,如果你没有任何问题,那么我将带你到下一张幻灯片。

and we here we have it.
我们在这里拥有它。

So by this deadline, which is eleventh of June, you should also submit the MS. Access database, and that means all your
因此,在 6 月 11 日的截止日期之前,您还应该提交 MS. Access 数据库,这意味着您的所有

project in a way right? So in that database what you'll have, you'll have all the tables that you created
在某种程度上项目,对吧?因此,在该数据库中,您将拥有您创建的所有表

along with those tables. You you are also required to provide to design your Gui
以及那些桌子。您还需要提供设计您的 Gui

graphical user interface.
图形用户界面。

And there is a good news about Gui in Ms axis. Okay? And I'll teach those things. I'll teach you the basic basic arms, and which you can make more beautiful if you have more patience. Okay. So with other tables in the. In the last slide I discussed about the tables for entities, and also tables for relationship, if required.
在Ms axis中有一个关于Gui的好消息。好?我会教这些东西。我会教你基本的基本武器,如果你有更多的耐心,你可以把它做得更漂亮。好。所以用其他表格。在上一张幻灯片中,我讨论了实体表,以及关系表(如果需要)。

with proper keys and foreign keys.
使用适当的密钥和外键。

Now the question arises that you know when we are building this project with so much of effort. And if our end user is a person who doesn't know computer science
现在问题来了,你知道我们什么时候花了这么多精力来构建这个项目。如果我们的最终用户是一个不懂计算机科学的人

doesn't know any. You know. SQL thing. So how can that end user use your project?
什么都不知道。你知道的。SQL 的东西。那么,最终用户如何使用您的项目呢?

Okay? So for that end user, we must give some graphical user interface. Okay, so we have one tool here which is called form.
好?因此,对于最终用户,我们必须提供一些图形用户界面。好的,我们这里有一个工具,叫做表单。

Okay? So Ms axis provides us tools to create the graphical user in interface. Or Gui, you may call it.
好?因此,Ms axis 为我们提供了在界面中创建图形用户的工具。或者 Gui,你可以叫它。

which allows us to create simple forms. These are called simple forms. You can do that or create those in Ms. Axis.
这使我们能够创建简单的表单。这些称为简单形式。您可以这样做或在 Ms. Axis 中创建它们。

and that they are very convenient. For the users. And how can you the user use those Msi, those forms well that those forms are useful for an end user
而且它们非常方便。对于用户。以及用户如何使用这些 Msi,这些表单,这些表单对最终用户有用

to enter the data into your table.
将数据输入到表中。

Okay? So when you're working on it, you would realize that you know, designing a form is extremely simple, and it's a fun exercise. Because you would see, you know, beautiful.
好?所以当你在做的时候,你会意识到你知道,设计一个表单是非常简单的,而且是一个有趣的练习。因为你会看到,你知道,美丽。

Do you have been created with minimum effort?
你是用最少的努力创造的吗?

Okay?
好?

So in the deliverables, you have to design the forms as well.
因此,在可交付成果中,您还必须设计表单。

you'll have to create simple forms in access which would allow the end user of your project to enter some data in your tables.
您必须在 Access 中创建简单的表单,这将允许项目的最终用户在表中输入一些数据。

Now in in the next bullet you have this information that you know what you can use the wizard tool.
现在,在下一个项目符号中,您知道可以使用向导工具的以下信息。

There's a form, Wizard. I'll show you all these things right. I'll I'll do a lecture on that. You can use the wizard tool in the access to create the forms, and you can use a variety of formats, right? So these forms that you have, they come in different categories, different style.
有一种形式,向导。我会正确地向你展示所有这些东西。我会做一个关于这个的讲座。您可以使用访问中的向导工具创建表单,并且可以使用多种格式,对吗?所以你所拥有的这些形式,它们有不同的类别,不同的风格。

Alright. So it is up to you like. Which format of which is which style do you want to use so a lot of times? It is dependent on the on your intentions, right like, do you want to create this form for one table? Or do you want to create this form to represent a relationship?
好。所以这取决于你的喜好。你想用哪种格式,你想用哪种风格很多次?这取决于您的意图,例如,您想为一张表创建此表单吗?或者你想创建这个表单来表示一种关系?

Okay? So from the wizard that we have forms, wizard that you have in MSXS. You can use an appropriate
好?因此,从我们有表单的向导中,您在 MSXS 中拥有的向导。您可以使用适当的

format. Okay, so choose the one you think is best for each of the particular table. Okay.
格式。好的,所以选择你认为最适合每个特定表的那个。好。

now use your forms to populate your table with reasonable data, and I discuss this thing and let me reemphasize this
现在使用您的表单用合理的数据填充您的表格,我讨论了这件事,让我再次强调这一点

you will be working, or you, you will be designing an Rdm
你将工作,或者你,你将设计一个 Rdm

a database project.
数据库项目。

Okay? And the database is important for us when our data is huge.
好?当我们的数据庞大时,数据库对我们来说很重要。

right? So if your data is so big that you cannot store in your random RAM right then you need a database, right? That is the real.
右?因此,如果您的数据如此之大,以至于您无法存储在随机RAM中,那么您需要一个数据库,对吗?这才是真的。

That is the reason why we should study databases.
这就是我们应该研究数据库的原因。

Okay, so let me emphasize this again
好的,让我再次强调这一点

when your data is so huge that it can't fit in your main memory, and you need to properly store it, access it. You need a database
当您的数据如此之大以至于无法放入您的主内存,并且您需要正确存储它时,请访问它。你需要一个数据库

right? So in your database project. Also, we want you to have significant data size, right? So I already mentioned that each table in your project should at least have some 50 to 100.
右?所以在你的数据库项目中。另外,我们希望您拥有重要的数据量,对吗?所以我已经提到过,项目中的每个表至少应该有 50 到 100 个。

Therefore maybe 20. You can look at those requirements.
因此,也许是 20 个。您可以查看这些要求。

Therefore, some of the data you can get in your table through the files right? Like Excel files, the way we have been using to create the table. So yeah, maybe say, 80% of the data, you'll get through files. Now remaining 20% of the data you can enter, using the form. So use your form to populate your table with reasonable data size.
因此,您可以通过文件在表中获取一些数据,对吗?像 Excel 文件一样,我们一直用来创建表格的方式。所以是的,也许可以说,80%的数据,你会通过文件。现在,您可以使用表单输入剩余的 20% 的数据。因此,请使用表单以合理的数据大小填充表。

you must. You should enter enough data so that reasonable queries can be asked and tested. Okay. So when you will be doing the the present, the presentation right? Final project presentation, then I might ask you this question, like, you know what? How many arose or the toughest you have in each table? Okay? So as an example, if your project was on movies.
你必须。您应该输入足够的数据,以便可以询问和测试合理的查询。好。那么,当你做现在,演示,对吗?最后的项目介绍,然后我可能会问你这个问题,比如,你知道吗?每张桌子上出现了多少个或最难的?好?举个例子,如果你的项目是关于电影的。

then I'll say, okay, fine. How many movies do you have in the movies table?
然后我会说,好吧,好吧。电影表中有多少部电影?

If you say I have only 15 movies, then I won't be impressed.
如果你说我只有 15 部电影,那么我不会留下深刻的印象。

And 15 is too small
而 15 太小了

movies. You go to, you know, any Imdb data set or something Google it out, you can easily find some 30, 40 movies. Right? So for movies, table. Ideal size would be 100 movies.
电影。你去,你知道,任何Imdb数据集或谷歌的东西,你可以很容易地找到大约30、40部电影。右?所以对于电影,表。理想的大小是 100 部电影。

You can have even more, right? Or at least 50 movies. Okay? So that is what we are saying. You should enter enough data so that the reasonable queries can be asked and tested.
你可以拥有更多,对吧?或至少 50 部电影。好?这就是我们要说的。您应该输入足够的数据,以便可以询问和测试合理的查询。

So if.
所以如果。

Joe, the data that you have in your database
Joe,数据库中的数据

or in the tables of your project.
或在项目的表格中。

Are like, say, 1010 10 Tuples in each table, then probably that that is not enough
比如说,每个表中有 1010 个元组,那么这可能还不够

to try more interesting asual queries.
尝试更有趣的 asual 查询。

So as an example. Well, you might say, you know fine! You are telling us this thing, but the the tables that you used were very, very simple. I I agree with you. The tables that we have used in the lectures are most of those are very simple.
举个例子。好吧,你可能会说,你知道的!你告诉我们这个东西,但你使用的表格非常非常简单。我同意你的看法。我们在讲座中使用的表格大多非常简单。

The reason has been that in those tables that I use in my lecture slides I wanted to explain to you some very important concepts.
原因是,在我的演讲幻灯片中使用的那些表格中,我想向你们解释一些非常重要的概念。

and for that I I believe it is good if we confine ourselves to a smaller table. Okay. But if you remember, the Sbu awards data that we had has a lot of, you know rows, probably in thousands, if I correctly remember.
为此,我认为,如果我们把自己限制在一张较小的桌子上是件好事。好。但如果你还记得,Sbu 奖励数据,我们有很多,你知道的行,如果我没记错的话,可能有几千行。

Okay, any questions, guys.
好的,有任何问题,伙计们。

okay, if you don't have any questions, then let's see what we have in the last bullet.
好的,如果您没有任何问题,那么让我们看看我们在最后一颗子弹中的内容。

The last bullet says that different tables will require different number of rows to be reads enabled.
最后一个项目符号表示不同的表将需要启用不同数量的读取。

So here, let me, you know, point out one fact about the tables.
所以在这里,让我指出一个关于表格的事实。

and it happened a lot of times during the

the semesters when I was teaching this course in Stony Brook University.
我在石溪大学教授这门课程的学期。

See? I, I remember some of the students. They had some bi background in biology or medicine, something like that.
看?我,我记得一些学生。他们有一些生物学或医学的双性背景,类似的东西。

They wanted to work on the medical data. Okay? So probably, if I could correctly remember. But there was a team that was working on cancer data, right? So they they had some types of cancer.
他们想处理医疗数据。好?所以可能,如果我能正确地记住的话。但是有一个团队正在研究癌症数据,对吧?所以他们得了某些类型的癌症。

or may something similar, right where they were finding it very difficult to come up with the, I believe type of the disease. Something like that. Okay? So in some situation, we may not have enough records.
或者可能类似的东西,就在他们发现很难想出这种疾病的地方。类似的东西。好?所以在某些情况下,我们可能没有足够的记录。

Okay? So as an example, you know, let me map it to a different scenario.
好?举个例子,让我把它映射到一个不同的场景。

say you? Your your project is based on university.
你说?你的项目是基于大学的。

Alright. So let me write it here.
好。所以让我在这里写。

Aware, is my pen. Okay, university.
意识,是我的笔。好的,大学。

Okay? And in the university you have, say, one
好?在大学里,你有一个

entity
实体

programs.
程序。

Alright, so programs could be. Let me give you the example. Programs
好吧,所以程序可以。让我举个例子。程序

like BS. Bachelor of Science, MS. Master of science.
像理学学士,理学硕士。

PHD. Right, MBA.
博士。对,MBA。

Right? So see, look at it! The programs. They are not many. Bachelor of science, master of science. Ph, DMBA. You may a add one or 2. Okay. So for some entities, it is very difficult to come up with more records. Right? So in that case I'll say, Okay, fine.
右?所以看,看看它!程序。他们并不多。理学学士,理学硕士。Ph,DMBA。您可以添加一个或两个。好。因此,对于某些实体来说,很难拿出更多的记录。右?所以在那种情况下,我会说,好吧,好吧。

If it is not possible to have more records for that table in your database. That's okay.
如果数据库中无法包含该表的更多记录。没关系。

But make sure that on average. On average. The tables they have, say, 30 records, 50 records, something like that
但要确保平均而言。平均而言。比如说,他们有 30 条记录、50 条记录之类的表格

don't have just 1010 records in every table that won't look good
不要在每个表中只有 1010 条看起来不太好的记录

questions.
问题。

Alright, then
好吧,那

let's move on to next deliverable.
让我们继续下一个可交付成果。

which is about the queries. Okay?
这是关于查询的。好?

Queries. We have been writing.
查询。我们一直在写。

And we have been writing these queries and ascular
我们一直在写这些查询和ascular

and well, the queries that we have written till now.
好吧,到目前为止,我们写的查询。

For those queries we were not. Yeah, paying attention on the questions
对于这些查询,我们没有。是的,注意问题

right now. Now, the issue is, what is the difference between a query and a question in the database? Right?
马上。现在的问题是,数据库中的查询和问题之间有什么区别?右?

So I would say that by questions we mean English state English queries.
所以我想说,我们所说的问题是指英语状态英语查询。

Okay, so I'll I'll consider English queries as the questions. As an example. Let me come up with
好的,所以我将英语查询视为问题。举个例子。让我想出

a question. Say we, we have. You know the the database about movies.
一个问题。说我们,我们有。你知道关于电影的数据库。

So on that Mo movies, database I want to find out
所以在那部莫电影上,数据库我想找出来

the the top, the Pm. The actors and directors who worked together for maximum movies. Right? So my question is.
顶部,Pm。合作过最多电影的演员和导演。右?所以我的问题是。

find
找到

the pair of
一对

actor
演员

and director
和导演

who worked
谁工作过

for maximum movies.
以获得最大的电影。

Alright. So this is an English. And this is a question because it's this simple.
好。所以这是英语。这是一个问题,因为它就是这么简单。

you know, explanation of what do we need from the data?
你知道,解释我们需要从数据中得到什么?

Okay, so for your project, you have to come up with. We will not say that this is what you have to do. The good news is that you have to come up with 5 interesting questions. So I just gave you one.
好的,所以对于你的项目,你必须想出来。我们不会说这是你必须做的。好消息是你必须想出 5 个有趣的问题。所以我就给了你一个。

It is highly likely that one of the one of the group in the class may like to work on movies. Right? So this is an example for question.
班上小组中的一个人很可能喜欢拍电影。右?所以这是一个问题的例子。

So you have to come up with 5 interesting questions that you would allow anybody to ask on your database. Okay? So make up 5 interesting questions you could ask of your database.
因此,您必须提出 5 个有趣的问题,您可以允许任何人在您的数据库中提出这些问题。好?因此,您可以对数据库提出 5 个有趣的问题。

And then these questions, these should be the question for a user of your database might want an answer too
然后这些问题,这些应该是你的数据库用户可能也想要答案的问题

good. Now this
好。现在这个

the English description of the query and the corresponding SQL statement, right? So these are kind of related.
查询的英文描述和对应的SQL语句,对吧?所以这些是相关的。

So once you came up with this idea, like, you know, if I am creating this database, then I should be able to ask these questions
所以一旦你想出了这个想法,比如,你知道,如果我正在创建这个数据库,那么我应该能够问这些问题

right? So if you were able to come up with a question. 5 interesting questions rather. It is not just one.
右?所以如果你能够提出一个问题。5个有趣的问题。它不仅仅是一个。

When you were able to find to come up with 5 interesting questions on your database. Then you should also implement those in SQL,
当您能够在数据库中找到 5 个有趣的问题时。然后你也应该在 SQL 中实现这些,

right? So that's what we are saying in the next point.
右?这就是我们在下一点中要说的。

let me put the stars over here.
让我把星星放在这里。

English description of the query
查询的英文说明

query of which you can call it. Now question
可以调用它的查询。现在问题

English discretion of a query becomes a question.
查询的英语自由裁量权成为一个问题。

Okay. An SQL version of the the question would be a query.
好。该问题的 SQL 版本将是一个查询。

So English description of the query and the corresponding SQL. Statements you have to provide.
所以对查询和相应的SQL进行英文描述。您必须提供的声明。

Now you know these questions that that you're coming up with like these 5 interesting questions they should be.
现在你知道了你想出的这些问题,就像这 5 个有趣的问题一样,它们应该是。

What I should say! They should not be too simple.
我应该说什么!它们不应该太简单。

Right? So let me write it here.
右?所以让我在这里写。

The questions
问题

and

queries.
查询。

queries means SQL queries
queries 表示 SQL 查询

should not
不应该

B.

Too simple.
就是这么简单。

Now you would ask me like, you know. What do you mean by too simple?
现在你会问我,你知道的。太简单是什么意思?

Well, now for for that I should have. I should explain to you that what makes a query complex, okay, how can you come up with the medium complexity queries, or more complex queries.
好吧,现在我应该这样做。我应该向你解释一下,是什么让查询变得复杂,好吧,你怎么能想出中等复杂度的查询,或者更复杂的查询。

Well, for more complex queries, you should have multiple joints. Okay? So
好吧,对于更复杂的查询,您应该有多个关节。好?所以

simple query. Let me explain it to you.
简单查询。让我向你解释一下。

Simple query.
简单查询。

Query
查询

means
方法

where
哪里

you have
你有

have

no joins.
没有连接。

no joins, means
没有连接,意味着

singer table.
歌手表。

Okay? So if you have only one table and you are writing your ask your query only on one table, then I'll consider that as simple. Okay? So your questions that you're coming up coming up with should involve multiple tables, at least 2 or 3. You can have maybe one query with 2 tables, and then the remaining queries with 3 or 4 tables.
好?因此,如果您只有一个表,并且您只在一张表上编写您的询问查询,那么我认为这很简单。好?因此,您提出的问题应该涉及多个表格,至少 2 或 3 个。您可以有一个包含 2 个表的查询,然后具有 3 或 4 个表的其余查询。

Alright, and you'll do joints.
好了,你来做关节。

Question.
问题。

Okay?
好?

So here we have it. Most of the queries that you are writing should involve joints, and these joints will make your query slightly
所以我们有了它。您正在编写的大多数查询都应该涉及关节,这些关节会使您的查询略有变化

complex, and that's what we want. We want to see whether you are comfortable with writing more queries or not for your project.
复杂,这就是我们想要的。我们想看看你是否愿意为你的项目编写更多的查询。

And the fun part is that you're not working alone. You're working in a group.
有趣的是,你不是一个人在工作。您正在一个小组中工作。

right? And the maximum sizes. Well, yeah, please think about it.
右?以及最大尺寸。嗯,是的,请考虑一下。

for each question.
对于每个问题。

Explain briefly when and why a user would want to ask it on the database. Right? So the queries that you're coming up with, they should be practical.
简要说明用户何时以及为什么想要在数据库上询问它。右?所以你想出的查询,它们应该是实用的。

Alright. So this whole thing I can write in one state, and, in one word.
好。所以这整件事我可以用一个状态来写,而且,用一个词来写。

your queries should be practical.
您的查询应该是实用的。

Alright.
好。

Okay. So let's see, what else do we need?
好。那么让我们看看,我们还需要什么?

I told you about forms? Right? So the simple form
我告诉过你关于表格的?右?所以简单的形式

in it
在里面

simple form, right? So in the previous slide, when I said that you should have, you should create forms. So most of the table, or each table in your database, then those were simple forms. There are these forms also which are called hierarchical forms?
简单的形式,对吧?因此,在上一张幻灯片中,当我说你应该有,你应该创建表单。因此,大多数表,或数据库中的每个表,都是简单的形式。还有这些形式被称为分层形式吗?

Okay, sir.
好的,先生。

in your project we want you to create at least 2 hierarchical firms in
在您的项目中,我们希望您在以下位置创建至少 2 个分层公司

Ms. Axis
Axis女士

for your database.
用于您的数据库。

Now question arises, when can we create hierarchic?
现在问题来了,我们什么时候可以创建层次结构?

I'll explain that thing to you when we will learn about forms. But yeah, I can give you a very high level idea about hierarchical forms.
当我们学习形式时,我会向你解释这件事。但是,是的,我可以给你一个关于层次结构形式的非常高层次的想法。

When you have
当你有

so hierarchical forms, we can form in one
所以层次形式,我们可以合二为一

too many
太多了

kind of relationship.
一种关系。

Okay? So in one to many relation of a kind of relationship. This one kind, one side of the entity
好?所以在一对多的关系中是一种关系。这种,实体的一面

would form the parent
将形成父项

parent form. Parent form comes from the one side and the the
父窗体。父表单来自一侧,而

the child table goes to the many side. Right? So if you have to create the hierarchical form for one to many relationship between the nations and shares the nation will become the parent form and the child form. Child forms will be for the shares.
子表转到多边。右?因此,如果您必须为国家和共享之间的一对多关系创建层次结构形式,则国家将成为父形式和子形式。子表格将用于股票。

Okay? So it's not difficult, or we will do some simple stuff, and you can do the same for your project also. But what you need to remember is that in your project deliverable. We want you to create at least 2 hierarchical forms, using Ms. Axis.
好?所以这并不难,或者我们会做一些简单的事情,你也可以为你的项目做同样的事情。但你需要记住的是,在你的项目可交付成果中。我们希望您使用 Ms. Axis 创建至少 2 个分层表单。

Now for the phones. Right? It is designing good form boils down to your patience and your appreciation for the art or the beauty.
现在是手机。右?它设计好的形式归结为你的耐心和你对艺术或美的欣赏。

Okay, so it is kind of little subjective. But
好吧,这有点主观。但

let's look at this bullet. I hope that is enough.
让我们看看这个子弹。我希望这就足够了。

So it says that you need to format your forms, such that they are pleasing to eyes right pleasing to eye.
所以它说你需要格式化你的表格,这样它们就令人赏心悦目。

I I'm not you know. Ex putting any constraint like how many, whether you should have the buttons there or not.
我不是,你知道。例如,放置任何约束,例如有多少,是否应该在那里安装按钮。

What I'm saying is that the form that you're creating should look attractive. That's it. Okay, they should be pleasing to the I
我要说的是,您正在创建的表单应该看起来很有吸引力。就是这样。好吧,他们应该取悦我

so make sure that it doesn't look ugly. Okay?
所以要确保它看起来不难看。好?

And should have the functionalities
并且应该具有功能

and can include any extra information from outside the pattern or child classes that you think you can find it useful. Okay? And after that we we learned about, you know we discuss that you should have these many entities we discuss that you should have these many in relationships.
并且可以包含来自模式或子类之外的任何额外信息,您认为它很有用。好?在那之后,我们了解了,你知道我们讨论你应该有这么多实体,我们讨论你应该在关系中拥有这么多。

We also discuss, you know, like, how many records should we have in each table?
我们还讨论,比如,每个表中应该有多少条记录?

And then, we just saw about what we just learned about forms that you need to use forms which are guis for your data entry.
然后,我们刚刚看到了我们刚刚学到的关于表单的知识,您需要使用表单,这些表单是数据输入的 gui。

And the forms could be simple or hierarchical. I need 2 hierarchical forms, and the other says, a simple form.
形式可以是简单的,也可以是分层的。我需要 2 个分层形式,另一个说,一个简单的形式。

Now let's look at one more requirement, which is the report.
现在让我们再看一个要求,那就是报告。

Okay? So another deliverable is the report you need to create at least one report for your database.
好?因此,另一个可交付成果是您需要为数据库创建至少一个报告的报告。

Now question, arise is fine. What is this new thing
现在问题,出现是可以的。这是什么新事物

we know a little bit about forms, right? Because the you know, the instructor is saying that within the forms you can have the Gui
我们对表格有一点了解,对吧?因为你知道,导师是说,在表格中你可以有 Gui

okay? And the Gui would be very helpful for the end user. Using Gui, we can enter the data. And yeah.
好?Gui 对最终用户非常有帮助。使用 Gui,我们可以输入数据。是的。

so report is the the the utility or the provision in Ms axis which you can use to generate the
所以报告是 Ms 轴中的实用程序或规定,您可以使用它来生成

the data to share with someone. Okay, so let me read it here, and then I'll explain to you.
要与某人共享的数据。好的,让我在这里阅读,然后我会向你解释。

The report should be of interest to a serious user of your database.
数据库的认真用户应该对该报告感兴趣。

So as an example, right, let me come up with a scenario.
举个例子,对,让我想出一个场景。

Okay? Alright. So
好?好。所以

if you remember
如果你还记得

the very first database that we used in this course was Sbu awards.
我们在本课程中使用的第一个数据库是 Sbu 奖项。

Okay, so in Sbu awards, you are provided with a file, and that file has all the details right, like the principal investigators and the award you know, the the sponsor who gave the award the quantity of the award, the type of our
好的,所以在 Sbu 奖项中,您会获得一份文件,该文件包含所有详细信息,例如您知道的主要研究人员和奖项、授予奖项的赞助商、奖项的数量、我们的类型

right, and probably dates and all.
对,可能还有日期等等。

Now this information that was provided to us could come as a report also
现在提供给我们的这些信息也可以作为报告

right? But then that report will come in a Pdf format.
右?但随后该报告将以 Pdf 格式出现。

Alright. So let's assume that. We have all the data about the research which is being done in Stony Brook University in different tables. Okay. And they are all connected with each other, with the relationships, right with the entities and all that stuff.
好。因此,让我们假设这一点。我们在不同的表格中拥有有关石溪大学正在进行的研究的所有数据。好。它们彼此相连,与关系相连,与实体和所有这些东西相连。

Now, if somebody is interested in knowing the the awards that this Stony Brook University is winning right then what we will do from on that database which is designing in Ms. X's. We can create a report.
现在,如果有人有兴趣知道这所石溪大学正在赢得的奖项,那么我们将从X女士设计的数据库中做些什么。我们可以创建一个报告。

or and what is a report? A report has the data presented in a nice format?
或者什么是报告?报告的数据是否以漂亮的格式呈现?

Okay, so report is different from the form. The form is a graphical user interface which is to be which is used by a user to interact with the data or give or in or enter the data in the table.
好的,所以报告与表格不同。该表单是一个图形用户界面,用户使用它来与数据交互或提供或输入表中的数据。

Right? So, yeah, the form is a Gui graphical user interface.
右?所以,是的,表单是一个 Gui 图形用户界面。

whereas the report is the data that you get out of your you know database and which you want to cut to send to some end user.
而报告是您从“您知道”数据库中获取的数据,并且您希望将其剪切以发送给某些最终用户。

Okay, so that that's the difference between the form and a report.
好的,这就是表单和报告之间的区别。

The report should be of interest to a serious user of your database.
数据库的认真用户应该对该报告感兴趣。

So what you can do, you can create a report corresponding
所以你可以做什么,你可以创建一个相应的报告

poni
波尼

2

and SQL. Query.
和 SQL。查询。

So the query result that you have. You can create report.
所以你有的查询结果。您可以创建报告。

and we will do all these things in the exit, in in the lectures. Right? So don't worry about it. And all these things I will need towards the end of the semester.
我们将在出口,在讲座中做所有这些事情。右?所以不用担心。所有这些东西我都需要在学期结束时完成。

Right? Like this is for
右?就像这是为了

June the eleventh. Okay. And today is what today is seventh of May. So we have one month.
6月11日。好。今天是五月七日。所以我们有一个月的时间。

We have one month. But yeah, you you need to remember that in one month you have to do a lot
我们有一个月的时间。但是,是的,你需要记住,在一个月内你必须做很多事情

right, and good news is that you can work in a team.
是的,好消息是你可以在一个团队中工作。

Alright. Another good news is that we are almost done with the lectures.
好。另一个好消息是,我们几乎完成了讲座。

Whatever I had to teach, probably 70% have already taught.
无论我要教什么,大概 70% 的人已经教过了。

Okay. So now you'll be busy with your project. Okay?
好。所以现在你会忙于你的项目。好?

And that is when you would see that, you know, whatever was taught in the lecture is now making more sense when we are working on a real life problem.
那时你会看到,你知道,无论讲座中教什么,现在当我们在解决现实生活中的问题时,现在都更有意义了。

Okay? So now, what do we have? Be sure to use appropriate formatting.
好?那么现在,我们有什么?请务必使用适当的格式。

You should, make use of the constraints you should make use of the validation rules in your database, so the constraints means. You know the the primary keys
你应该,利用约束,你应该利用数据库中的验证规则,所以约束意味着。您知道主键

have appropriate fabric keys have appropriate foreign keys.
具有适当的结构键 具有适当的外键。

and what else the domain you should have the proper domain as an example. If you have date, then use it as a date type, right or date time type. Don't declare that as a string. That's what we are saying for every attribute.
以及您还应该拥有哪些域,例如适当的域。如果您有日期,则将其用作日期类型、右侧或日期时间类型。不要将其声明为字符串。这就是我们对每个属性所说的。

make sure that you are using the correct domain
确保您使用的是正确的域

alright.
好。

Validation rules. You can have
验证规则。您可以拥有

validation. Rules means simply time, a key one key kind of a thing, so don't get too much into these things.
验证。规则意味着简单的时间,一个关键的东西,所以不要过多地研究这些东西。

Now you should submit the Msx database with the forms, all the reports, and you should also have a Powerpoint presentation.
现在,您应该提交包含表单、所有报告的 Msx 数据库,并且还应该有一个 Powerpoint 演示文稿。

This Powerpoint presentation should be used
应使用此 Powerpoint 演示文稿

in

yawn.
呵欠。

Final.
最后。

a project
一个项目

presentation.
介绍。

Okay.
好。

so what will happen? I think this has been already shared with you.
那么会发生什么呢?我想这已经与你分享了。

You know, by Dr. Zhang. So please now keep that with you. Okay, because these deadlines are important.
你知道,张博士。所以现在请随身携带。好的,因为这些截止日期很重要。

So you should remember these deadlines and these deadlines will help you out in making progress towards your
因此,您应该记住这些截止日期,这些截止日期将帮助您在实现您的目标方面取得进展

project completion.
项目完成。

So add 3 to 5 queries. For your interesting questions.
因此,请添加 3 到 5 个查询。对于您有趣的问题。

They should include queries that require joints and aggregations. We already discussed about it in the previous slide.
它们应包括需要关节和聚合的查询。我们已经在上一张幻灯片中讨论过它。

Now you might be thinking about it right like there is a lot of work. But how will we be graded ultimately?
现在你可能正在考虑这个问题,就像有很多工作要做一样。但是我们最终将如何评分呢?

So let me talk about the grading as well.
因此,让我也谈谈分级。

So you will be graded on each major component of the project. Okay? Therefore don't submit these things late.
因此,您将对项目的每个主要组成部分进行评分。好?因此,不要迟交这些东西。

Please submit. The rdm. On time. Please submit the the team information. The first thing that you have to do is to submit your team information, your project topic.
请提交。rdm.准时。请提交团队信息。你要做的第一件事是提交你的团队信息,你的项目主题。

your project statement, then your rdm, then your tables and the tables along with your forms and reports. Interesting queries, Powerpoint presentation. So make sure that you're doing those submissions on time.
您的项目声明,然后是您的 RDM,然后是您的表格和表格以及您的表单和报告。有趣的查询,Powerpoint演示文稿。因此,请确保您按时提交这些内容。

So in the final presentation, you'll be given all you know, 35 points, your 35 points will be determined in your final presentation.
所以在最后的演讲中,你会得到你所知道的一切,35分,你的35分将在你的最终演讲中确定。

so in your presentation or in your project, it should reflect the understanding of the database technology which has been talked to you till now or till the end of the semester. You should have a large data set.
因此,在您的演示文稿或项目中,它应该反映出对数据库技术的理解,直到现在或学期结束。你应该有一个大数据集。

And yeah, in the presentation, we would like to see that all the teammates should participate. Okay, so as an example, assume that you know there are 3 people.
是的,在演讲中,我们希望看到所有队友都应该参与。好吧,举个例子,假设你知道有 3 个人。

There are 3 people in the team or 3 students in a team.
团队中有 3 人或团队中有 3 名学生。

Okay? But out of these 3 students only one student is doing the presentation, then that won't look good.
好?但是在这 3 名学生中,只有一个学生在做演示,那么这看起来就不好了。

Okay? So what you should do, you should plan the presentation. Every person in the team should participate
好?所以你应该做什么,你应该计划演示文稿。团队中的每个人都应该参与

right, and and you know every person should contribute in the project development as well.
是的,而且你知道每个人都应该为项目开发做出贡献。

Okay. So as an example, say, you may have a person who's who was very comfortable with design
好。举个例子,比如说,你可能有一个对设计非常满意的人

right? And the first person will say that it created the Rdm design was my responsibility.
右?第一个人会说它创造了 Rdm 设计是我的责任。

The second person will say, Okay, I collected the data. The third person will say, Okay, fine. You know, I created the tables and all. Then, you know, second person will say, Okay, I created the forms also. The first person will say, you know what I created some report.
第二个人会说,好吧,我收集了数据。第三个人会说,好吧,好吧。你知道,我创建了表格和所有东西。然后,你知道,第二个人会说,好吧,我也创建了表格。第一个人会说,你知道我创建了一些报告。

So so the what I'm trying to explain is that every person in the team should take part should contribute towards the project, and should also participate in the demonstration. Then only we would know that. Yes, everybody in the team participated in the project
因此,我想解释的是,团队中的每个人都应该参与,应该为项目做出贡献,也应该参与演示。那么只有我们才会知道。是的,团队中的每个人都参与了这个项目

question.
问题。

And yeah, we will provide you the grading criteria. Right? So if I correctly remember, out of 35 points.
是的,我们将为您提供评分标准。右?所以如果我没记错的话,满分 35 分。

how do we break it? I think I will have 15 points for your Rdm.
我们如何打破它?我想我会给你的 Rdm 15 分。

The design is very important.
设计非常重要。

Does
是否

10 points for implementation.
10 点实施。

Something like that? Right? I'll look at my records, and I'll share with you
类似的东西?右?我会看看我的记录,我会和你分享

15 points for Rdm. 10 points for implementation and 10 points for demonstration
Rdm 15 分,实施 10 分,示范 10 分

that adds up to 35,
加起来是 35,

a gift.
一份礼物。

So presentation getting criteria. As I said, it could be something like this. You should have the relationship diagram you should use proper naming, as we learned in in this semester.
所以演示文稿获得标准。正如我所说,它可能是这样的。你应该有关系图,你应该使用正确的命名,正如我们在本学期学到的那样。

Your tables should be reasonably populated with a variety of data. Is it there or not? We'll look into it.
您的表应合理地填充各种数据。有没有?我们会调查的。

Queries. Do you have 5 interesting queries or not. So these are the things I'll check right as you'll be presenting Rdm. As ask you, or maybe I'll see as you're presenting. You'll tell that these are my 5 queries. These are my forms, these are my you know the hierarchical form, and this is my report.
查询。您是否有 5 个有趣的查询。因此,当您展示 Rdm 时,我将检查这些内容。正如你问的那样,或者我会在你演示时看到。你会说这是我的 5 个查询。这些是我的表格,这些是我的分层表格,这是我的报告。

So we will look into all these factors while we will be grading right? So in the implementation, I'll see all these things like, do you have 5 interesting queries?
因此,我们将在评分时研究所有这些因素,对吗?因此,在实现中,我将看到所有这些东西,例如,您有 5 个有趣的查询吗?

Do you have the forms. Do you have the table properly created in the demo? I see how well you're presenting it.
你有表格吗?您是否在演示中正确创建了表格?我看到你表现得有多好。

Okay? And 15 points is for your idea.
好?15 分是针对您的想法。

Forms reports? Do you have at least one interesting report? Forms? Do you have at least 2 hierarchical forms? Does your database contain appropriate constraints? Do we have the validation, rules and all and any additional features. If you have.
表单报告?你至少有一份有趣的报告吗?形式?您是否至少有 2 种分层形式?您的数据库是否包含适当的约束?我们是否有验证、规则和所有和任何附加功能。如果你有。

Okay. So that was about your project, you can still have questions. If you have questions, please let me know
好。所以这是关于你的项目,你仍然可以有问题。如果您有任何问题,请告诉我

if you're not comfortable asking questions to me. Please ask the questions to Dr. Zhang, and you know, and I'll request Dr. Zhang to reach out to me
如果你不愿意问我问题。请把问题问给张医生,你知道的,我会请张医生联系我

with your queries. Okay?
与您的查询。好?

Questions.
问题。

Okay? So if you don't have any questions on this topic.
好?因此,如果您对此主题没有任何疑问。

then I'll take you to the next
那我带你去下一个

lecture that we have here.
我们在这里的讲座。

And in this next lecture we will look at some interesting type of relationships. Let me have some water
在下一讲中,我们将研究一些有趣的关系类型。让我喝点水

book it
预订它

so what we will do. Now we'll look at another interesting kind of relationship, which is one to one
那么我们将做什么。现在我们来看另一种有趣的关系,那就是一对一的关系

we have already learned about what
我们已经了解了什么

we learned about. Wait a second, let me change the color.
我们了解了。等一下,让我换个颜色。

You've been good.
你一直很好。

We learned about
我们了解了

one

to many.
对许多人来说。

Example was
例子是

niches

2 shares
2 分享

alright. So that kind of relationship we have singing.
好。所以这种关系我们有歌唱。

We saw many to many, also.
我们也看到了很多。

okay. And the many-to-many relationship that we had in our lecture slide involved.
好。以及我们在讲座幻灯片中涉及的多对多关系。

The entities which were items
作为项的实体

and

say, it's
说,这是

okay. So we have seen one too many, many, too many. Now, let's look at one to one and recursive relationships. Okay, so before that, I'll probably show you some examples. And here we go.
好。所以我们已经看到了太多,太多,太多了。现在,让我们看一下一对一和递归关系。好的,在那之前,我可能会给你看一些例子。我们开始吧。

Now, let's think about an organization. Okay, so the organization example could be a university, or you know, any
现在,让我们考虑一个组织。好的,所以组织的例子可以是一所大学,或者你知道,任何

private enterprise. Okay, and here we are looking at the private enterprise. Think of a big company
私营企业。好的,这里我们来看看私营企业。想想一家大公司

could be Alibaba as an example.
可以以阿里巴巴为例。

alright or Microsoft.
好吧,或者Microsoft。

All right. So let's see, what do we mean by organization chart.
好吧。那么让我们看看,我们所说的组织结构图是什么意思。

So I'll read this thing, and then I'll explain to you this example that we have in the bottom
所以我会读这个东西,然后我会向你解释我们在底部的这个例子

organization chart implicitly shows a relationship between employees.
组织结构图隐式显示员工之间的关系。

okay, employees and their supervisor.
好的,员工和他们的主管。

But how do we show that in this data in the database? Right? That's a question we are trying to address. But before that, let's try to understand what is an organization chart.
但是我们如何在数据库中的这些数据中显示这一点呢?右?这是我们正在努力解决的问题。但在此之前,让我们试着了解什么是组织结构图。

So pay attention to this picture that I'll put in our box
所以请注意我会放在我们盒子里的这张图片

in this picture you are looking at the kind of a tree structure I'll say, Okay, where?
在这张照片中,你看到的是那种树形结构,我会说,好吧,在哪里?

On the top we have this person, Alice and Alice has this designation, which is managing director.
在上面,我们有这个人,爱丽丝和爱丽丝有这个头衔,那就是总经理。

Okay? So in our organization, which you may call ABC, incorporated. ABC, INC,
好?因此,在我们的组织中,您可以称之为 ABC,合并。美国广播公司,

okay, it's an organization. And here we have this organization chart.
好吧,这是一个组织。在这里,我们有这个组织结构图。

So, Alice.
所以,爱丽丝。

the person Alice, who is an employee with ABC. Incorporated, is working as the managing director.
爱丽丝(Alice)是ABC的一名员工。Incorporated,担任董事总经理。

Alright good!
好好!

Now, you know the managing director Alice is take is supervising.
现在,你知道总经理爱丽丝正在监督。

These, you know, deep
这些,你知道,很深

you may call those sections or units or departments, whatever you call it. Okay, let's call those as departments.
你可以称这些部门或单位或部门,无论你怎么称呼它。好吧,让我们称它们为部门。

The managing director, Alice is looking.
总经理爱丽丝正在寻找。

is kind of heading these departments.
是领导这些部门。

What are these departments?
这些部门是什么?

The first department is marketing. The second department is accounting. The third department is purchasing, and the fourth department is personal and BR,
第一个部门是营销。第二个部门是会计。第三部门是采购,第四部门是个人和BR,

right, personal.
对,个人。

pr, would be personal relationships. Okay.
公关,将是个人关系。好。

fine, great.
很好,太好了。

Now, the managing director, who is.
现在,总经理,谁是。

you know, the head of all these different departments in these departments like marketing, we have these 3 employees. Marketing has net. Andrew and Claire.
你知道,这些部门(如营销)中所有这些不同部门的负责人,我们有这 3 名员工。营销有网。安德鲁和克莱尔。

Accounting department has Todd and Nancy purchasing department has briar and Sarah and Personal and Pr. Department has only one employee who is Sophie?
会计部门有 Todd 和 Nancy 采购部门有 briar 和 Sarah,个人和公关部门只有一名员工,谁是 Sophie?

Alright. So this kind of structure we have
好。所以我们有这种结构

now, you know, if you think about it, then, even for each organ, each department that we have there should be a boss
现在,你知道,如果你仔细想想,那么,即使是每个机关,我们每个部门都应该有一个老板

alright, which you will figure out later in the next slice. You may get to know that, you know, in each department, like marketing. Probably net is the
好了,你稍后会在下一节中弄清楚。你可能会知道,你知道,在每个部门,比如营销。可能 net 是

the head of the department.
部门负责人。

Net is the head of the marketing department.
Net是营销部门的负责人。

Todd is the head of the accounting department. Purchasing is being headed by briar, and Sophie is the only person. So yeah, Sophie is her own boss.
Todd 是会计部门的负责人。采购由Briar负责,Sophie是唯一的人。所以是的,苏菲是她自己的老板。

Alright. So what is the role of Alice? Alice is kind of, you know. Heading these 4 people.
好。那么爱丽丝的角色是什么呢?爱丽丝有点,你知道的。领导这 4 个人。

Okay, Ned Todd, Brian, and Sophie. They report to Alice.
好的,内德·托德、布莱恩和苏菲。他们向爱丽丝汇报。

and that is and Andrew and Claude. They are reporting to net nets is reporting to Todd. Right? So that kind of organization chart we have.
那就是安德鲁和克劳德。他们向净网报告,向托德报告。右?所以我们有这样的组织结构图。

Alright. So this is very important for us to understand, because it is so common right in Stony Brook University. Also, I can tell you, and the similar kind of structure you'll find in your university as well.
好。所以这对我们来说非常重要,因为它在石溪大学很常见。另外,我可以告诉你,你也会在你的大学里找到类似的结构。

so in Estonia Brook University we have the President. Alright, so I don't exactly remember the hierarchy. But let let me just make it up
所以在爱沙尼亚布鲁克大学,我们有校长。好吧,所以我不完全记得层次结构。但让我来弥补一下

so. The President is the the head of the university, and then we can think of, you know, maybe provost or register, and all but
所以。校长是大学的校长,然后我们可以想到,你知道,也许是教务长或注册,等等

and and then we'll have, you know, under these will have the different colleges in different colleges. We'll have Deans, and in different colleges. We'll have different departments, and each department will have several employees, but each in each department will have a department chair as well.
然后我们会有,你知道,在这些下面会有不同学院的不同学院。我们会有院长,在不同的学院。我们将有不同的部门,每个部门都会有几名员工,但每个部门的每个部门也会有一个部门主席。

Okay, so the the point is that this kind of organization chart is very, very common.
好的,关键是这种组织结构图非常非常普遍。

And if your database is about any organization employees, then yeah, you must think about implementation.
如果你的数据库是关于任何组织员工的,那么是的,你必须考虑实施。

So after understanding this organization chart, we have to look into it.
所以在了解了这个组织结构图之后,我们必须研究一下。

How do we
我们如何

show this in the database?
在数据库中显示这个?

Show this? And ultimately implement right? So that's where we are going.
显示这个?并最终实施,对吗?这就是我们要去的地方。

Okay, that's the reason I thought, okay, let's discuss it. Discuss about it. And then we will look at the implementation Tts and the design details. Okay?
好吧,这就是我想的原因,好吧,让我们讨论一下。讨论一下。然后,我们将查看实现 Tts 和设计细节。好?

Any question.
任何问题。

All right, then, let's move to the next slide.
好了,让我们进入下一张幻灯片。

Here we will. Did the title, says one to one relationship, but fine. Let's see if we have one to one relationship or not
在这里,我们会的。做了标题,说一对一的关系,但很好。让我们看看我们是否有一对一的关系

okay. So you know,
好。所以你知道,

organization chart, right? So this is the organization chart. And hey, we are in the organization chart. You looked at a scenario.
组织结构图,对吧?这是组织结构图。嘿,我们在组织结构图中。你看了一个场景。

Okay? And in that scenario,
好?在这种情况下,

let's let's put these things together. Okay, I should.
让我们把这些东西放在一起。好吧,我应该。

wait a second. Let me quickly erase my slide.
等一下。让我快速擦除我的幻灯片。

and then I'll get some space, and I would use that space
然后我会得到一些空间,我会利用这个空间

to discuss something extremely interesting related with this organization chart.
讨论与此组织结构图相关的非常有趣的事情。

Right?
右?

Where is my pen? My pen is over here.
我的笔在哪里?我的笔在这里。

So let me put these things here, Alice.
所以让我把这些东西放在这里,爱丽丝。

then Ned
然后是内德

Angel
天使

Claire.
克莱尔。

then Todd
然后是托德

and Nancy
和南希

Bria.
布里亚。

Sarah Sophie.
莎拉·索菲(Sarah Sophie)。

Okay, and then I'll write marketing.
好的,然后我会写营销。

Then accounting.
然后是会计。

purchasing
采购

personal.
个人。

And PR.
和公关。

Now the question to you is.
现在你的问题是。

you know, can you suggest me
你知道,你能建议我吗

the the heading for these columns?
这些列的标题?

Right? Can you provide me the heading for these 2 columns in the first column I have the name of human beings, right or people, Alice, Ned Andrew.
右?你能为我提供第一列中这两列的标题吗,我有人类的名字,对或人,爱丽丝,内德安德鲁。

Where from? I got this data from this organization chart, Alice, Ned Andrew, clad. These are all people.
从哪里来?我从这个组织结构图中得到了这些数据,爱丽丝,内德·安德鲁,衣着。这些都是人。

and on the right hand side I have written marketing, accounting, purchasing, and personal. And Pr. Can you suggest me like what should be the column heading here? What should be the attribute? Name that I should have here?
在右手边,我写了营销、会计、采购和个人。你能建议我这里的专栏标题应该是什么吗?属性应该是什么?我应该在这里的名字?

Good

employ and sector. Very good, Hi Covid, right? So let me put that here
就业和部门。很好,嗨,Covid,对吧?所以让我把它放在这里

imply
暗示

perfect.
完善。

And for sector you, said Sector, I'll take that as a department.
对于部门,部门说,我会把它作为一个部门。

and I hope you agree with me?
我希望你同意我的看法?

Right? So why was this exercise required? Why did I come and make these 2 columns put the data and all there, just to tell. Give you this idea that you know this picture that you're looking at of an organization chart can be easily mapped into 2 entities.
右?那么,为什么需要这个练习呢?我为什么来做这 2 列把数据和所有的东西都放在那里,只是为了告诉。给你这个想法,你知道你正在看的这张组织结构图可以很容易地映射到 2 个实体。

What are these entities employing entity? Because Alice, Ned, and Dukla, Claire Todd, Nancy, they are all
这些实体雇用实体是什么?因为爱丽丝、奈德、杜克拉、克莱尔·托德、南希,他们都是

entity entity, types of employing entity right? They are all employees.
实体实体,用人单位的类型,对吗?他们都是员工。

so I can consider them as one entity, which is employee right? And then how about marketing, accounting, purchasing, and personal, and via these are the departments? Okay? So in fact, this picture that you're looking at is representing a relationship between the employees and the the department.
所以我可以把他们看作一个实体,哪个是员工,对吧?然后是营销、会计、采购和个人,通过这些部门呢?好?所以事实上,你看到的这张照片代表了员工和部门之间的关系。

Okay? So now, this will make a lot of sense. What!
好?所以现在,这将很有意义。什么!

Look at this? And look at this!
看看这个?看看这个!

What is there in one, in, in the, in, in the the
在一个,在,在,在

the box that I marked as one it is the Rdm
我标记为一个的框是 Rdm

of the entity departments.
实体部门。

And then we have one for employee.
然后我们为员工准备了一个。

Okay? So let's look at it.
好?因此,让我们来看看它。

The organization chart that we saw in the previous slide has 2 relationship. This is even more interesting. We are getting there. Okay.
我们在上一张幻灯片中看到的组织结构图有 2 种关系。这更有趣。我们正在到达那里。好。

I'll ask you like, which 2 relationships do you see, we'll get to that later.
我会问你,你看到了哪 2 种关系,我们稍后会谈到。

or probably we already have it in the bullets. Right?
或者可能已经在子弹中拥有它。右?

So in these 2 entities, departments and employees, we have 2 relationships. Let's see, what are these?
因此,在这两个实体、部门和员工中,我们有 2 种关系。让我们看看,这些是什么?

A department? Has one or more employees right? Did we check? Did we discuss this example?
一个部门?有一名或多名员工对吗?我们检查了吗?我们讨论过这个例子吗?

1, 2, 90?

Alright. So why is there a one to many relationship between department and employees? Well, because a department will have many employees. Okay, go back here.
好。那么,为什么部门和员工之间存在一对多的关系呢?嗯,因为一个部门会有很多员工。好的,回到这里。

Look at this part.
看看这部分。

Just this box.
就这个盒子。

What is the department name? Marketing?
部门名称是什么?营销?

And how many employees? Marketing has? 3?
有多少员工?营销有吗?3?

What's the next department accounting how many employee it has? 2 purchasing has 2 personal and Pr. Has one. Alright. But if you generalize, then you can see that one department can have multiple employees. But an employee belongs to only one department.
下一个部门会计是多少员工?2 采购有 2 个人和 Pr. 有 1。好。但是如果你一概而论,那么你可以看到一个部门可以有多个员工。但一个员工只属于一个部门。

Alright. So I hope you are fine with this thing. Right? Let me know if you have any question about it.
好。所以我希望你对这件事没问题。右?如果您对此有任何疑问,请告诉我。

One relationship that we have between departments and employees
我们在部门和员工之间建立的一种关系

of one to many time, who year? Where one department can have more, one or more employees. Right? So this first thing is
一对多,谁一年?如果一个部门可以拥有更多员工,则有一个或多个员工。右?所以这第一件事是

one too many.
一个太多了。

So let's see department.
所以让我们看看部门。

Hmm.
嗯。

okay, we'll we'll get to that later. Right? Let's look at the second point, and that would go as a question to you.
好的,我们稍后再谈。右?让我们看看第二点,这将是一个问题。

So first thing which we should be comfortable with is one to many relationship between
因此,我们应该感到满意的第一件事是一对多之间的关系

the department and employee where a department will have
部门将拥有的部门和员工

multiple employees.
多名员工。

Now, second is that each department has only one department head. Right? So now tell me, what is the multiplicity?
其次,每个部门只有一个部门负责人。右?所以现在告诉我,什么是多重性?

Multiplicity? Right? If you, if you understood a multiplicity concept be, please see
多样性?右?如果你,如果你理解一个多重性的概念,请看

what is the multiplicity of this relationship which says, each department has only one department head
这种关系的多重性是什么,它说,每个部门只有一个部门负责人

for the first bullet. When we are saying that a department has one or more employees. I told you it is one too many.
对于第一颗子弹。当我们说一个部门有一个或多个员工时。我告诉过你,这太多了。

right? But what do you think about the second relationship that we have
右?但是你如何看待我们的第二种关系

between the department and employee where we are saying that
在部门和员工之间,我们说

each department has one department head
每个部门有一名部门主管

and who's a department head department head is A
谁是部门负责人 部门负责人是 A

is an employee.
是员工。

You understand this point?
你明白这一点吗?

Let me take you back
让我带你回去

for marketing. Probably Ned is the head
用于营销。可能内德是头

for accounting. Todd is head for purchasing prior
用于会计。Todd 是之前的采购负责人

for personal Sophie, who are these people? These are employees. Right? Is that thing making sense?
对于个人苏菲来说,这些人是谁?这些是员工。右?这话说得通吗?

If that's the case, then tell me about the multiplicity of the second relationship.
如果是这样的话,那么请告诉我第二种关系的多重性。

Each department has only one department head.
每个部门只有一个部门负责人。

Is it one too many, many, too many, or something else?
是太多,太多,太多,还是别的什么?

It is one to one right? That's what I'm trying to explain.
这是一对一的,对吧?这就是我要解释的。

Let's see. Yes, I have an answer.
我看看。是的,我有一个答案。

Very good, Alfred. Yeah, you got it right. It is, in fact, one to one. Why, let me explain that thing to you again.
很好,阿尔弗雷德。是的,你做对了。事实上,这是一对一的。为什么,让我再给你解释一遍。

A department can have only one department head.
一个部门只能有一个部门主管。

Okay? And a person who's working as a department head in say, marketing cannot be the department head of accounting as well. Right? So this is one to one relationship. You must remember this example. If I ask in the in the exam right? Or you can have similar. But yes.
好?一个在营销部门担任部门主管的人也不能同时担任会计部门主管。右?所以这是一对一的关系。你必须记住这个例子。如果我在考试中问,对吗?或者你可以有类似的。但是是的。

one thing to remember is that this is 1, 2, one.
要记住的一件事是,这是 1、2、1。

Okay.
好。

Now here.
现在在这里。

if I connect. Let me use my pen. If I connect
如果我连接。让我用我的笔。如果我连接

this field with the Id field, then yeah, this is 1, 2, 1, 2, one.
这个字段有 Id 字段,那么是的,这是 1、2、1、2、1。

okay. And I'll
好。我会的

put this kind of.
把这种。

you know connections one and only one, if you remember.
如果你还记得的话,你知道一个也只有一个联系。

You know one and one, only 1, one and only 1, 2 ones. If you put, that means one and only one
你知道一个和一个,只有1,一个,只有1个,只有2个。如果你放,那就意味着一个且只有一个

good. Now let's look at the other relationship, which is the first one. Do we have that relationship?
好。现在让我们看看另一个关系,这是第一个关系。我们有这种关系吗?

Let's see department id here
让我们在这里查看部门 ID

within the this id flow.
在此 ID 流中。

Okay, so a department will have multiple
好的,所以一个部门会有多个

employees. Right? So here
员工。右?所以在这里

you'll have this kind of structure
你会有这样的结构

1, 2, 3.

This is one too many.
这太多了。

So the message is that in this picture that you're looking at, we have 2 relationships, right? And what are the phone fund keys here.
所以信息是,在你看到的这张照片中,我们有两种关系,对吧?这里的电话基金密钥是什么。

This is a foreign Key
这是外键

department. Id. Is the foreign key, because for every employee employee should have the department information like for me, I'm an employee in Cs department. So my foreign key will have Cse, okay? And similarly, if if a professor is working in electrical engineering, then the department Id. Would be for electrical engineering.
部门。同上。 是外键,因为对于每个员工来说,员工都应该拥有部门信息,就像我一样,我是 Cs 部门的员工。所以我的外键会有 Cse,好吗?同样,如果一位教授从事电气工程工作,那么该系 Id. 将用于电气工程。

and a T for math, right? Something like that.
还有数学的T,对吧?类似的东西。

So, boss, id. Now, this is also foreign key, right? So what does it signify? Well.
所以,老板,同上。现在,这也是外键,对吧?那么它意味着什么呢?井。

I'm being supervised. Right? I am. I work under the department here?
我正在接受监督。右?我是。我在这里的部门工作?

Okay? So in my records you will find the department chairs Id, and that will work as my foreign key.
好?因此,在我的记录中,您会找到系主任 Id,这将用作我的外键。

Okay? So in the employee table, if you look at, then we have 2 foreign keys.
好?所以在员工表中,如果你看一下,那么我们有 2 个外键。

The first foreign key, which is department Id is for one to many relationship that we have here
第一个外键,即部门 ID,用于我们在这里拥有的一对多关系

between the department and employee and the second foreign key, which is for an id as sorry boss Id is for the relationship, which is one to one.
在部门和员工之间,第二个外键用于 ID,对不起,老板 ID 用于关系,这是一对一的。

Okay. And this one to one relationship is between
好。而这种一对一的关系是

employee and itself. Right? That's an interesting recursive relationship.
员工和自己。右?这是一个有趣的递归关系。

Wait a second.
等一下。

This is getting interesting.
这越来越有趣了。

I explained to you. Recursive. We'll get to recursive later. But the one to one relationship that I was explaining is over here.
我向你解释过。递归的。我们稍后会讨论递归。但是我所解释的一对一关系到此为止。

Department head
部门主管

department head. Add
部门主管。加

the employee. Id right? That is also one to one.
员工。对吗?这也是一对一的。

So in fact, there are 3 relationships in this picture.
所以实际上,这张图中有 3 种关系。

Okay, these 2. What department has more than one? One or more than one employee. It is one too many.
好的,这 2.哪个部门有不止一个?一名或多名员工。它太多了。

Each department has one department had this thing
每个部门都有一个部门有这个东西

right. This thing department head id with the id of the employee that is, one to one and the other one, that by accident I explained to you right, which is between the employee and itself.
右。这个东西部门负责人id与员工的id,即一对一和另一个,我无意中向你解释对了,这是员工和自己之间的。

like Boss Id, who is the boss? Id the boss id corresponds to id of another employee. So employee supervising another. That's an interesting relationship which is called recursive, which in this case is 1, 2, one
像Boss Id,谁是Boss?id 老板 ID 对应于其他员工的 ID。所以员工监督另一个人。这是一个有趣的关系,称为递归关系,在本例中为 1、2、1

question.
问题。

So you know this this topic. We are only on the second slide. Here is an extremely interesting but simple at the same time simple, but slightly tricky and interesting.
所以你知道这个话题。我们只是在第二张幻灯片上。这是一个非常有趣但又简单又简单,但略显棘手和有趣的。

Okay, now, question arises fine. We did understand that
好的,现在,问题出现了。我们确实明白这一点

between the the employee
员工之间

and the department entity, we do have one to one relationship.
和部门实体,我们确实有一对一的关系。

Now question arises, how will we implement this one to one relationship.
现在问题来了,我们将如何实现这种一对一的关系。

because we have seen 2 implementation, one too many and many too many for one too many. What we did in the many side we put a foreign key
因为我们已经看到了 2 个实现,一个太多了,一个太多了。我们在许多方面做了什么,我们放了一个外键

in case of many to many. What we did, we created one more entity, which we call as associative entity between the 2 entities. Right? Like, we have many to many relationship between items
在多对多的情况下。我们所做的是,我们又创建了一个实体,我们称之为两个实体之间的关联实体。右?就像,我们在项目之间有很多对许多的关系

and sales. So we had. We required another entity, which was line items.
和销售。所以我们有。我们需要另一个实体,即订单项。

Okay? So for many, too many. We needed another entity. Associative entity.
好?所以对很多人来说,太多了。我们需要另一个实体。关联实体。

Now question arises, what would we do with one to one relationship?
现在问题来了,我们将如何处理一对一的关系?

Okay, so let's see.
好的,让我们看看。

What are we discussing here
我们在这里讨论什么

what you usual rules apply. Right? So the message is that you know, for every relationship, whether it is one too many, too many, or even one to one we would need foreign key.
您通常的规则适用。右?所以信息是,你知道,对于每一种关系,无论是太多、太多,甚至是一对一,我们都需要外键。

Okay, so often, I ask this question in exam, a true and false kind of question. Right? So let me put this here
好吧,我经常在考试中问这个问题,一个真假的问题。右?所以让我把这个放在这里

question.
问题。

far.
远。

a relationship
一段关系

ship implementation
船舶实施

implementation
实现

in

Rdpms relational database management system.
Rdpms 关系数据库管理系统。

We must
我们必须

have

primary key
主键

E,

foreign key
外键

key

beer.
啤酒。

Alright. Then I'll say, Okay, A is true
好。然后我会说,好吧,A是真的

and B is false.
B 是假的。

What do you think is the correct answer? True or false.
你认为正确答案是什么?对或错。

the statement goes like for a relationship implementation in RDBM. S. Relation, database menu system. We must have primary key for and key peer, what do you think is this? Is the statement, true or false.
该语句类似于 RDBM 中的关系实现。S. 关系,数据库菜单系统。我们必须有主键和密钥对等方,你认为这是什么?是陈述,是真是假。

Come on.
加油。

make a guess.
猜一猜。

Alfred says true. Any other, any other student who wants to attend
阿尔弗雷德说的是真的。任何其他,任何其他想参加的学生

2 and yeah, one more.
2 是的,还有一个。

Alright. So I'm happy with 2. Okay, if no one else wants to answer, well, the answer is, yes, that's correct, right? It is true.
好。所以我对 2 很满意。好吧,如果没有其他人想回答,那么,答案是,是的,没错,对吧?这是真的。

and say is true. Wait a second. Let's sorry about that.
说是真的。等一下。让我们对此感到抱歉。

There's my pen. Okay, yeah, true, is the correct answer.
这是我的笔。好的,是的,没错,是正确的答案。

Okay, good. So
好的,好的。所以

for our relationship, whether it is one to many, many to many, or one to one. We do need foreign key and primary Cape pair. Alright. Now the question is okay. Fine in the situation that we have.
对于我们的关系,无论是一对多,多对多,还是一对一。我们确实需要外键和主 Cape 对。好。现在问题没问题了。在我们的情况下很好。

What is the situation? We have one to one relationship between the departments and employee. What is the relationship? Well, every department has one department head.
这是什么情况?我们在部门和员工之间建立了一对一的关系。这有什么关系?嗯,每个部门都有一个部门负责人。

one and only one department head and an employee can work as a department head in only in one department.
一个且只有一个部门主管和一个员工只能在一个部门担任部门主管。

So that is one to one. Now, question is, where should we put the foreign key
所以这是一对一的。现在,问题是,我们应该把外键放在哪里

in one to many kind of relationship? We put the foreign key in the many side, right for nations and shares. We put the foreign key in the shares table.
在一对多的关系中?我们把外键放在很多方面,对国家和股票都是正确的。我们将外键放在 shares 表中。

Now, here the question is, it is one to one. Where should we put? Should we put this in the department? Or should we put in the employee? Or should we put in both the tables? Right? So that is a kind of open question for the time being, and we will
现在,问题是,它是一对一的。我们应该放在哪里?我们应该把它放在部门里吗?还是我们应该把员工放进去?还是我们应该把两个表格都放进去?右?所以这暂时是一个悬而未决的问题,我们将

have the answer to that as we progress through the next slide. Okay, so let's see what we have here.
在我们继续阅读下一张幻灯片时,请找到答案。好的,让我们看看我们这里有什么。

Alright, so well that that answer will come soon.
好了,答案很快就会到来。

So key, please hold on to that question what we are doing here.
所以关键,请坚持这个问题,我们在这里做什么。

We are looking at the recursive relationship right, which I kind of introduced to you by accident
我们正在研究递归关系,这是我偶然介绍给你们的

in one of the previous slide. So what is recursive relationship? Okay.
在上一张幻灯片中。那么什么是递归关系呢?好。

so let's try to understand this. A recursive thing. Right? I hope you are aware of what recursion is.
因此,让我们试着理解这一点。一个递归的东西。右?我希望您知道什么是递归。

Okay and recursion
好的,递归

you might have learned in math
你可能在数学上学过

and also in programming.
以及编程。

Okay, we have recursive methods or recursive function. These are the functions that call themselves
好的,我们有递归方法或递归函数。这些是调用自己的函数

so anyway, with
所以无论如何,随着

that recursive understanding, let's see what we have recursive of what we have in the recursive relationships.
这种递归理解,让我们看看我们在递归关系中所拥有的递归。

So let's say, for example.
因此,让我们说,例如。

each employee has a boss
每个员工都有一个老板

alright, like, I have a boss in the my department chair in computer Science Department in Stony Brook University is my boss because I'm an employee in computer science department.
好吧,比如,我有一个老板在我的系主任,石溪大学计算机科学系的系主任是我的老板,因为我是计算机科学系的员工。

Now, who is the boss boss? Is also an employee. Okay, so yeah, we have recursive relationship, because here
现在,谁是老板老板?也是一名员工。好的,是的,我们有递归关系,因为这里

there are 2 instances of employ entities involved.
涉及 2 个雇佣实体的实例。

Who's a boss boss boss's outside employee.
谁是老板老板老板的外部员工。

And the boss is supervising an employee. Okay? So an employee is supervising an employee. So that becomes a recursive relationship.
老板正在监督员工。好?因此,员工正在监督员工。因此,这变成了递归关系。

So here each employee has a boss and a boss has many employees. Right? So can you tell me, first of all right, did you understand this thing like, it's a recursive relationship
所以在这里,每个员工都有一个老板,一个老板也有很多员工。右?所以你能告诉我,首先,你是否理解了这个东西,这是一个递归关系

for that. Let me take you here. Okay, so here we have the employee. Entity
为此。让我带你到这里。好的,我们来了员工。实体

employee has the primary key. Let me put a star here. Star means it's a primary key. I will also put Pk for primary key
员工拥有主密钥。让我在这里放一颗星星。星号表示它是主键。我还会把 Pk 作为主键

employee table. Okay, employee has the first name. Employee has a salary employee has a department Id, which is our foreign key
员工表。好的,员工有名字。员工有薪水 员工有部门 ID,这是我们的外键

alright. And then this foreign key is coming from department table
好。然后这个外键来自部门表

department
部门

tables. Id. Field.
表。同上。

Okay, I'm using this as a notation, because this foreign key that you have, which is department Id. We have this attribute borrowed from the department table and in the department table from this Id field, which is the planning key of department. Good.
好的,我用它作为符号,因为你有这个外键,它是部门 ID。我们从部门表和部门表中借用了这个属性,这个 Id 字段是部门的计划键。好。

Now let's look at this thing, boss. Id
现在让我们看看这个东西,老板。同上

what is boss? Id boss id is also a foreign key.
什么是老板?id boss id 也是一个外键。

and this boss, id we are getting from where? From? The employee table itself.
而这个老板,我们从哪里得到的身份证?从?employee 表本身。

Alright. So what I did here, I
好。所以我在这里做了什么,我

want to, you know, kind of ignore this. You know, Loop.
想要,你知道,有点忽略这一点。你知道,循环。

and I want to use this loop. Why? Because it starts from this attribute, boss id.
我想使用这个循环。为什么?因为它是从这个属性开始的,boss id。

Okay, this looks better. The one that I have drawn.
好吧,这看起来更好。我画的那个。

It's not a perfect curve. But yeah, looks good. Looks better because it originates from boss id attribute goes all the way to the employee.
这不是一条完美的曲线。但是,是的,看起来不错。看起来更好,因为它起源于老板 id 属性一直到员工。

Okay, so why do we have this arc starting from employee in ending at employee itself. Because this is recursive.
好吧,那么为什么我们有这个弧线从员工开始,到员工本身结束。因为这是递归的。

recursive, because the source of this relationship is employee and the end of the relationship is employee itself.
递归,因为这种关系的来源是员工,而关系的结束是员工本身。

Okay? So it is different from this one.
好?所以它与这个不同。

See this. Wait a second, you know. I'll have to clean up the clutter that I created here.
看这个。等一下,你知道的。我必须清理我在这里创建的混乱。

Yeah, we have a relationship. We have, in fact, multiple relationship. But let's pay attention to the relationship that is shown in this picture.
是的,我们有关系。事实上,我们有多重关系。但是,让我们注意这张图片中显示的关系。

Okay, so here we have 2 tables. Alright.
好的,这里我们有 2 张桌子。好。

one table department address employee.
一表部门地址员工。

And

yeah.
是的。

this attribute
此属性

department head Id
部门主管 ID

is connected with the Id attribute of the employer. So here we have 2 tables.
与雇主的 Id 属性相关联。所以这里我们有 2 张桌子。

Your relationship
你的关系

starts from say, department, I department table, and you know, connects it to the employee employee table. So 2 tables are involved in this case.
从 department 开始,I 部门表,你知道,将其连接到员工员工表。因此,本例涉及 2 张表。

Okay, usually, I mean, this is what we have seen for one too many for many, too many, and also to one for one to one that you're looking at here there are 2 tables involved.
好吧,通常,我的意思是,这就是我们看到的太多太多了,太多了,还有你在这里看到的一对一,涉及 2 张桌子。

whereas for this kind of relationship that we have, which is a recursive
而对于我们拥有的这种关系,这是一种递归关系

for the boss
对于老板

kind of relationship, right or the supervision kind of relationship. Our source table is employee. Our
一种关系,权利或监督类型的关系。我们的源表是 employee。我们

destination table is employed. So right don't want to use the term source and destination, because there's nothing like that in the databases. But yeah, you know, I'm just trying to communicate to you.
使用目标表。所以对,不想使用术语“源”和“目标”,因为数据库中没有类似的东西。但是,是的,你知道,我只是想和你交流。

Okay.
好。

so how do we show that recursive thing. We show the recursive thing with the help of this kind of
那么我们如何展示递归的东西呢?我们借助这种递归的东西来展示

loop.
圈。

Okay, starting from Boss Id.
好的,从 Boss ID 开始。

ending towards the employee thing.
以员工为终点。

Now, a recursive relationship relates an entity to itself.
现在,递归关系将实体与自身相关联。

Okay?
好?

And okay, we, we label the recursive relationship. Now.
好吧,我们,我们给递归关系贴上标签。现在。

my question to you people is, if you followed this recursive relationship.
我要问你们的问题是,如果你们遵循这种递归关系。

But in the employee table tell me the multiplicity right?
但是在员工表中告诉我多样性,对吧?

Is it one to one?
是一对一的吗?

Many, too many, or one too many?
太多了,太多了,还是一个太多了?

Oh, on, go on!
哦,继续,继续!

What do we have? We just saw the recursive relationship.
我们有什么?我们刚刚看到了递归关系。

the

entity employee? Right?
实体员工?右?

My question to you is that is it one too many, many, too many, or one to one
我要问你的问题是,这是一个太多,太多,太多,还是一对一

one too many, many, too many, or one to one.
一个太多,太多,太多,或一对一。

What is the multiplicity of this relationship?
这种关系的多重性是什么?

Think about it. Right? You can see, like, okay, fine. We have an organization in that organization. There are employees.
想想吧。右?你可以看到,就像,好吧,很好。我们在该组织中有一个组织。有员工。

And then there's one boss and yeah, employees. How many employees are assigned to one boss. Right
然后有一个老板,是的,员工。一个老板分配了多少员工。右

good. I'm happy that somebody responded. Let's see. What's the answer.
好。我很高兴有人回应了。我看看。答案是什么。

Wait a second. I'm trying to find my pen. My sorry cursor.
等一下。我试图找到我的笔。对不起,光标。

one too many perfect answer. Good job, Alfred, this is one too many. How? Yeah, we can. We can go back right? Let me take you back to the the organization chart we had.
一个太多完美的答案。干得好,阿尔弗雷德,这太多了。如何?是的,我们能。我们可以回去吧?让我带你回到我们的组织结构图。

Look at the organization chart here.
请在此处查看组织结构图。

Okay, so, Alice.
好的,爱丽丝。

I'll give it a second.
我会给它一秒钟。

Let's not go to the top. We can look at this only in the marketing department
我们不要去顶部。我们只能在营销部门看到这一点

there are 3 employees, Nat and Cla. Then, you know, Nat, if we consider Nat as the boss, then Nat is.
有 3 名员工,Nat 和 Cla。然后,你知道,纳特,如果我们把纳特看作是老板,那么纳特就是。

you know, supervising 2 other employees. Right? So 1 one boss can supervise multiple employees. Right? Therefore, it is one to many. Very good job.
你知道,监督另外 2 名员工。右?因此,1 一个老板可以监督多个员工。右?因此,它是一对多的。干得好。

Okay, now, fine. Any questions.
好了,好了。有问题吗。

guys, this is very, very important.
伙计们,这非常非常重要。

Let me put some stars here. The understanding of
让我在这里放一些星星。对

a recursive relationship. Okay, fine. So what will we do? Now, let's look at the team. Let's see, how will that organization chart be represented?
递归关系。好的,好吧。那么我们该怎么办呢?现在,让我们看看团队。让我们看看,该组织结构图将如何表示?

So? Well, you are looking at a snapshot which has been obtained from Ms. X's.
所以?好吧,您正在查看从 X 女士那里获得的快照。

Okay, you can easily see that.
好的,你可以很容易地看到这一点。

So here, since the employee table has been, you know, clicked. So you are looking at the employee table, whereas the other 2 tables that you're looking at departments is another table, and this thing is a query, as you can read, it says, for salary. So let's not think about the other tabs you need to focus on only the employee tab.
所以在这里,因为员工表已经被点击了。所以你正在查看员工表,而您正在查看部门的其他 2 个表是另一个表,这个东西是一个查询,正如您可以阅读的那样,它说,薪水。因此,我们不要考虑其他选项卡,您需要只关注员工选项卡。

And let's see, what information do we have in the employee table?
让我们看看,我们在员工表中有哪些信息?

So this id figure that you're looking at is the primary key of what the employee table, then the the other attribute is the first name of the employee. Then we salary of the employee. Then we have department id, which is the foreign key.
因此,您正在查看的这个 id 图是 employee 表的主键,然后另一个属性是 employee 的名字。然后我们给员工发工资。然后我们有部门 ID,它是外键。

and for department id you know, foreign key. We are getting the value from value from
对于您知道的部门 ID,外键。我们从价值中获取价值

department table
部门表

and its Id field.
及其 Id 字段。

Okay?
好?

And then the last column that you're looking at is the boss id attribute. So they will. So this boss id attribute is also a foreign key, and for this foreign key we are getting the value from
然后你看到的最后一列是老板 id 属性。所以他们会的。所以这个 boss id 属性也是一个外键,对于这个外键,我们从中获取值

here.
这里。

The id field of the employee table itself.
employee 表本身的 id 字段。

Good.
好。

Right? So let's see what we have here. The boss id is the parent key to the id, the primary key of the same table.
右?因此,让我们看看我们这里有什么。boss id 是 id 的父键,是同一表的主键。

Right? So that is the reason it is
右?所以这就是它的原因

recursive.
递归的。

This fear is
这种恐惧是

forming our recursive relationship.
形成我们的递归关系。

Okay? So what I'll do, let me stop right here because this is more interesting. And when we meet the next time, then we'll go in more details. We will create these tables, and we'll write some very interesting queries. Okay, if you have any questions, please let me know.
好?所以我要做的,让我在这里停下来,因为这更有趣。当我们下次见面时,我们会更详细地介绍。我们将创建这些表,并编写一些非常有趣的查询。好的,如果您有任何问题,请告诉我。

If not, then I'll see you next time on Thursday.
如果没有,那我下周四再见。

Thank you. And yeah.
谢谢。是的。

have a good one. Bye, bye.
有一个好的。再见。