Generative AI = relational databases

tables of information

 

Imagine you have a database with two tables of information: customer information and account information. The one piece of data that both tables share is account ID. With relational database software, you can use it to tie the two tables together. So if a customer comes to you and asks for their current balance, you can ask them for their account ID and some other personal info. Then you can query that database with the account ID and verify who they are because you can see their customer information and then once you validate them you can also see their account information and you can get the computer to print out their balance. The database, in this case a relational database, relates the two source of information (customer info and account info) and lets you retrieve that information.

Now the nice thing about relational databases is you can further relate that information to other sources of information. If you have a table of products you want to promote to customers depending on their net worth, you can query the database for the accounts that meet the product criteria and then pull up the customer information and mail them the information about their product. You’ve related three different tables of information to do this and pulled it together using a query.

When it comes to generative AI, the prompt you enter is also a query. The gen AI system doesn’t search tables though. Instead it searches a model it has that was build with sources of information it was trained on. If it was trained on Wikipedia, then all those pages of Wikipedia are not unlike tables being queried. The difference is the gen AI system uses its algorithm to determine how all that Wikipedia knowledge relates to your query before it gives you a result. But in many ways you are querying the gen AI systems just like you might query a relational database.

Of course generative AI has much more power than a simple relational database. But in many ways the two things are the same. We need to start looking at it then the same way. we can do many clever things with relational databases but don’t think of them as intelligent. The same should hold for generative AI.

 

Devs! Could your next online database be a spreadsheet?

If the thought of your next online database being a spreadsheet sounds ridiculous, consider this. Yes, I know, there are times when the only thing that will do the job for you is a highly scalable, highly available relational database. Certainly, there are other times when a NoSQL database with millions of records is the only way to go. That aside, there is likely many times when you need to store one table with hundreds of records or less. In that case, consider using an online spreadsheet from someone like Google.

If you write code to store data in a spreadsheet, one of the key advantages is that you and others can then interact with that data via spreadsheet software. You don’t have to run special ETL programs to get that data there. You have all the power you need. Plus the code to interact with something like Google Sheets is much simpler than the code to interact with something like AWS’s DynamoDB. I know…I have done both.

For more on this, check this out:Google Sheets API using Python : Complete 2021 Guide. It could be just the thing you need.

A great little tutorial on MySQL that covers Windows, Mac OS X, and Ubuntu (Linux)…

…can be found at this link:

MySQL Tutorial – How to Install MySQL 5 (on Windows, Mac OS X, Ubuntu) and Get Started with SQL.

Even if you don’t know hardly anything about SQL or databases, you will find this helpful. It covers pretty much everything you need to know to get started, and it’s a great cheat sheet for people who have more experience but need to know a command format or get some other quick guidance.

Recommended.

P.S. It specifies Ubuntu, but if you are using other distros like CentOS you should still find it helpful.