Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed Improvements to the documentation #63

Open
fdesp87 opened this issue Oct 26, 2022 · 0 comments
Open

Proposed Improvements to the documentation #63

fdesp87 opened this issue Oct 26, 2022 · 0 comments

Comments

@fdesp87
Copy link

fdesp87 commented Oct 26, 2022

  1. In general, the documentation should be reviewed by a person not involved in the development of gnatcoll-db, to identify points not totally clear.
    2. It is indicated that the generated schema contains the information to generate a database in a RDBMS. Too strong statement as some information is not included (for example, how views are defined, length of varying string, possibly more).
    3. The documentation shall indicate that Table definitions shall be separated by a blank line at least (if the schema is modified by hand).
    4. The documentation shall indicate that FK statements in the generated schema shall not contain blanks between the foreign table and the optional reverse relation.
    5. The documentation separates FKs by comma in the case of “FK:” clause, they should be separated by spaces.
    6. The database should be in 3NF. Otherwise, name conflicts may appear in the generated code.
    7. When modifying the generated schema by hand, avoid to repeat names within a table (2nd and 3rd columns) with fields in the same table.
    8. Float is seen by Postgresql as double precision, so it is necessary to use Float(24) in Postgresql to obtain the equivalent Ada Float. However Float(24) is unknown in the translation by gnatcoll_all2ada. Instead of Float, you should use explicit Double Precision in Postgresql and use Real to obtain the Ada Float type. Indicate that in the documentation.
    9. Numeric is translated to Float by gnatcoll_all2ada . Instead of Numeric, you should use some available fixed point type in the extracted schema. Indicate that in the documentation.
    10. Decimal is translated to Float by gnatcoll_all2ada . Instead of Decimal, you should use some available fixed point type in the extracted schema. Indicate that in the documentation.
    11. The documentation should indicate that the generated schema must not be modified by hand at least in the following cases:
    Case of Postgresql: if the generated schema is modified by hand and a field is set as AUTOINCREMENT, it is always mapped to Ada Integer. But the Postgresql database may have this field as smallserial, serial or bigserial, so the mapping to Ada should be Short_Integer, Integer and Long_Long_Integer.
    Case of Postgresql: if the generated schema is modified by hand and a field is set as AUTOINCREMENT, it is considered a Primary Key. But in Postgresql, Primary Keys and AutoIncrement are ortogonal properties, there may exist autoincrement fields that are no primary keys.

For more explanations, you can read the report
https://github.com/fdesp87/gnatcoll-db/examples/mytests/Report.odt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant