DB files contain mostly decoration and objects that don't interact with the players, such as grass patches. PB files contain normal stage objects. Both files are loaded for all teams. The object lists are the same, so there's no restriction for which objects can be placed in any of the files. There doesn't seem to be any difference in the way each of the files are loaded, so they are most likely separate for organization.
Sea Gate, special stages, team battles, Last story and multiplayer levels have only the DB and PB files.

Object File Layout

The files are made up by two sections: the main section and the misc. section.

The main section starts at offset 0x00 (the beginning of the file) and ends at offset 0x18000. Each entry is 0x30 bytes long, so the files have a maximum of 2048 objects. Each entry defines general information for the object, such as type, position and rotation. Blank entries are ignored.

The misc. section starts at offset 0x18000. Each entry is 0x24 bytes long. The retail files are all 0x21000 bytes long, so they all have a maximum of 1024 misc. entries for the objects. This number can be increased or decreased, however, as the file size can be changed and the game will still load it normally; the number of misc. section entries can even go past the maximum number of main section entries. The misc. section contains object-specific data.

Each entry in the main section may contain an ID which references one entry in the misc. section (very few objects don't).
In the original files there is usually a lot of "junk" in them (huge empty spaces with no data and lots of unreferenced misc. section entries).

Main Section Entries

This array starts at the beginning of the .bin file. Each entry is 0x30 bytes long. This section contains most basic info for the objects.

0x00 for PB/DB0x20 for Sonic0x40 for Dark0x60 for Rose0x80 for Chaotix0xA0 for Super HardIgnored, objects load regardless of this

0x1B

Byte

Usually 09Must be an odd number for object to load

0x1C

4 bytes

Usually 00 00 00 00Ignored?

0x20

8 bytes

Repeats the previous 8 bytesIgnored?

0x28

Byte

Object list

0x29

Byte

Object type

0x2A

Byte

Link ID

0x2B

Byte

Render distance

0x2C

2 bytes

Null?

0x2E

2 bytes

Misc. Entry ID

X, Y and Z positions: location of the object in the world.

X, Y and Z rotations: angle of the object in the world. Each one is a signed 32 bit integer; 0x10000 = 360 degrees.

16 bytes have unknown function. Most of this seems to be ignored, but one value must be an odd number for the object to load.

Object list: this byte sets which list the object will be chosen from.

Object type: this byte sets which object from the list will be loaded.

Link ID: this is used to link two or more objects together, such as switches and doors, triggers, frogs and plants, bingo table and numbers, enemies and cages, warp flowers and more.

Render distance: this multiplier sets from which distance the object starts being rendered. 0 makes the object not load.

Misc. Entry ID: this chooses which misc. entry array will be used by this object. This connection is made solely based on an offset. For example: if this is set to 3, it will use misc. entry number 3, located at offset 0x1806C (0x18000 + 3*0x24). This is set to 0 on some objects: those use misc. entry number 0, which must be left blank.

Retail files have an interesting organization when it comes to the order of the objects in the file: they are ordered by the misc. entry ID, which is set with regards to the offset of the entry in the file. This is actually completely unecessary, as objects can be put in any order. Multiple objects can reference the same misc. entry, which is also not done in retail files.

Misc. Section Entries

This array starts at offset 0x18000 in the .bin file and each entry is 0x24 bytes long. It sets more object specific settings, such as spring strength or item box content.
Entry number 0 is left blank as it's reserved for objects that don't have any misc. settings. So the first relevant entry is entry number 1, at 0x18024.

This entire first long is completely ignored, and used only to aid development, as the entry is picked based on its offset.
The rest of the entry varies from object to object, and can be multiple bytes, words, longs or floats. They're explained in the Object Specific Settings section.

Object Lists

The setidtbl.bin file contains a list of all objects, along with flags setting in which level each one is available (more information in this page). List includes debug name for objects.

List 33

List FF

Unknown list.

F0 - SYSTEM OBJECT1

F1 - SYSTEM OBJECT2

F2 - SYSTEM OBJECT3

FE - SAMPLE2 OBJECT

FF - SAMPLE OBJECT

Object Specific Settings

There is a lot of debug text data in the EXE which explains the misc. settings for most of the game's objects. It was probably used to aid the developers when building the level layouts, and can help us understand what each of them does too. If you search for "OBJECT" as text in the EXE in a hex editor you will find it
These settings are defined in the Misc. Section Entries:00 00 00 0000 00 00 0000 00 00 0000 00 00 0000 00 00 0000 00 00 0000 00 00 0000 00 00 0000 00 00 00