Database Table Creation

When I make a table following the video there is no primary key or anything extra made. I am assuming this won’t matter unless there is a large amount of data. Parts inventory may be few thousand.
When do I need to worry about the size of the data?
Is the size of the table and database thought of all together?

I always use a primary key, even if it just an auto-incremented integer field. Also, be thinking about whether you will be doing table joins. If so, you’ll probably want to create indexes on fields that would be joined on. Primary keys are unique, so if you have part numbers that are unique, that could be your primary key, which will prevent duplicate entries by accident.

With us that are trying to crawl in doing this for the first time it would be nice if Ignition would do that for you when a table is made using the query tools. Even the manual uses a pre made table in the database editor instruction that has a key.
I am thinking easiest way to make a proper table would be to make it in the MS SQL manager.

Yep, I use MariaDB and manage my table structure with HeidiSQL.

Following which video? Which query tools?

There’s lots of ways to interact with databases in Ignition.

The university video:
Creating a Table - SQL Basics (inductiveuniversity.com)
I never found anything in any of the tools relating to making the primary key column. It might be there somewhere but it didn’t jump out at me.
I started with this to get my head wrapped around it: Simple Database Editor - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)
In the end I guess if the use of the primary key in a table is an important thing to use or should use then it should be in your face easy.
Maybe I am overthinking it because I know nothing about the guts of a database. I think that most in my place are looking to be able to keep track of at the most a few thousand items and there info. I first thought that was “big”, but now I think big in this contexts means more like millions and billions.
Again, I just started poking this issue a few days ago.

We have all been there. :laughing:

Ignition is great at connecting to and getting information from DB’s of many different flavors. It’s one of the many attractions of the platform, but it is by no means a Database management system.

You should absolutely get in the habit of setting up tables with proper indexing. Start now and you’ll thank yourself for it later. Inevitably, your “few thousand items” will quickly turn into several thousand rows of data.

There are several posts around the forum that deal with DB architecture. Here is one such:

1 Like

Cool, I will read that when I get a chance. I agree with wanting to start off with good practices as there is always a “later” to deal with it again. In the end the plan is to pass the data up the food chain anyway so I should only have to deal with the mess I make. As such I fully inform those that be of the lack of any warranty with the more than likely chance of having to sacrifice things to the digital god.
If it’s super important they always call the big brains to help.
Thank again.