MySQL Forums
Forum List  »  InnoDB

Re: Foreign Keys: Childless rows (NULL values in fk field)
Posted by: Don Ireland
Date: January 10, 2016 04:13PM

The transactions table will have ALL the transactions for ALL the users -- each transaction has a userID field that ties to the users table. That reminds me -- I still need to create the fk for the userID.

Every time ANY user creates a new transaction, the id will automatically increase and won't be available any more. And if the user decides he "didn't mean to create a transaction, it'll be deleted but the id still won't be available any more.

Because of the parent/child relationship, I figured I'd allow for 10 records per transaction (I think it would most certainly be less but I don't want to take any chances). Each user could accumulate a few thousand transactions per year (I'm referring to the parent rows or the childless rows).

IF I were to ever get near the upper limit (of whatever type I use), is it difficult to increase the size? I'm guessing that the main problem would be with DECREASING the size.

Int might be more appropriate.

Don

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Foreign Keys: Childless rows (NULL values in fk field)
807
January 10, 2016 04:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.