Thursday, December 5, 2024

More Bad Advice, or Bad Actions, in a Startup

When you are working on a startup, there are a lot of things that you have to be careful of.  One of them is thinking forward.  The specific case that I've been seeing a lot of recently is the case of a multi-client saas system.  There is where you have multiple people/companies accessing the same data thru the same database.  It is also called multi-tennant saas.  For some reason, I've started seeing people that built their saas for one customer.  This is a major mistake.  Why?  Because each new customer means that you have to deploy a new database.  Now, 20+ years ago, I was at a place that realized this.  The problem is that you need to put a customer key in a new table of your database, and then import data in such that the data has the customer key along with the previous primary key.  Together, those two should provide you with unique values.

Now, life isn't great.  You still have to have unique values or somewhat to get to everything uniquely.  For the DBAs reading this, I'm talking about unique values, uniquely identifying rows in a database, and many times having primary keys.  What happens with user ids?  You could have customers in a common database that has the same user ids.  You can still overcome this.  I have a membership in a system that has prefix values for the user ids.  For example, I'm in Knoxville, TN.  User ids based in Knoxville, and East Tennessee, have "knx" prefixed values.  It is a saas system that I have to have a membership to based on some work.  It works. 

Think about the future, and go ahead and plan for problems that you will have.  I've handled this problem listed above and handled this before hand.  Handling it afterwards can be painful.

Good luck in startup work!

No comments: