WEBVTT

1
00:00:01.630 --> 00:00:17.930
Theresa Miller: Hello, everyone. Thank you for joining us for this webinar. We really appreciate seeing everybody here. The webinar is being recorded, and we plan on putting it on the Specify Forum to make it available for everyone to watch later. The webinar is Working with Independent and Dependent Tables in Specify

2
00:00:18.100 --> 00:00:19.369
Theresa Miller: Bronwyn is…

3
00:00:19.610 --> 00:00:25.809
Theresa Miller: going to lead us all through this process and give us all the information. So, Bronwyn, I'm just turning it over to you.

4
00:00:28.970 --> 00:00:41.529
Bronwyn: Hi everybody, thank you so much for being here today. I'm Bronwyn. I work with, the support area of Specify, and I'm really excited to get going, so let me get my screenshot, sharing.

5
00:00:56.890 --> 00:00:58.280
Bronwyn: Okay.

6
00:00:58.980 --> 00:01:02.960
Bronwyn: So… Can you see these notes?

7
00:01:03.580 --> 00:01:05.360
Bronwyn: Excuse me.

8
00:01:06.490 --> 00:01:07.260
Theresa Miller: Looks good.

9
00:01:07.620 --> 00:01:16.420
Bronwyn: For today's, session, we're going to be covering, I guess we've advanced a bit far, working with table dependents, or independent and Dependent Tables in Specify.

10
00:01:16.940 --> 00:01:29.869
Bronwyn: And the objectives, we were aiming to understand table relationships and their significance, to get to know how to identify Tables dependence, whether or not it is independent or dependent.

11
00:01:30.010 --> 00:01:39.380
Bronwyn: To upload with confidence your related records in the workbench, and also to know when and how you can delete records in bulk and batch edit.

12
00:01:40.830 --> 00:01:47.110
Bronwyn: So to get a bit of a foundation started with this, I wanted to kind of cover that

13
00:01:47.290 --> 00:01:59.839
Bronwyn: The Specify Data Model course is a really complex network of your table relationships, where each table has its own set of fields and relationships that can range from

14
00:01:59.910 --> 00:02:13.600
Bronwyn: really as few as 0 for some higher level system tables, but usually around 3 to 37 for the tables that you mostly interact with. The collection object table is kind of this home base of a database for

15
00:02:13.610 --> 00:02:21.690
Bronwyn: the vast majority of our collection, or the collections in Specify, and 6 of those are going to be shown to the right here.

16
00:02:22.240 --> 00:02:27.589
Bronwyn: which I will identify… With that, so we can see that…

17
00:02:28.000 --> 00:02:40.269
Bronwyn: These other non-highlighted tables are going to be actually nested, or nested relationships, and they're not directly on the collection object table, and do not count towards that 37 number.

18
00:02:42.100 --> 00:02:48.430
Bronwyn: So, to be a little bit, but introduction further, we…

19
00:02:48.450 --> 00:02:56.389
Bronwyn: You can see here that a table relationship is going to be referring to a pair of tables, or two tables, and when

20
00:02:56.390 --> 00:03:11.529
Bronwyn: they are linked together within that data model. They have a cardinality, or a type, which can be a one-to-one, or many-to-one, or one-to-many, and also the dependence, whether or not it is dependent or independent.

21
00:03:12.080 --> 00:03:23.690
Bronwyn: In this diagram, you can see a similar sort of collection object-based table and a few of these relationships, five of them, to be exact. And then off to the right, we have some more nested relationships again.

22
00:03:24.260 --> 00:03:37.639
Bronwyn: And in Specify, those kind of translate in schemaConfig, for example, under that relationships list of the fields. And this could also be done, or, you know, they're also…

23
00:03:38.330 --> 00:03:46.570
Bronwyn: visible from the Query Builder's field mapper, but SchemaConfig has a good interface for that. We'll cover more on that

24
00:03:46.960 --> 00:03:57.359
Bronwyn: the field map burn a bit. So, the table relationship cardinality on the left side says here we can, again, it's going to be determining whether or not

25
00:03:57.750 --> 00:04:03.800
Bronwyn: Or how many records can be added to each of the tables in the relationship pair.

26
00:04:03.870 --> 00:04:18.270
Bronwyn: And with dependents, again, you can consider that in a child and parent relationship as well, whether or not one of those, the child, can exist without, or one of the records can exist without the other, and whether or not it is a parent or a child.

27
00:04:23.760 --> 00:04:31.059
Bronwyn: So, now that we have that information covered, we can look here, and we can kind of actually identify those five relationships that I pointed out earlier.

28
00:04:31.240 --> 00:04:55.880
Bronwyn: Cataloger and collecting event are both independent, many to one, meaning that there can be multiple collection objects pointing towards a single cataloging agent or a single shared collecting event, specifically shared. With the attributes, that's going to be a dependent to one-to-one, only one attribute to collection object. The attribute in that case would be the child, or a dependent, and the collection object is independent.

29
00:04:56.700 --> 00:05:09.659
Bronwyn: For determination and preparation, those are both also dependent, but they're one-to-many, which, you know, if you've been in a collection object form, that makes sense, because you can always add your determination history, or more than one preparation.

30
00:05:10.530 --> 00:05:29.509
Bronwyn: A little bit further on cardinality here, with some more examples, we have one-to-ones, so we already covered collection object attribute, as well as preparation attributes. Another case would be when your collecting event is embedded, or paleocontexts are embedded into the base record.

31
00:05:30.430 --> 00:05:41.929
Bronwyn: For one-to-minis, again, we have preparations and determinations on the collecting event, as well as the collector's table in relation to the collecting event table for collecting information.

32
00:05:49.750 --> 00:06:06.889
Bronwyn: And for the… this kind of just shows that it is with very context-dependent, this many-to-one and one-to-many distinction exactly. So if you were to flip those arrows, it then becomes many-to-one, where they have many preparations or collectors onto one collecting event.

33
00:06:07.900 --> 00:06:13.889
Bronwyn: For many to one, there are collection objects with accessions.

34
00:06:14.080 --> 00:06:25.990
Bronwyn: Locality and geography, where there are many localities that point to a single geography record, one collection object to have many agents, and one collecting event

35
00:06:27.250 --> 00:06:28.200
Bronwyn: Or, sorry.

36
00:06:29.880 --> 00:06:35.029
Bronwyn: Wait, sorry, one, collection object to many catalogers.

37
00:06:35.690 --> 00:06:36.600
Bronwyn: I'm…

38
00:06:37.770 --> 00:06:47.819
Bronwyn: inverse thought. I think I've been messing around with too many mini-to-one-to-minis with the arrow switching. I'm gonna restart a second. So we have…

39
00:06:48.010 --> 00:07:00.780
Bronwyn: multiple collection objects can be added into one accession, and multiple localities pointing to one geography. Similarly, multiple collecting events, and on your localities and multiple

40
00:07:01.550 --> 00:07:04.820
Bronwyn: Collection objects can point to a single cataloger.

41
00:07:10.030 --> 00:07:18.539
Bronwyn: With Dependents, another little definition page. Again, a bit of a visual on…

42
00:07:19.210 --> 00:07:23.860
Bronwyn: The preparation and citation and determinations, how they are linked to

43
00:07:24.380 --> 00:07:27.870
Bronwyn: Collection object, and it's a dependent relationship.

44
00:07:28.660 --> 00:07:33.570
Bronwyn: Similarly, we have the Independent Relationships again, and that is… when a…

45
00:07:33.690 --> 00:07:41.410
Bronwyn: relationship can exist on its own when it is independent. Independent records can only be deleted from the forms, which is a

46
00:07:43.050 --> 00:07:45.489
Bronwyn: Topic that we'll get more on later.

47
00:07:45.670 --> 00:07:54.780
Bronwyn: Now, if we were wondering, go back to the original or previous one-to-many slide, which of these are independent or dependent.

48
00:07:55.210 --> 00:08:06.360
Bronwyn: Can see here, in the solid circles, those would be the independent table in the relationship, whereas the dashed outlines are going to be your dependent relationships.

49
00:08:07.860 --> 00:08:13.790
Bronwyn: Now, once again, though, with the mini-to-one case, you can see that in… with these examples.

50
00:08:14.070 --> 00:08:23.620
Bronwyn: And all of the solid circles, these are all independent tables, and they can each be deleted without affecting the other in the relationship.

51
00:08:27.390 --> 00:08:35.840
Bronwyn: From within your… Specify instance. You can view the relationships of any table

52
00:08:36.179 --> 00:08:43.469
Bronwyn: by going to the URL that's shown on the screen, or opening user tools and selecting database schema.

53
00:08:47.040 --> 00:08:58.300
Bronwyn: If you were to select Collection Object or another table from that left list, then it will take you to the list of fields with several columns describing each field, and

54
00:08:58.300 --> 00:09:07.069
Bronwyn: Below the fields are a relationship section that can actually be sorted by Dependent or independent, as well as…

55
00:09:07.430 --> 00:09:09.629
Bronwyn: Each column could be…

56
00:09:10.120 --> 00:09:15.829
Bronwyn: Sorted as well, if you wanted to sort, you know, one to minis at the top, or mini to one.

57
00:09:19.270 --> 00:09:31.160
Bronwyn: In schema configuration, again, you can see those relationships below the fields that we saw earlier, and to the right of that, we can actually see this type field that shows the cardinality of that relationship that is selected.

58
00:09:34.730 --> 00:09:42.749
Bronwyn: In the Query Builder, you are going to be seeing the unhidden relationships below all the fields in the field mapper.

59
00:09:43.150 --> 00:09:59.270
Bronwyn: by default. However, if you collect or select the reveal hidden form fields, then you will be able to see all of your hidden relationships and hidden fields, and those would be fields and relationships that are hidden in schema configuration.

60
00:10:04.500 --> 00:10:19.890
Bronwyn: Now, in the Query Builder, you can also interpret your cardinality by looking and paying attention to whether or not you can add a table as formatted or as aggregated. With a formatted

61
00:10:20.280 --> 00:10:30.089
Bronwyn: fields added that would represent the table as a 2-1 relationship, a 2-1-related table, and when it is aggregated, that

62
00:10:30.480 --> 00:10:33.570
Bronwyn: Indicates that it is a too-many related table.

63
00:10:35.140 --> 00:10:44.099
Bronwyn: On the forms, you can see query combo boxes regularly, and those will always be representative of a independent two-one relationship.

64
00:10:46.190 --> 00:10:57.480
Bronwyn: For a subform, as you see above here, the sub form on the full form, or when added as a button, you can distinguish a dependent

65
00:10:58.180 --> 00:11:10.280
Bronwyn: too many relationship from the others by paying attention to the add and delete options, as well as the ability to paginate or navigate through

66
00:11:10.540 --> 00:11:12.340
Bronwyn: additional records.

67
00:11:14.210 --> 00:11:20.689
Bronwyn: With Independent sub use, those are distinguished by having the ability to search for existing records and add those.

68
00:11:25.080 --> 00:11:43.730
Bronwyn: And back to deleting from the forms, that I mentioned earlier. With Dependent records, those have the little red, by default, minus button, or delete button, and then the trash can icon included, and grid-type subviews. And that would be how you delete those Dependent records from the main record.

69
00:11:44.680 --> 00:11:57.799
Bronwyn: In the case of independent subuse on a main record, and Independent Records as a whole, those all have the delete and related records buttons that are located in the bottom left corner of the form.

70
00:12:02.090 --> 00:12:07.380
Bronwyn: I'm getting more into the bulk actions with independent and dependent relationships.

71
00:12:07.380 --> 00:12:25.079
Bronwyn: For Dependent relationships in the workbench, you're able to match or add your dependent records to a independent base table that it's related to. For example, you can add newly created preparations to an existing collection object, or newly

72
00:12:25.080 --> 00:12:30.989
Bronwyn: Determine newly found or, you know, recorded determinations to an existing collection object as well.

73
00:12:31.450 --> 00:12:35.849
Bronwyn: And in batch edit, you can also delete your dependent records in bulk.

74
00:12:36.410 --> 00:12:45.859
Bronwyn: Such as deleting your determiner records, or a determination as a whole… a determiner from a determination, or a determination from a collection object.

75
00:12:47.400 --> 00:12:59.600
Bronwyn: And again, in batch edit, you can see for Dependent Relations, this is the possibilities for your actions. They can be updated, created, or deleted, and that would

76
00:12:59.800 --> 00:13:05.759
Bronwyn: Apply to things, again, like preparations on collection object or collection object attribute.

77
00:13:09.630 --> 00:13:12.380
Bronwyn: Back to independent relationships.

78
00:13:12.620 --> 00:13:15.280
Bronwyn: When using the workbench, you can…

79
00:13:15.490 --> 00:13:24.029
Bronwyn: create or match… or create new or match to existing independently related records, such as creating a new…

80
00:13:24.370 --> 00:13:45.240
Bronwyn: locality for collecting, collecting information record, and in batch edit, you can update the links to independent records, so just changing the locality or adding a locality to an existing record that didn't have one before, which is not something you're able to do in the workbench. And again, there's no bulk deletion for independent relationships. Those are only deleted from the forms.

81
00:13:47.050 --> 00:13:53.870
Bronwyn: For a many-to-one independent relationship, You were able to unlink existing

82
00:13:54.270 --> 00:14:00.229
Bronwyn: related records by clearing all the fields in the Batch Edit Data Editor.

83
00:14:01.120 --> 00:14:06.449
Bronwyn: And for one-to-many independent relationships, you're not able to delete or unlink.

84
00:14:09.740 --> 00:14:28.000
Bronwyn: For too many relationships in the workbench interface, you'll notice a unique serializing, or kind of numbering map… mapper box that appears in the interface when selecting a too-many table, and that is to represent your

85
00:14:28.720 --> 00:14:33.920
Bronwyn: Too many related, records, and each of those.

86
00:14:36.170 --> 00:14:54.250
Bronwyn: And as such, you would want to structure your datasets to, go along with that serialized system or setup. And shown here below, you can see you would do that by maybe having separate prep types.

87
00:14:54.870 --> 00:15:00.719
Bronwyn: with… You have the same… Set of columns.

88
00:15:01.070 --> 00:15:04.150
Bronwyn: Numbered to represent each preparation.

89
00:15:06.210 --> 00:15:12.360
Bronwyn: And a bit of a summary on those. We have the workbench abilities and the limitations. You can

90
00:15:12.530 --> 00:15:26.140
Bronwyn: not upload too many independent records through the workbench, or update links to related records. And with batch edit, you are able to do that batch deleting or bulk delete for

91
00:15:26.150 --> 00:15:35.840
Bronwyn: Dependent records, as well as unlink Dependent records. However, you're not able to delete and unlink Dependent records in one

92
00:15:36.710 --> 00:15:39.980
Bronwyn: At once, and you cannot delete independent records.

93
00:15:42.540 --> 00:15:49.660
Bronwyn: For some case studies or example scenarios of this, we have 3 coming up.

94
00:15:50.750 --> 00:16:08.729
Bronwyn: For a blank determination scenario, the action you… someone might take to achieve this would be to upload your determinations with yes or no in every row of the current columns, meaning there are no blank cells in that current

95
00:16:08.730 --> 00:16:17.989
Bronwyn: Checkbox field column, and that… Is regardless of whether or not the other

96
00:16:18.320 --> 00:16:26.369
Bronwyn: Determination columns, or more determination data is being uploaded to the determination represented by that row.

97
00:16:30.140 --> 00:16:38.330
Bronwyn: And the outcome of that would be having a seemingly blank determination record, Represented on the forms.

98
00:16:38.740 --> 00:16:43.810
Bronwyn: But you can see in the query result view above that form, that

99
00:16:43.810 --> 00:17:01.069
Bronwyn: there is a no value in the query result, and that is because checkbox fields have three field states. They can be true, false, or empty, so putting a no indicates to the system that there is a field value to

100
00:17:01.640 --> 00:17:05.780
Bronwyn: Accept and upload, and thus a record needs to be created.

101
00:17:07.790 --> 00:17:21.279
Bronwyn: To resolve this situation, you will want to delete your blank determinations in batch edit. There's a few steps of how we do this. Basically, you're just going to create your record set, map the fields, columns that you need to.

102
00:17:21.569 --> 00:17:25.930
Bronwyn: Filter through that record set, and then you can…

103
00:17:26.670 --> 00:17:32.469
Bronwyn: Simply clear the current column, and validate, and then commit those changes to delete.

104
00:17:32.840 --> 00:17:42.299
Bronwyn: The best practice to avoid this is to only put false or no in cells for the current column is when there are

105
00:17:44.570 --> 00:17:52.729
Bronwyn: Other data values or fields that include information for The same, determination.

106
00:17:54.730 --> 00:18:10.969
Bronwyn: For a determiner or determiner's mix-up, this might be achieved by uploading to the too many determiners relationship. However, the forms only include the 2-1 determiner, and that's what you've uploaded before.

107
00:18:12.130 --> 00:18:19.900
Bronwyn: So, in the screenshot, you can see we have some identified by or determiner columns in the 99 determiner records.

108
00:18:21.380 --> 00:18:35.729
Bronwyn: However, the outcome of that, since we mapped to the wrong relationship, is that we have both the form or, you know, query on the new records you've just made, and it appears blank, like the data has not been uploaded.

109
00:18:38.040 --> 00:18:50.370
Bronwyn: So, to resolve that, we would want to use BatchEdit again and transfer the data from the determiner columns to the determiner's columns. Again.

110
00:18:50.490 --> 00:18:55.660
Bronwyn: We would want to… Make a record set,

111
00:18:55.930 --> 00:19:02.489
Bronwyn: On… of your determination records, and then query from that record set to…

112
00:19:02.820 --> 00:19:17.119
Bronwyn: and add your determiners, fields, determiner fields, and then I also said to include your catalog number, just as a frame of reference for the actions you're about to do, and then you can commit that.

113
00:19:18.210 --> 00:19:20.990
Bronwyn: And to avoid this, you would want to

114
00:19:21.370 --> 00:19:38.969
Bronwyn: Always ensure that the unhidden fields and unhidden relationships in your database are accurate in schema configuration, and keep maintaining your schema configuration should anything change, with your workflows or how you store your data.

115
00:19:40.500 --> 00:19:43.340
Bronwyn: For an accidental agent duplication.

116
00:19:44.570 --> 00:20:01.790
Bronwyn: This can happen for a number of reasons. Often it's a slight typo or change, an added space or punctuation somewhere in a field that wasn't immediately noticed before uploading.

117
00:20:04.600 --> 00:20:10.089
Bronwyn: There's the period shown, after this middle initial value, or David Edd's.

118
00:20:12.050 --> 00:20:15.770
Bronwyn: And the outcome then would be to have this, you have a duplicate

119
00:20:16.160 --> 00:20:22.710
Bronwyn: The agent record, where the only difference is that period after the middle initial.

120
00:20:24.320 --> 00:20:38.920
Bronwyn: And you can resolve this by simply merging those duplicate… or merging the agents, merging the duplicate in with your existing record by querying on the agent table for the agent name that is

121
00:20:39.090 --> 00:20:41.480
Bronwyn: Applicable, and then merging them.

122
00:20:44.700 --> 00:20:58.030
Bronwyn: Best practices for accidental duplication is to use as few columns as possible when you're uploading, related records using matching, and to… that would reduce

123
00:20:58.030 --> 00:21:07.990
Bronwyn: this scenario, and then also you would want to make sure you're paying attention to the cell highlights and the results columns, in the… I'll go back a bit.

124
00:21:08.130 --> 00:21:11.429
Bronwyn: You can see here that the cells in this,

125
00:21:11.670 --> 00:21:16.600
Bronwyn: Image art, this purpley-blue color, which is the new record highlight.

126
00:21:19.590 --> 00:21:40.520
Bronwyn: And if there aren't gonna be… if you know for certain that there aren't gonna be any new records created for a certain table in your dataset, then I always recommend just going ahead and setting this must-match preference in your data mapper for that table, and that will give an error for any not unrecognized record,

127
00:21:40.630 --> 00:21:43.499
Bronwyn: Entries that you have after validating.

128
00:21:45.660 --> 00:21:51.349
Bronwyn: And then some more best practices here for bulk actions is to

129
00:21:52.060 --> 00:22:11.020
Bronwyn: Of course, take a backup of the database, before you're doing any significant actions. These are very powerful tools, and you always want to ensure that you're preserving your data, and have a fail-safe should anything go awry. With the second

130
00:22:11.320 --> 00:22:21.899
Bronwyn: best practice of creating a record set. This helps to limit your batch edit dataset to only the records that you know for certain that you want to be editing.

131
00:22:22.710 --> 00:22:42.019
Bronwyn: And you can, again, always pay attention to your cell highlights and review the results. We recently made a change to your upload. After you click upload, it will show you the results, so you can't… you can no longer ignore, you can't avoid it. The results are going to be shown to you, but it's still a great idea to look through those, even if…

132
00:22:42.340 --> 00:22:47.050
Bronwyn: You are gonna see it when you click upload anyways, and…

133
00:22:47.160 --> 00:23:05.380
Bronwyn: Lastly, we always want to make sure that you review the changes immediately after, and that way you can maybe catch anything that you've missed, any mistakes, and roll back the data set, since if you make any changes to a record that you've uploaded, that will then

134
00:23:05.380 --> 00:23:10.940
Bronwyn: Prevent rolling back, or… You'll no longer be able to roll back that dataset.

135
00:23:12.230 --> 00:23:15.599
Bronwyn: And that is the end of the slides. I do have…

136
00:23:15.860 --> 00:23:27.639
Bronwyn: the ability to go through those three case scenarios in a moment, but I'm happy to take any immediate questions that anybody has before we get into that.

