Data Repository

Coming from products that have a dictionary/repository of tables/columns, I’m wondering if xojo also has this feature? Trying to find info on this, but must be searching incorrectly. Can anyone point me in the right direction.

Glenn

Welcome Glenn!

Can you be more specific please? Xojo supports various databases (SQLite, MySQL, ODBC, PostgreSQL) and it also supports Dictionaries.

1 Like

Thanks for the warm welcome. I usually use SQL Server, but maybe I should start with SQL Lite. However, should it really matter what db I will use. Shouldn’t a data repository that has the table and columns be database agnostic. I’m sure I have a lot to learn coming from WinDev and Clarion.

WinDev is a different beast, that may explain the difference in terminology. SQL databases are not the same : although SQL is a standard - really ? - each one has its own dialect. SQL Lite has characterics of its own, which is true with Oracle and other providers. That comprises column types as well.

1 Like

Is this just an information database or do many users add data to it?
Data types are important when storing monetary amounts.
There are many different data types for dates and times as well.
Should the database be backed up?
From where should the database be accessible?
Licensed database systems can be expensive.
PostgreSQL, Firebird, and MariaDB are often better alternatives in that regard.

neutral data could be stored in xml or json files for read only.

if you mean MS SQL Server you can connect via ODBC from Xojo
and manage via MS SQL Server Management Studio as you maybe know.

Yes, it does. Of all the DBMS options, SQL Server will be the most limiting for deployment ability. SQLite is the best place to start and move to Postgres or MariaDB if you need.

Please, for the love of all that is holy, don’t find “creative” solutions to make Dictionary act like a table.

3 Likes

I think you misunderstood the quesiton. I know dbs make a difference, but a data dictionary shuold have the table structure and connection. And then depending on what db you use it makes allowances, with the stipulation any of the db have the same table structure. Perhaps in XOJO I’m using the wrong terminology. Been doing this for years and years with different products. You just slide in the appropriate driver…. and everything is transparent. Even the I/.O commands stay the same,

The «data dictionary» you’re referring to can be managed implementing a custom class for each DB table, where properties are the table columns with the required type value: string, integer, datetime, currency… This way you can work with the DB records as objects, and have access to values using the regular dot notation, like customer.id or customer.name.

You can also define these classes as a subclass of a main «table» class that contains some common properties/methods.

And finally you can create different «dbConnectors» for each DB engine, each of them having the specific DB engine syntax for the different select, insert, update and delete commands.

1 Like