可以多次使用来自不同用户视图的属性吗?(Can attributes from a different user view be used multiple times?)

编程入门 行业动态 更新时间:2024-10-25 22:34:16
可以多次使用来自不同用户视图的属性吗?(Can attributes from a different user view be used multiple times?)

基本上,我和我的小组必须为3NF以下的用户视图创建标准化,现在所有的用户视图都是针对Seneca College Daycare,总共有5个用户视图,每个用户视图都有许多内容,但主要是用户视图1 -4是关于孩子,父母和工人,userview 5是支付表格。

例如:用户视图1

CHILDREN NAME OHIP# DATE OF BIRTH ALLERGY(S) TYLENOL PERMITTED Kevin 5334447772 Nov 2, 1999 Penicillin, Egg Yes Mary 4333445355 Sept 4, 1997 Egg Yes

我们的3NF归结为(我的伙伴做了什么)

表格[F_ID,校园,标志,日期]

注册[R_ID,L_Name,F_Name,Relation,Apt,PosC,Hphone,Wphone,E_Call,OHIP]

地址[PosC,地址,城市]

FormReg [F_ID,R_ID,日期]

RegOAA [R_ID,OAA_ID,Relation]

OAA [OAA_ID,F_Name,L_Name,HPhone,WPhone]

儿童[OHIP,L_Name,F_Name,Birth,Allergys,Tylenol]

用户视图2

http://i.imgur.com/4yEkqvZ.jpg?1 (太多细节贴在这里所以我上传了prnt scrn)

现在3nf我归结为

3NF ChildDetail [Campus, Child#, ChildName, ChildBday, Allergy] Manager [Manager#, Manager] Supervisor [Supervisor#, Supervisor] Worker [ChildWrkrs#, ChildWrkrs] Family [Fam#, FamPhone#]

但是,我的合作伙伴说我们仍然应该使用他从Userview 1中提出的OHIP主键

他想出了这个

StaffAssign [Campus,Manager_ID,L_Name,F_Name]

房间[RoomNum,RDescrip]

Room_Staff [校园,RoomNum,Staff_ID,OHIP]

员工[Staff_ID,L_Name,F_Name,Occupation]

儿童[OHIP,L_Name,F_Name,Allergie,Birth,F_ID,E_Call]

现在,根据我的理解,如果我的理解是正确的,我们就不能使用用户视图中不存在的属性,对吧? 所以从用户视图1中取出OHIP并将其添加到用户视图2应该不起作用,对吗?

我们一直都在谈论它,不幸的是我们无法联系到我们的教授,所以我希望有人能够在这里提供帮助。

谢谢。

Basically, my group and I have to create a normalization for userviews down to 3NF, now all the userviews are for the Seneca College Daycare, in total there are 5 userviews, and each has to do with a number of things, but mainly userviews 1-4 are about the child, parent, and workers, userview 5 is the payment form.

ex: Userview 1

CHILDREN NAME OHIP# DATE OF BIRTH ALLERGY(S) TYLENOL PERMITTED Kevin 5334447772 Nov 2, 1999 Penicillin, Egg Yes Mary 4333445355 Sept 4, 1997 Egg Yes

our 3NF came down to (what my partner did)

Form [ F_ID, Campus, Sign, DateP]

Register [ R_ID, L_Name, F_Name, Relation, Apt, PosC, Hphone, Wphone, E_Call, OHIP]

Addr [PosC, Address, City]

FormReg [F_ID, R_ID, Date]

RegOAA [R_ID, OAA_ID, Relation]

OAA [OAA_ID, F_Name, L_Name, HPhone, WPhone]

Children [OHIP, L_Name, F_Name, Birth, Allergys, Tylenol]

userview 2

http://i.imgur.com/4yEkqvZ.jpg?1 (too much detail to paste it here so i uploaded prnt scrn)

now the 3nf i came down to is

3NF ChildDetail [Campus, Child#, ChildName, ChildBday, Allergy] Manager [Manager#, Manager] Supervisor [Supervisor#, Supervisor] Worker [ChildWrkrs#, ChildWrkrs] Family [Fam#, FamPhone#]

however, my partner says that we should still be using the OHIP primary key that he came up with from Userview 1

and he came up with this

StaffAssign [Campus, Manager_ID, L_Name, F_Name]

Room [RoomNum, RDescrip]

Room_Staff [Campus ,RoomNum, Staff_ID, OHIP]

Staff [Staff_ID, L_Name, F_Name, Occupation]

Children [OHIP, L_Name, F_Name, Allergie, Birth, F_ID, E_Call]

Now, from my understanding, if my understanding is correct, we cannot use an attribute that does not exist in the userview, right? so taking OHIP from userview 1 and adding it to userview 2 shouldn't work, right?

We've been going back and forth about it, and unfortunately we are unable to reach our professor, so I was hoping someone may be able to help here.

Thank you.

最满意答案

所以我发现只要满足某些条件就有可能。

如果您拥有来自不同用户视图的属性,只要主键相同,它们就可以合并。 这成为累积设计。

这种情况的一个例子如下:

1ST USER VIEW – OLD CUMULATIVE DESIGN Part[Part#, description, unit_price, qty_on_hand] Order_part[Order#, part#, sold_quantity, sold_price] FK order#  order FK part#  part ORDER[order#, ordDate, cust#] FK cust#  customer CUSTOMER[Cust#, cName] NEW CUMULATIVE DESIGN PART[Part#, description, class, price, qty_on_hand] CLASS[Class, class_desc] ORDER_PART[ Part#, order#, quantity, quotedPrice] ORDER[ ord#, ordDate, cust#] CUSTOMER[cust#, cName, street, city, zip, prov, country, balance, creditLimit, rep#] REP [Rep#, rName, com_perct]

正如您在示例中所看到的,PART字段具有相同的数据,但是,在新设计中,您将看到“class”作为添加的标准。 这没关系,因为在另一个用户视图中,Parts表有一个额外的属性定义为'class',主键没有改变,所以所有这一切,我们将旧设计与找到的新信息合并,并创建一种新的累积设计。

因此,只要满足条件,就可以完成“转移/使用”或者更确切地合并从先前用户视图到另一个用户视图的属性(只要它们是相关的,并且主键是相同的)。

编辑此外,只需要做一个注释,即使用户视图中不存在属性,也可以创建自己的属性。

例如,你填写表格,有很多标准可以使用,但表格可以提交到很多地方,每个地点都可以使用,只要你在那里注册,你就可以创建一个属性这将允许您跟踪每个表单,“registration_id”作为示例。

So I found out that it is possible, as long as certain conditions are met.

If you have attributes from different userviews, they can be MERGED as long as the primary keys are the same. This becomes a cumulative design.

an example of such conditions are as follows:

1ST USER VIEW – OLD CUMULATIVE DESIGN Part[Part#, description, unit_price, qty_on_hand] Order_part[Order#, part#, sold_quantity, sold_price] FK order#  order FK part#  part ORDER[order#, ordDate, cust#] FK cust#  customer CUSTOMER[Cust#, cName] NEW CUMULATIVE DESIGN PART[Part#, description, class, price, qty_on_hand] CLASS[Class, class_desc] ORDER_PART[ Part#, order#, quantity, quotedPrice] ORDER[ ord#, ordDate, cust#] CUSTOMER[cust#, cName, street, city, zip, prov, country, balance, creditLimit, rep#] REP [Rep#, rName, com_perct]

as you can see in the example, the PART field, has the same data, however, in the new design you'll see "class" as an added criteria. This is okay, because in an additional userview, the Parts table had an additional attribute defined as 'class', the primary key has not changed, so all that was done, was we merged the old design with the new information found, and created a new cumulative design.

So as long as the conditions are met, "transferring/using" or rather merging, attributes from a previous userview into another userview (as long as they are related, and the primary keys are the same) can be done.

EDIT Also, just to make a note, you are also allowed to create your own attributes even if they do not exist in the Userview.

Example of that would be, you're filling out a form, there are plenty of criteria to use however that form can be submitted to many locations, and each location can be used as long as you have registered there, you can create an attribute that will allow you to track each form, "registration_id" as an example.

更多推荐

本文发布于:2023-08-06 14:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1451312.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视图   属性   用户   attributes   times

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!