The difference is who owns the data files. Managed = Unity Catalog owns storage, lifecycle & optimization (DROP deletes data). External = you own the files (DROP keeps them). Plus the table/column properties that make a table validated and discoverable.
Managed tables let Unity Catalog own storage, optimization, and lifecycle โ dropping one deletes the data. External tables store files at a location you specify โ UC governs access only, and dropping one keeps the files. Managed is the default & recommended.
๐จ Analogy: managed = a hotel room (cleaned & cleared at checkout); external = a rented apartment with your own lock โ the landlord (UC) controls who enters, but your furniture (data) stays when the lease ends.
Compare โ click a type
โธ toggle managed / external
Managed
External
Managed table โ CREATE TABLE x (...), no location.
DROP TABLE x โ โ metadata removed, data files REMAIN
DROP simulator โ see what survives
โธ click "Run DROP" on each
MANAGED table
metadata: present
data files: present
EXTERNAL table
metadata: present
data files: present
1 ยท Creating managed & external tables
The presence of LOCATION (SQL) or .option("path", โฆ) (PySpark) is the only switch between managed and external. UC recovers a dropped managed table for 7 days via UNDROP (privileges & properties restored; PK/FK not).
Managed โ SQL & PySpark
CREATE TABLE main.sales.orders (order_id BIGINT, amount DECIMAL(10,2), order_ts TIMESTAMP);
UNDROP TABLE main.sales.orders; -- recover within the 7-day window
(df.write.format("delta").saveAsTable("main.sales.orders")) # no path โ managed
External โ SQL & PySpark
CREATE TABLE main.sales.orders_ext (order_id BIGINT, amount DECIMAL(10,2))
LOCATION's3://acme-lake/sales/orders/'; -- under a UC external location
2 ยท Why managed wins by default โ Predictive Optimization
On managed UC tables, Databricks automatically identifies and runs OPTIMIZE, VACUUM, and ANALYZE โ no schedules to maintain. It's enabled by default for newer accounts and does not run on external tables, which is the single biggest reason to prefer managed.
๐๏ธ Real-world use case: use managed for everything built inside Databricks; reach for external only when files are shared with other engines/tools or already live in a fixed cloud location you must keep.
COMMENT ON TABLE main.sales.orders IS'Curated order facts (gold).';
ALTER TABLE main.sales.orders SET TAGS ('domain' = 'sales', 'pii' = 'false');
Managed vs external โ the decision
Managed
External
Storage location
UC-managed
You specify (LOCATION)
Lifecycle / optimization
Unity Catalog (Predictive Optimization)
You / external system
DROP deletes data?
Yes โ ๏ธ
No (metadata only)
Governance (access, lineage)
UC
UC
Best for
Default โ most tables
Shared / fixed-location files
Decision rule: default to managed; choose external only when another engine reads the same files or the data must live at a fixed external path.
Uses, edge cases & limitations
Uses: managed = default for new tables; external = shared/fixed-location files; properties (TBLPROPERTIES, constraints, generated/identity columns, comments, tags) = Delta features + column quality + documentation/discovery.
Edge cases: dropping a managed table is destructive (recoverable only via UNDROP within ~7 days; PK/FK not restored). Two external tables on the same path โ overlapping governance. Adding NOT NULL/CHECK validates existing data and fails if rows violate it.
Limitations: external tables miss Predictive Optimization โ you run OPTIMIZE/VACUUM yourself; some newer features assume managed tables; you can't INSERT arbitrary values into a GENERATED ALWAYS identity column.
Common gotchas
โ Dropping a managed table expecting files to survive โ they don't.
โ Defaulting to external "to be safe" โ you lose Predictive Optimization & add ops burden. Prefer managed.
โ Hand-deleting files under an external table โ the metastore still expects them; queries break.
โ Expecting an inline CHECK in CREATE TABLE โ add it with ALTER TABLE ... ADD CONSTRAINT.