How do I setup a Data Base?

No, but you can update your database directly from jlcpcb if you want, note that the data in the catalog browser isnt entirely up to date either.

The JLCPCB stock status is available in the JLCPCB tools plugin if you click the “download” button.

Can someone here who is running a database solution in KiCad make a demo video to show what it’s like, the benefits and the smooth way of working in it?

I looked at my JLC conversion script and found that in addition to the Altium DB converter I also converted some chip resistors to a KiCad DB library, to try out how it works. I could upload those if your are interested in trying out. You’d have to configure the ODBC data source however for sqlite and modify some paths in the config files.

Thanks Martin, but I think I have to explain myself again that I have no idea at all how to run database libraries in KiCad, and that’s why I ask for someone to make a video (youtube for example) to show how it works, the install etc at this point is not the thing, as it’s too complicated right now and would make the video probably more of a mess, but if you can make a video to show the “flow of the library works” in KiCad after the database has been installed and configured would for sure be interesting. Ok?

@craftyjon ask and you shall receive :slight_smile:

3 Likes

The symbol format wasn’t changed to make it more compatible with git. The old schematic and symbol formats were abominations that were difficult to keep expanding to fit our needs.

Nor did it have anything to do with integers and floats.

Sure you could make any file a database. But generally we reserve database to something that maintains the data and makes it searchable and changeable by multiple users simultaneously.

No comment on the format. Not a big fan of the formats KiCad use. But computer systems are always a bit in optimal.

Thanks Jon, though I don’t understand anything what you say there. That’s why this thread was started, to make it possible to understand if people being non-programmers should even think about this. It’s hereby obvious we should not even think about it. Why not simply do it like Altium does it?

uhh… have you used Altium database libraries? It is (more or less) exactly like Altium does it…

I setup mine by following this guide (I lost the original forum post url).

It shows how to setup an example database lib with a few components. The steps are relatively simple. Basically:

  1. Install odbc driver.
  2. Download the example database.
  3. Create the odbc link to the database file.
  4. Setup paths in Kicad.
  5. Start drawing schematics with the components.
    I build my db by adding more components, adding more fields, and importing other DBs (some are from Altium) to it later.
1 Like

No I have not, it was long ago I just shortly tested the software, which was a mess for me, then, I just thought the library parts in Altium nowadays was easy as their software is so widely used/so popular.

if people being non-programmers should even think about this

Its not a programmer thing. Its a do you use a database thing.

See many of you have it the wrong way around. This is not a replacement for normal libraries. Its a tie in to a database for those that already put stuff in a database because it convenient if you have a person that manages stuff for many people. Its not terribly good fit if you only work alone and have only a handful of projects.

If you don’t have a database for other things than you probably don’t need a database for libraries either.

When do you need a database? You need it when you need to store large amounts of data that may be needed by lots of people.

An example of a database need is this website. Every post goes into a database. and every thread is a fetch to a database, every edit goes into the database. This way there can be multiple things serving the page at the same time.

I am still trying to understand the use cases of the database feature. And I still can not imagine a workflow where it is useful. Do not understand me wrong I do not want sound negative, I just can not wrap my head around it even after watching the KiCon video and reading through this thread…

This comes to mind first. Centralized library for more people. But then it does not store footprints and symbols - it only references them by name? So still would need another way to store large amounts of data and to make things worse - some mechanism to keep them synchronized…

Using it for other big libraries like JLCPCB or Mouser catalogs? These databases contains a lot of information but not the relation to KiCad footprints and symbols… So it could not be used more than a search feature unless someone put in a lot of effort of adding and updating KiCad relations…

Using it as Jon presented - one layer abstraction over symbols and footprints. But this could be usefull even without a database, one simple text file could be enough. And also how usefull is the feature “update the symbol and footprint if the library changes…”. So yeah I can have a european resistors and “bulk replace” them with US ones… But for more complicated symbols it would be total pain in the behind and the designer still would need to check every symbol one by one…

Even though I am a single KiCad user and it is more a sidehustle for me, I do appreciate every way to organize and automate the process… That is why I do use Inventree, Kibot, Git etc even though it takes probably more time to deploy, debug and maintain that it saves but I think it is worth it. I am excited for the new Inventree binding even though I can not envision how it could replace my current workflow completely.

This is perfectly fine! Database libraries are a specialty feature that are only applicable to some users. They are not supposed to be applicable to everyone, and definitely are not supposed to replace the existing KiCad library workflow.

The typical way I see people doing this is with VCS (store library in a Git repository) or sometimes with a centrally-managed shared drive.

This is not really what database libraries is for in my opinion – it’s for data you control, not importing data from a third-party service. Although there is nothing keeping you from taking data you control and then adding to it from a third-party service.

A simple text file comes with lots of limitations and drawbacks, especially when you have more than one person interacting with it at the same time.

I think database libraries are almost never the right answer for single users (unless they really like databases) and agree that if InvenTree and HTTP libraries works better for you, it’s probably a better fit.

I do understand that and I am basically just curious for what users and how do they use it :slight_smile:

This sounds like a terrible combo to me. Having part of the data in VCS with version control and part in DB - all mine instincts scream “No!” in unison :slight_smile: I am using git for libraries and it is a perfect way how to keep the libraries organized. Every project has them as submodules and keeps track of which commit of the submodule is being used. I can pull a newer version if I need but also I can just clone the year old version and it will still use the submodules it had a year ago. I can not imagine a way how to keep a database in sync with history of the VCS. That is also why I mentioned the simple text file as it could be in VCS and versioned by it.

The same applies to Inventree - I love it for managing my stock and additional info about parts I use (where to buy them, datasheets, notes, etc…) but I can not see it as “a library storage”. The best combo would be to have it point to git repo with the part.

You may be right - however there are some crazy users that may use them even though it seems counter intuitive. For example I am using KiBot automation with Git and as I said, maintaining it takes probably more time than it has saved. And friend of mine asked me: “Why is that better than just clicking here and here and here in KiCad?” The difference is that he comes from EE background while my background is in software. I prefer to automate every repetive task if possible…

That’s the thing. Database libraries are for professional work/organizations. Single users should never need them. Your normal use of libraries will suffice and in fact you can store all your custom data directly in symbol fields. That’s what I do, at home. A external text file to the libraries is just duplicating what the library files can already do for you.

At my work, we all our components in the ERP that runs the entire company and every department including HR which we can filter out to CAD tools.

My core background is in software and I do EE. Yet I click GUIs because I hate wasting time maintaining things :stuck_out_tongue:

In practice, it works really well. You don’t have to have perfect synchronization between the VCS and the database, because the VCS only contains the graphics. So for example if something is updated in the database to point to a new symbol, and another user hasn’t updated VCS yet so they don’t have that new symbol, it is not a serious issue – they just have to do an update and then the symbol can be found.

In general with this workflow you never want to use an “old” version of a library. So there is never a reason to check out an older version of the symbol/footprint VCS, and the database doesn’t really trivially allow access to “old versions” anyway. When an existing symbol or footprint has to be changed, old projects will use the cached version in the schematic/board file until/unless they are updated – there is no need to keep around an “old version library” for these projects that haven’t been updated yet.

Why not, let everyone pick their poison. I just prefer the machine in front of me to do the thing it is designed for - automating the repetitve tasks. It reminds me of one girl from accounting that used Excel in similair way. She entered like 200 numbers in the column, then took a calculator, summed them together and entered the sum into the Excel… :innocent:
But on a more serious note, I do not want to waste a PCB fabrication turnaround just to find out I forgot to click something somewhere…

This sounds a really dangerous to me. You say that the graphics is not that important to have it perfectly synchronized. With combination:

I can not imagine the situation that I clone out my project (PCB or SW project) and that the output depends on when I do clone it… I’ve just been reviewing some of my program from 2013 because of a strange bug… I can not imagine not having exactly the same source code as in 2013… And yeah, it is “solved” by the caching in the project but I see that more as a workaround than a “feature to realy on…”.

For example now I am adding a HDMI connector to my board that uses Rapsberry PI CM4. I have done the same on different board two years ago. So I did clone out that repo exactly as it has been 2 years ago and I am looking if I can use the same connector or if I need to replace it with a connector that I can have assembled today. The previous board was assembled by PCBWAY and they sourced all the parts but now I will use JLCPCB and I need to choose a connector from their library. So it would be nice to have a “HDMI connector” part somewhere and just use that. However the same connector is not available in JLC and I need to compare the footprint (just the graphics) if I need to redo it or can use the existing one. On the other hand I may need to order some of the old boards from PCBWAY so I would like to use the old design for that - but some parts will not be available and I will need to change it. But just the parts that I need to change as I do want to change only the necessary minimum. I can not imagine cloning out the design from Git and having all footprints replaced by the new versions… (I know that the caching feature would prevent that but the DRC and ERC would go really creazy about Footprint/Symbol not matiching library…)