EAGLE Central Forums
Where the EAGLE community meets. Sponsored by Stratford Digital.

Home » CadSoft Support Forums » eagle.suggest.eng » How about ODBC support for parts?
How about ODBC support for parts? [message #165770] Sun, 22 May 2016 17:06 Go to next message
Craig Arno
Messages: 7
Registered: May 2016
Junior Member
I miss being able to connect to my MySQL parts database when I use Eagle.

OrCAD CIS and Altium Designer have this feature, and I find it a time
saver to be able to access parts and vendors I've already qualified for
prior designs. This does imply a simple relational database to relate
parts database entries to vendor database entries.

Windows installations require an ODBC database connection to my server's
MySQL database. Linux uses the native MySQL interface.

I use LibreOffice "Database/Base" to maintain the MySQL parts database
when the user interface in CAD tool I'm using is making a change
difficult. It's as easy as using Excel or Access, and a lot more flexible.
Re: How about ODBC support for parts? [message #165773 is a reply to message #165770] Sun, 22 May 2016 18:15 Go to previous messageGo to next message
rachaelp
Messages: 595
Registered: March 2015
Location: UK
Senior Member
Hi Craig,

ODBC support has been requested several times previously by a number of
people, myself included. I agree it would be a nice addition.

I have worked around this issue by writing a php interface to my back
end database (in this case sqlite but the principle is the same for
MySQL) running on nginx (or you could use apache or whatever) and then
using ULP's network functions to interact with the database via this web
interface. It actually works reasonably well although I still need to
iron out a few wrinkles in my implementation and rewrite some of my code
to be more elegant.

Best Regards,

Rachael

--
To view any images and attachments in this post, visit:
https://www.element14.com/community/message/197584
Re: How about ODBC support for parts? [message #165787 is a reply to message #165773] Tue, 24 May 2016 14:52 Go to previous messageGo to next message
Craig Arno
Messages: 7
Registered: May 2016
Junior Member
On 05/22/2016 11:15 AM, rachaelp wrote:

> I have worked around this issue by writing a php interface to my back
> end database

Would you be willing to share your PHP and ULP code?

Thanks,
Craig
Re: How about ODBC support for parts? [message #165788 is a reply to message #165787] Tue, 24 May 2016 15:13 Go to previous messageGo to next message
rachaelp
Messages: 595
Registered: March 2015
Location: UK
Senior Member
Craig Arno wrote on Tue, 24 May 2016 15:52
On 05/22/2016 11:15 AM, rachaelp wrote:

> I have worked around this issue by writing a php interface to my back
> end database

Would you be willing to share your PHP and ULP code?

Thanks,
Craig


Hi Craig,

I will share the essence of the code once it's tidied up and not quite so "hacky"! It's very tied to how my database works for me so probably not useful to share it in its entirety and also at the moment it's not elegant as components are matched based upon building a description string in ULP from the attributes of a part and then doing a lookup in the database on that description. My end goal is to have it look up on all the parameters individually and if there is more than one match it would pop up a window with the choices for me to select or if a match could not be found at all it would pop up a list of all the database parts in the category for me to do a manual search or add a new entry. This is the long term goal but I have other work to do in the mean time though!

If I get a chance to pull together some sanitized code snippets based on where I am currently I will pop them on here in the interim until I can get something better to share.

Best Regards,

Rachael

Re: How about ODBC support for parts? [message #165789 is a reply to message #165788] Tue, 24 May 2016 16:22 Go to previous messageGo to next message
Craig Arno
Messages: 7
Registered: May 2016
Junior Member
On 05/24/2016 08:13 AM, Rachael wrote:
> Craig Arno wrote on Tue, 24 May 2016 15:52
>> On 05/22/2016 11:15 AM, rachaelp wrote:

> ... This is the long term goal but I
> have other work to do in the mean time though!
>
> If I get a chance to pull together some sanitized code snippets based on
> where I am currently I will pop them on here in the interim until I can get
> something better to share.

Yeah, I get your position all too well. I wondered how much I'd have to
do to change from SQIlite to network connected MySQL.

I'm still trying to decide Eagle vs Altium Designer (AD) for my next
effort. AD has ODBC and revision control using SVN. ~$1000 vs ~$8000.
Eagle is pretty attractive, and less buggy with extremely good
forward/back annotation, and decent auto-router. Then there's KiCAD.
Eagle is looking like my best trade-off so far. And yes, I also use GIT
"manually". It works with XML. i.e. I can pretty quickly and
unambiguously identify what changed between versions. ODBC is the bigger
issue.
Re: How about ODBC support for parts? [message #165790 is a reply to message #165789] Tue, 24 May 2016 16:56 Go to previous messageGo to next message
rachaelp
Messages: 595
Registered: March 2015
Location: UK
Senior Member
Craig Arno wrote on Tue, 24 May 2016 17:22

Yeah, I get your position all too well. I wondered how much I'd have to
do to change from SQIlite to network connected MySQL.


It shouldn't be much of a change to swap out sqlite function calls for mysql ones, they're both doing pretty much the same thing, it's just the back end mysql database is more fully featured and scales a lot more. There are limitations with sqlite but on the plus side its very light weight. Really I should probably swap it out for mysql myself, I only used it because I was messing around with a Pi and that is currently where my components database resides..... probably not where I should leave it though!

Craig Arno wrote on Tue, 24 May 2016 17:22

I'm still trying to decide Eagle vs Altium Designer (AD) for my next
effort. AD has ODBC and revision control using SVN. ~$1000 vs ~$8000.
Eagle is pretty attractive, and less buggy with extremely good
forward/back annotation, and decent auto-router. Then there's KiCAD.
Eagle is looking like my best trade-off so far. And yes, I also use GIT
"manually". It works with XML. i.e. I can pretty quickly and
unambiguously identify what changed between versions. ODBC is the bigger
issue.


I guess it depends on what you're trying to do design wise. I mean, EAGLE can technically do quite complex boards, but for some things there are areas where it could definitely be improved and Altium is pretty much the best (expensive) fully commercial toolset these days. But as you say it comes with an $8000 price tag which is quite a lot!

The down side of Altium and the biggest reason I won't ever buy it is it's Windows only. I like that I can use EAGLE natively on my Mac and it's rock solid stable these days. Also EAGLE is so configurable with ULP that losing that flexibility would be a difficult thing for me to accept.

I looked at KiCAD briefly a few weeks ago just for interest and yes it may have some features that EAGLE really should have already but it's UI is awful and it's got big functionality gaps also, I couldn't live with that for professional work.

GIT vs SVN for version control.... Well I really don't get on with SVN so that's not selling Altium to me either! Very Happy I'm going to try to write some ULP to integrate GIT into my setup (again when I have some spare time!) so if I get that going I will share that as well as my database access stuff.

Best Regards,

Rachael



Re: How about ODBC support for parts? [message #165793 is a reply to message #165790] Wed, 25 May 2016 00:45 Go to previous message
Craig Arno
Messages: 7
Registered: May 2016
Junior Member
On 5/24/2016 9:56 AM, Rachael wrote:
> I guess it depends on what you're trying to do design wise. I mean, EAGLE
> can technically do quite complex boards, but for some things there are
> areas where it could definitely be improved and Altium is pretty much the
> best (expensive) fully commercial toolset these days. But as you say it
> comes with an $8000 price tag which is quite a lot!
>
> The down side of Altium and the biggest reason I won't ever buy it is it's
> Windows only. I like that I can use EAGLE natively on my Mac and it's rock
> solid stable these days. Also EAGLE is so configurable with ULP that
losing
> that flexibility would be a difficult thing for me to accept.
>
> I looked at KiCAD briefly a few weeks ago just for interest and yes it may
> have some features that EAGLE really should have already but it's UI is
> awful and it's got big functionality gaps also, I couldn't live with that
> for professional work.
>
> GIT vs SVN for version control.... Well I really don't get on with SVN so
> that's not selling Altium to me either! :d I'm going to try to write some
> ULP to integrate GIT into my setup (again when I have some spare time!) so
> if I get that going I will share that as well as my database access stuff.
>
I pretty much agree with all your points. SVN is great, but GIT is
better in multi-server and off-line usage scenarios.

KiCAD looks great, but isn't there yet, and doesn't have the same level
of support as Eagle (neither does Altium), important during a schedule
crunch when you need quick answers to "stupid" questions and are running
real short on sleep and patience. A number of my potential contracts
want Altium, so I would like to improve my skills. I think Mentor (never
used it) is supposed to be even more capable, but at up to $700,000 per
-all out- seat, way out of my league.

Like you, I prefer a non-windows platform, but run Windows 7 in a
VirtualBox window when there is no other choice (a lot of embedded
environments). This is one of the reasons I like a networked database,
I can access it using LibreOffice Base from either platform. Given a
choice I'll also do my documentation using LibreOffice! Less buggy than
MS Office, and with OpenDocument ISO/IEC international standard ISO/IEC
26300 for long term storage/access and tool portability. And LibreOffice
has a built in document Version Control system which stays with the
document file!

Yeah, slightly off topic unless we broaden the discussion scope to
"infrastructure", and fitting Eagle into an existing infrastructure
(ahem, ODBC). My 2ยข.

Craig
Previous Topic: Auto add >NAME and >VALUE in the symbol editor
Next Topic: How do i create holes based on a DXF i have imported WITHOUT redrawing the polygons
Goto Forum:
  


Current Time: Thu Aug 17 17:31:17 GMT 2017