How do I setup a Data Base?

That’s a good video and well explained about functionality for library databases – Nice video with Jon Evans! My question is now how to make this possible to setup, is there any quite “simple” instructions available (maybe a short, simple video) how to make it possible (without being a programmer, just being an ordinary mac user since many years back)?

Hi The Swede, this post is moved to a new thread as the Kicon thread is an information thread not a discussion thread.

Setting up such a database requires some programming (like) work, and this depends on the database you use. As mentioned in the KiCon presentation, there are some threads about setting up such a database on this forum, but you have to do some digging to get through it.

Ok thanks, will then wait with this and hopefully someone will come up with a more user friendly solution in the near future :slight_smile:

Here is a helpful blog on how to set up database libraries on macOS.

This is an excellent starting point. The blog describes how to get a simple SQLite database up and running and then how to connect KiCad to this source.

One of the great features of SQL is the ability to create Views - these are virtual tables made through JOINS between existing tables. You can design Views that pulls in parameters and values from subsidiary tables. A correctly configured .kicad_dbl definition can use the data available within the Views to bring in any data available in the database. For instance, I can bring in multiple part parameters as well as stock levels from my PartKeepr database. Views offer the ability to use a database to work as both and a stock and inventory system from which you can directly place components.

Thanks John, though I fall asleep already in the first lines of reading (means it’s way too complex) :slight_smile:

It’s a bit tricky to setup if you don’t know your way around setting up DB’s but I manged to get it going by reading through this (long) thread.

1 Like

Thanks also to you gmc, but this is way to difficult for me, I don’t understand anything of it after just a few lines of reading, then I go back to line 1 again and try again, but on line 2 or 3 I’m lost again, and have to start on line 1 again… I have to wait and hope that maybe someone will make a plugin for this, or why not hope that the KiCad developers makes it a built in part of KiCad. What’s the chance of this?

I found it relatively easy to set up, but I am not new to databases or programming.
@TheSwede How would you expect to use database libraries, what is your expectation?
I believe this feature only makes sense if you either have an existing database someone built for you or if you have the means to come up with a large set of data you could import.

Regarding existing database: I wanted to make a database containing all JLCPCB assembly passives (at least basic parts plus some extra) so you can drag a 10k 0603 basic resistor into the schematic and have all data (including LCSC order number) set up for PCB assembly. I did this for Altium where I find it extremely useful (Altiums database filter is a bit more advanced though), did not get around to port it to KiCad.

If I were JLCPCB, I would do exactly that and provide the database to KiCad users. I am wondering if any manufacturer jumps in here. Würth seemingly wants to make their complete portfolio available to KiCad, which would be much easier if they would provide a database instead of duplicating symbols millions of times.

Maybe we’ll see more of this in the future. Altium has the manufacturer part search, which kind of goes in this direction (more purchasing centric it seems though). Not sure if component manufacturers might be interested in providing similar datasets.

Yea, that’s about it what would be handy, to be used fast and easy through JLC or similars.

I think jlcpcb used to have database they give out. It just that i couldnt decipher the fileformat

They stopped the XLS download a while ago (was too big anyway to be useful anymore).
Now you can download the cached library from here GitHub - yaqwsx/jlcparts: Better parametric search for components available for JLC PCB assembly as sqlite database.
I just wrote a small converter to filter for say 0402 MLCC and export those to another database, which I then use in Altium (where they have a similar interface). Works the same way in KiCad, as I said didn’t get around to it. Pretty simple for resistors/capacitiors in standard footprints. For nonstandard footprints (even transistors in SOT-23 as there are several possible pinouts) it gets more complicated, as one has to handle varying pinouts or footprints.

I hope KiCad part selection improves somehow, in Altium you can for example filter for selected attributes (like basic component, case size 0603 or value 10k). As far as I have seen, this is not possible in KiCad yet so putting all 50000 LCSC chip capacitors in one database will be of little use.

Thanks again Martin, yea I guess all we can do is to wait, an hope, if you’re not a programmer which loves scripts etc etc etc etc etc etc and can manage this well by yourself like a good baker man who knows how to make the bread to taste good… Btw, I don’t like Altium much, the software, how to work in it, the GUI etc —and all the options in every step— but they at least seem to have ideas about the libraries and how to make it work to get PRODUCTS (final PCB’s) made.

I set up a sqlite db some some ago and it has been great. I documented the setup here:
https://forum.kicad.info/t/a-database-case-study/39631/10

1 Like

Glad to hear you managed to set that up, teletypeguy!

Jon Evans mentioned in the video it’s also possible to setup the components by making unique components for each value, where also MFR-numbers etc could be added, but’s that’s a hell of a job, it must be possible somehow to import text-lists/tables from the manufacturers in a database which I suppose is the thing with the database Jon is mentioning in the video?

Well obviously it is possible to import the numbers. All you really need is a tabulated or comma separated text file. In general if you can make a Excel sheet of something you can make a database. So if you know how to use excel your like a half a step away from creating your own database.

So if you want to be basic just think of a database conceptually as a spreadsheet.

It should be possible to import it from your wholesalers website somewhat easily (atleast it was for me). Anyway it is a better idea to have internal part number. Because it enables you to make a one to many relationship, where if the vendor changes or you have multiple vendors you can link all in one go trough the database.

Yes, I’m aware of how to use excel but I have no idea how to integrate it with KiCad.

You don’t integrate it with KiCad, you integrate it with your database software

With HTTP libraries in 8.0 this is something that a third party can (and probably will) develop.

Look, guys. your like totally off base. Using a database is not hard, you think it is, its not. Off course you can make your database as hard as you like but then you can make excel into CAM software…

Yes, I’m aware of how to use excel but I have no idea how to integrate it with KiCad.

Start by getting a graphical database editor like say DBeaver (which is the same as used on this video on kicad databases). Its sufficiently close to excel that you should have no problem here. Just dump your data to tables if you have a excel or csv DBeaver can just do this for you.

Then just make the db connection as per the link by John_Pateman posted

Now the only question is who is going to manage your database.