Magento Data Model
Magento web shop.
Set up this platform in Invantive Cloud: https://cloud.invantive.com/magento
The data is partitioned per partition (COMPANY_CODE).
Text comparisons on this platform are case sensitive.
Platform
- Used from: Invantive Cloud and the Invantive products on your own computer or server.
- Kind: an application reached over its API.
- Invantive Cloud plans: Office for Entrepreneurs, Office for Accountants, Premium Finance, OEM.
Figures
| Figure | Count |
|---|---|
| Tables | 31 |
| Columns | 918 |
| Tables with insert | 16 |
| Tables with update | 15 |
| Tables with delete | 14 |
| Tables documented | 30 |
Data Model Poster
This data model declares no keys yet; the dotted relations are derived from column names.
On a table of the poster: plus and minus zoom, the arrow keys move, 0 fits.
The poster as text: tables per topic and their relations
Store
StoreConfigs, StoreGroups, StoreViews, Websites
Country (without relations)
NATIVEPLATFORMSCALARREQUESTS (without relations)
Relations
- StoreConfigs → Websites (candidate): Derived from the column website_id.
- StoreGroups → Websites (candidate): Derived from the column website_id.
- StoreViews → Websites (candidate): Derived from the column website_id.
Tables
Magento.Catalog
- AttributeSets: Attribute Sets
- Categories: Categories
- CategoryAttributes: Category Attributes
- ProductAttributes: Product Attributes
- Products: Products
Magento.Cms
Magento.Customers
- CustomerGroups: Customer Groups
- Customers: Customers
Magento.Inventory
- SourceItems: Source Items
- Sources: Inventory Sources
- StockSourceLinks: Stock Source Links
- Stocks: Inventory Stocks
Magento.Marketing
- Coupons: Coupons
- SalesRules: Cart Price Rules
Magento.Native
- NATIVEPLATFORMSCALARREQUESTS: Native Platform Scalar Requests
Magento.Sales
- Carts: Carts
- CreditMemos: Credit Memos
- Invoices: Invoices
- OrderItems: Order Items
- Orders: Orders
- Shipments: Shipments
- Transactions: Payment Transactions
Magento.Store
- Countries: Countries
- StoreConfigs: Store Configs
- StoreGroups: Store Groups
- StoreViews: Store Views
- Websites: Websites
Magento.Tax
Sample Queries
select itm.sku
, itm.name
, sum(itm.qty_ordered - itm.qty_shipped) qty_to_ship
from Magento.Sales.OrderItems itm
join Magento.Sales.Orders ord
on ord.entity_id = itm.order_id
where ord.state in ('new', 'processing')
group
by itm.sku
, itm.name
select ord.state
, count(*) order_count
, sum(ord.grand_total) order_total
from Magento.Sales.Orders ord
where ord.created_at >= to_char(sysdateutc - 30, 'YYYY-MM-DD')
group
by ord.state
select pdt.sku
, pdt.name
, pdt.price
, pdt.extension_attributes_stock_item_qty stock_quantity
from Magento.Catalog.Products pdt
where pdt.status = 1
and pdt.price > 100
select sim.sku
, sim.source_code
, sim.quantity
from Magento.Inventory.SourceItems sim
where sim.status = 1
and sim.quantity < 5
Attributes
The attributes of this platform are on the page Attributes.