Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Differences between getting table information from a relational (SQL) database and DynamoDB

Focus mode
Differences between getting table information from a relational (SQL) database and DynamoDB - Amazon DynamoDB

You can verify that a table has been created according to your specifications. In a relational database, all of the table's schema is shown. Amazon DynamoDB tables are schemaless, so only the primary key attributes are shown.

Getting information about a table with SQL

Most relational database management systems (RDBMS) allow you to describe a table's structure—columns, data types, primary key definition, and so on. There is no standard way to do this in SQL. However, many database systems provide a DESCRIBE command. The following is an example from MySQL.

DESCRIBE Music;

This returns the structure of your table, with all of the column names, data types, and sizes.

+------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+-------+ | Artist | varchar(20) | NO | PRI | NULL | | | SongTitle | varchar(30) | NO | PRI | NULL | | | AlbumTitle | varchar(25) | YES | | NULL | | | Year | int(11) | YES | | NULL | | | Price | float | YES | | NULL | | | Genre | varchar(10) | YES | | NULL | | | Tags | text | YES | | NULL | | +------------+-------------+------+-----+---------+-------+

The primary key for this table consists of Artist and SongTitle.

Getting information about a table in DynamoDB

DynamoDB has a DescribeTable operation, which is similar. The only parameter is the table name.

{ TableName : "Music" }

The reply from DescribeTable looks like the following.

{ "Table": { "AttributeDefinitions": [ { "AttributeName": "Artist", "AttributeType": "S" }, { "AttributeName": "SongTitle", "AttributeType": "S" } ], "TableName": "Music", "KeySchema": [ { "AttributeName": "Artist", "KeyType": "HASH" //Partition key }, { "AttributeName": "SongTitle", "KeyType": "RANGE" //Sort key } ], ...

DescribeTable also returns information about indexes on the table, provisioned throughput settings, an approximate item count, and other metadata.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.