There are multiple ways to work with database content to automate the creation of graphics in Visio. In the case of Organisation charts, you may be lucky because there is an automated wizard available. To get to this particular wizard you need to create a new document using the Organization Chart template (in the Business section). This will open with a series of dialog windows that guides you through connecting to your data source and selecting the necessary fields.
Youtube videos can give you an idea on how that works
visio org chart wizard tutorial - Google Search
If this doesn't work for your requirements it is also possible to do it via VBA but it is not anywhere near as simple. If you have the Visio Professional version (rather than Visio Standard) you can import database data into a Visio file and possibly could then turn that into a graphic. I haven't used the Pro version for many years but from memory I think it is likely to be an avenue to explore.