# PropertyDatabase

> Constructs a new instance of a PropertyDatabase.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

## PropertyDatabase(string)

Constructs a new instance of a [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md).

```csharp
public PropertyDatabase(string filePath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path to the backing file.

### Remarks

If **filePath** does not exist, the file will be created automatically. The [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md) will not update the backing file automatically, you will have to trigger the update manually with PropertyDatabase.TriggerBackgroundUpdate. If another [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md) is already opened on the same file, the  [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md) will not be opened and will be invalid. See  [valid](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/valid.md).

## PropertyDatabase(string, bool, double)

Constructs a new instance of a [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md).

```csharp
public PropertyDatabase(string filePath, bool autoFlush, double backgroundUpdateDebounceInSeconds = 5)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Path to the backing file.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Boolean indicating if the backing file will be updated automatically or not.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): Time between changes for the automatic background update to trigger.

### Remarks

If **filePath** does not exist, the file will be created automatically. If **autoBackgroundUpdate** is true, the [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md) will automatically update the backing file after changes have completed. To prevent updating the file too often when there is a lot of changes, you can specify a delay between changes with **backgroundUpdateDebounceInSeconds** before the update can trigger. For example, with the default value of 5 seconds, a background update will only happen after 5 seconds have passed since the last changes to the [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md). If another [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md) is already opened on the same file, the  [PropertyDatabase](/engine/6000.7/script-reference/unityeditor/search/propertydatabase.md) will not be opened and will be invalid. See  [valid](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/valid.md).
