Explain the difference between ROW_NUMBER and ROWID in Oracle and when you would use each.
Using PostgreSQL, write a query that demonstrates the logical row sequence produced by ROW_NUMBER(). Explain why Oracle ROWID has no direct PostgreSQL equivalent, and identify the closest PostgreSQL physical tuple identifier.
account_id, entry_id, entry_date, and row_numberentry_id as the tie-breaker| Column | Type | Description |
|---|---|---|
| entry_idPK | INT | Stable primary key for the ledger entry |
| account_id | VARCHAR(20) | Account associated with the entry |
| entry_date | DATE | Business date of the ledger entry |
| entry_type | VARCHAR(30) | Type of ledger activity |
| amount | NUMERIC(12,2) | Signed amount recorded for the entry |
| description | TEXT | Optional entry description |