RadCORE comes with several database models to help you develop your applications.

- Firebird 2.5.9 32bits( default )

 user: SYSDBA / password: masterkey

 database: rc_db.fdb

- Firebird 3.0.10 32bits

 user: SYSDBA / password: masterkey

 database: rc_db_fb30.fdb

- Firebird 4.0.2 32bits

 user: SYSDBA / password: masterkey

 database: rc_db_fb40.fdb

- Firebird 5.0 32bits( RC 2 )

 user: SYSDBA / senha: masterkey

 database: rc_db_fb50.fdb

- MariaDB / MySQL

 database: rc_db

- PostGresSQL

 database: rc_db

- SQL Server

 database: rc_db

- SQLite

 database: rc_db.db


Note: 

I do not master the use of all databases and it is not the focus of this document.

I just tried to make it easier by making all the models above available.

The working version of my Delphi is Professional, so I don't have some components to access SQLSERVER, ORACLE, COMPILATION FOR LINUX, etc.


If you use another manager other than Firebird, create the "rc_db" database and restore the backup to the database you want to use.


See the database files in "C:\RadCORE_SOURCES_uniGUI\inetpub\wwwroot\radcore\files\database" but my advice is to initially use the default settings with FIREBIRD. Once you've mastered RadCORE, you can experiment with other databases.


Below is the location of the files as mentioned in the previous topic.



Below is the general configuration file, with the default access configuration:


> The filename ( RadCOREWEB_cfg ) is automatically created according to the constant APP_NAME( uconsts.pas ).

each application created and given its respective name will have a configuration file with the application name following "_cfg.ini".




In "dbms" the following options can be used:


- FIREBIRD

- MYSQL

- PGSQL

- SQLSERVER

- SQLITE



IMPORTANTE

The global variable mm.CONFIG_DATABASE will be used to identify which database was configured and will be used in several RadCORE functions/procedures, such as the rc_ConnectDB function that makes the default database connection.


Default database structure





List of translated table and field names:


    C:\RadCORE_SOURCES_uniGUI\inetpub\wwwroot\radcore\files\database\TABLE TRANSLATE.txt


Most tables are for demonstration purposes. Unfortunately I kept the same structure for everyone but it's not complicated to understand the context of each using the examples.


VIEWS are only used when configured to use FIREBIRD to capture METADATA.


The resources of FIREDAC itself were not used to capture metadata, to try not to have total dependence on it, giving more possibility to use another engine, with that, the function "rc_GetSQL" was created.


The table "EMPRESAS" ("COMPANIES") is used (BRAZIL, GLOBAL and BASE DB versions) for selection after LOGIN


> The selection of companies is only displayed when there are 2 or more companies registered.



The permission control (which will be seen later) uses the tables:


- USUARIOS

- USUARIOS_EMPRESA

- USUARIOS_RESTRICOES

- FUNCIONARIOS


Automated Database Features


Regarding DYNAMIC CRUDs and LOOKUPS, RadCORE will always call the function "rc_GetSQL" and "rc_GetPrimaryKey( despite capturing all PK's and keeping them in memTable I only actually use one PK, which in practice would be the default for each table.


My structure pretty much uses the field: "CODIGO" (ex: ID ) as a standard PK but you can use any one, following this premise.


There are examples with PK being a DATA, for example.



Try to run RadCORE with the default model to study.


Then it will be easier to migrate to your usage database.


IMPORTANT:

Do not change the name of the database connection component.( sqlconn )

Created with the Personal Edition of HelpNDoc: Free help authoring environment