# DatabaseProps

Used as props by: [Database](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.Database.html)

- Source: [`aws-glue/lib/database.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-glue/lib/database.ts#L33)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

TypeScript:

```ts
new glue.Database(this, 'MyDatabase', {
  databaseName: 'my_database',
  description: 'my_database_description',
});
```

Python:

```python
glue.Database(self, "MyDatabase",
    database_name="my_database",
    description="my_database_description"
)
```

Java:

```java
Database.Builder.create(this, "MyDatabase")
        .databaseName("my_database")
        .description("my_database_description")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
new Database(this, "MyDatabase", new DatabaseProps {
    DatabaseName = "my_database",
    Description = "my_database_description"
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
glue.NewDatabase(this, jsii.String("MyDatabase"), &DatabaseProps{
	DatabaseName: jsii.String("my_database"),
	Description: jsii.String("my_database_description"),
})
```

## Properties

- `catalog`: [ICatalog](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.ICatalog.html) — The catalog in which the database will be placed.

  **Default:** The default, account-wide catalog.

- `databaseName`: string — The name of the database.

  **Default:** generated by CDK.

- `description`: string — A description of the database.

  **Default:** no database description

- `locationUri`: string — The location of the database (for example, an HDFS path).

  **Default:** undefined. This field is optional in AWS::Glue::Database DatabaseInput

- `removalPolicy`: [RemovalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.RETAIN — Policy to apply when the database is removed from the stack.

  A database is a container for tables and their metadata, so it is retained
  by default to avoid accidental data loss when it is removed from a stack.
