# Two small problems caused by splitting the database

**URL:** <https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848>\
**Category:** DEVONthink\
**Tags:** feature-request\
**Created:** [October 13, 2020, 10:02am UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848 "2020-10-13T10:02:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fu.nyanderful](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Fu.nyanderful](https://discourse.devontechnologies.com/u/Fu.nyanderful)\
**Post date:** [October 13, 2020, 10:02am UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/1 "2020-10-13T10:02:54Z")

</div>

I’m sorry to disturb you all, just want to ask if these two old problems are still unresolved. So as to ensure stability, I had to split some oversized databases by year. For example, database A,B,C to databases A2019,A2020,B,C.

- The first question is: How to search in multiple database?  
If I want to search in A only, I need to add A2019 and A2020 in the smart group “Search in”, but it seems that there is no way to do so. Although the global smart folder can search items in all databases, it is still not very accurate to me.

- The second question is: How to organize tags with the same name？  
Although the database has been split, the same tag system is used. The method I thought of was to create a global smart folder for each tag with the same name. It just felt a bit cumbersome. I wonder if there is an better way?

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [October 13, 2020, 10:44am UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/2 "2020-10-13T10:44:10Z")

</div>

> [@Fu.nyanderful](#):
>
> The first question is: How to search in multiple database? If I want to search in A only, I need to add A2019 and A2020 in the smart group “Search in”, …

Do you want to search or create a smart group? For searching you could select the desired groups in the sidebar.

> [@](#):
>
> Although the database has been split, the same tag system is used. The method I thought of was to create a global smart folder for each tag with the same name. It just felt a bit cumbersome. I wonder if there is an better way?

The Tags filter (see Tools \> Filter) might be one.

---

<div class="post-metadata">

**Author:** ![Fu.nyanderful](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Fu.nyanderful](https://discourse.devontechnologies.com/u/Fu.nyanderful)\
**Post date:** [October 13, 2020, 11:53am UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/3 "2020-10-13T11:53:29Z")

</div>

> [@cgrunenberg](#):
>
> Do you want to search or create a smart group? For searching you could select the desired groups in the sidebar.

Oh, this is a great way! Thank you!

> [@cgrunenberg](#):
>
> The Tags filter (see Tools \> Filter) might be one.

Maybe I don’t know how to use it. I have many databases that unchecked Exclude group from tag, so there will be many group tags on this window, which is a little messy. 🤪

---

<div class="post-metadata">

**Author:** ![Fu.nyanderful](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Fu.nyanderful](https://discourse.devontechnologies.com/u/Fu.nyanderful)\
**Post date:** [October 13, 2020, 1:04pm UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/4 "2020-10-13T13:04:50Z")

</div>

I saw some people have similar problems in the forum, and some people suggested that tags should be independent elements that do not depend on the database.

> [@This multitude of tags](https://discourse.devontechnologies.com/t/this-multitude-of-tags/52048):
>
> Hello, how do I get rid of the multiple tags? Some tags appear four to five times in my tag list, depending on which databases the corresponding documents are stored in. Can I summarize the tags so that they are only displayed once (and edited or deleted once?)

Currently, this problem can be partially solved by creating a global smart group. I have an immature idea to share with you…

 ![image](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/e/3/e36c4c61ba7f836f17e613b5739f71b937b324b0.png)

I’m a beginner in script, just don’t know if this idea is feasible~

---

<div class="post-metadata">

**Author:** ![pete31](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@pete31](https://discourse.devontechnologies.com/u/pete31)\
**Post date:** [October 13, 2020, 1:24pm UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/5 "2020-10-13T13:24:16Z")

</div>

Take a look at [Script: Create or change smart group(s)](https://discourse.devontechnologies.com/t/script-create-or-change-smart-group-s/56556)

Especially this part (checking if a record at a location exists) could be useful:

> [@Script: Create or change smart group(s)](https://discourse.devontechnologies.com/t/script-create-or-change-smart-group-s/56556/1):
>
> ```auto
> if not (exists record at ("/" & theMetaGroupName & "/" & theSmartGroupName) in theDatabase) then
> set theSubsetsSmartGroup to create record with {type:smart group, search predicates:"kind:smart group", search group:theDatabase, name:theSmartGroupName, exclude from search:true} in theMetaGroup
> else
> set theSubsetsSmartGroup to get record at ("/" & theMetaGroupName & "/" & theSmartGroupName) in theDatabase
> end if
> 
> ```

You’ll have to study the script on your own 🙂

---

<div class="post-metadata">

**Author:** ![Fu.nyanderful](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/f/3bc359/32.png) [@Fu.nyanderful](https://discourse.devontechnologies.com/u/Fu.nyanderful)\
**Post date:** [October 13, 2020, 1:31pm UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/6 "2020-10-13T13:31:36Z")

</div>

Thank you for your reply~ it is very useful to me!! 🌹

---

<div class="post-metadata">

**Author:** ![luix](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/luix/32/14089_2.png) [@luix](https://discourse.devontechnologies.com/u/luix)\
**Post date:** [October 14, 2020, 8:27pm UTC](https://discourse.devontechnologies.com/t/two-small-problems-caused-by-splitting-the-database/58848/7 "2020-10-14T20:27:12Z")

</div>

For me as well!!
