I have a question about database 'style'.
I need a method of storing user accounts. Some users "own" other user accounts (sub-accounts). However not all user accounts are owned, just some.
Is it best to represent this using a table structure like so...
TABLE accounts (
ID
ownerID -> ID
name
)
...even though there will be some NULL values in the ownerID column for accounts that do not have an owner.
Or would it be stylistically preferable to have two tables, like so.
TABLE accounts (
ID
name
)
TABLE ownedAccounts (
accountID -> accounts(ID)
ownerID -> accounts(ID)
)
Thanks for the advice.