Database design, table design-view, constraints etc, SQL

I’ve done a lot of database design but always with the advantage of using a data-dictionary system to generate the SQL to create the elements of the database, so I wanr to check that I am going down the right route. I am using WIndows 10 (64bit) and a local database.

  1. Table design. Can I create ‘contraints’ in the graphical table-design view? I have been adding them by entering SQL.

  2. Database structure SQL. I found the command “script , ‘filename’;” to extract details of everything in a database, including the data. Is there a version of this command to extract just the definitions of particular tables?

  3. Once I have a file of SQL commands to be run against the database, how do I accomplish this?

  4. How can I ensure that column descriptions (eg ‘Customer Number’) remain the same wherever they are used?

  5. Has anyone created a data-dictionary system?

That’s definitely enough for now!

Your questions are oriented toward databases. Base is not a database but just a front end to databases. Base does come with “embedded” HSQL v1.8 but most are advised not to stick with that and to at least migrate to a split version (data external to .odb) with an upgraded HSQL. Many also use external DB’s such as PostgreSQL, MySQL, MariaDB etc.

The only SQL which can be stored are queries. Other than queries (which include Meta data retrieval) SQL needs to be run through the main startup screen from the menu Tools->SQL and provides no storage for these statements. For storage of this type and much of your question, migrate away from the “embedded” HSQL and use an external tool such as SQL Workbench/J or MySQL Workbench or similar.

Also refer to the documentation of the specific database you are using. Here is the link for the included HSQL v1.8 - click here.

Thanks for that. I was thinking that LibreOffice Base was more like Microsoft Access than it actually is, and that was in about 2002. I have set up MySQL Workbench (Community version) which turns out to be what I required.
Thanks again, Chris

If this answers your question please click on the :heavy_check_mark: (upper left area of answer).