Published 2021-02-13.
Last modified 2021-03-28.
Time to read: 1 minutes.
django
collection.
A complete set of standard entity relationship diagrams
for django-oscar
webapps has at least 161 tables.
This is how I counted them:
$ psql -U postgres -h localhost -d frobshop \ -tc "select count(*) as tables from information_schema.tables where table_type = 'BASE TABLE';" 161
I used Dbeaver to create the following entity relationship diagrams of the django-oscar
schema.
There were too many table to examine in one diagram, so I examined them piecemeal.
Update 2021-03-28: When I first saw the table names I could not understand the naming convention.
After having spent some time looking at the source code and playing with the software,
I now believe that a table name is constructed from a Django app name,
concatenated with the corresponding app model's class name, like this:
{appname}_{classname}
.
If a class field joins to another class, the naming convention becomes:
{appname}_{classname}{join_table_name}
The remainder of this article shows most of the 161 django-oscar
tables.
Some tables are shown more than once in the interest of clarity.
address_country

address_country
table
auth_user

auth_user
table
basket_basket

basket_basket
table
catalogue_product

catalogue_product
table
offer_range

offer_range
table
order_order

order_order
table
partner_partner

partner_partner
table
payment_source

payment_source
table
shipping

shipping
table
voucher_voucher

voucher_voucher
table
wishlists_wishlist

wishlists_wishlist
table