TOPIC: Table design and control ????
#762
Table design and control ???? 3 Years, 5 Months ago
I've worked with many different database architectures and have always been able to control table design thru the IDE. I find no such method in Suneido. In fact, in the User Manual it specifically states that system tables (I assume this includes tables I have created) can only be structurally changed internally by the 'SYSTEM'.

So, my dilema is this ..... I create a rough-in table to use in my application. It is based on what I currently need, but must be flexible enough to allow column changes, adds, and deletes as the application evolves. How does one go about controlling the structure of their tables once they have been added to Suneido? This is not clearly defined in the manual, in fact it is not even mentioned. :S

JP: perplexed as always
 
 
#763
Re:Table design and control ???? 3 Years, 5 Months ago
Sorry, I guess it is one of those things that everyone assumes you know!

You alter tables in Suneido via database requests, similar to SQL DDL. Look at Users Manual > Database > Requests. You can give these requests from QueryView, or from code (or the WorkSpace) using Database(request)

You might want to look at Claudio's Database Admin Tool in Support > Download Library. It is probably more what you were looking for.

Suneido's does more things with code than with interactive tools. (Similar to Ruby on Rails) For example, screens and reports are done in code, instead of visual designers. (I have nothing against visual designers if someone wants to write them.)
 
 
andrew
 
#764
Re:Table design and control ???? 3 Years, 5 Months ago
piperent wrote:
[...]in the User Manual it specifically states that system tables (I assume this includes tables I have created) can only be structurally changed internally by the 'SYSTEM'. System tables and user tables are different things. System tables are created and managed by Suneido itself.
To alter the structure of an user table you can use the 'ALTER' database request, as stated in the User's Manual (Database -> Requests -> alter). With 'alter' you can create, rename and delete columns, keys and indexes.
You are right, there isn't a table designer in the IDE, but as Andrew suggested, you could try the Claudio Mascioni's Database Admin Tool plugin.
 
 
Mauro
 
#766
Re:Table design and control ???? 3 Years, 5 Months ago
Thanks for the insite. I'll take a look at the Administrative tool. That really sounds more like what I've grown accustomed to. I know this sounds narrow minded, but as a developer who is always adding, changing table definitions, DB administration is not something I want to spend hours and hours writing code for. I'd rather put my efforts into the finished product, which by any standards is where I get paid. Tinkering with the User tables is just a bothersome necessity.

JP
 
 
#767
Re:Table design and control ???? 3 Years, 5 Months ago
I guess it depends on the situation.

When we make a change to the tables in our application, that change has to be shared with all the other developers. The easiest way to share among programmers is via version control. Most visual tools do not handle this. Of course, if you are a single developer this is not a problem.

We also have to deploy the changes to all our customers. We do this by sending "update" code to our customers that makes the table changes and also does any required conversion of the data. Again, most visual tools do not handle this. Even if you only have a single customer, you need some way to deploy.

Visual tools are not necessarily faster. In Windows I can rename a file either from Explorer or from the Command Prompt. Sometimes I use one, sometimes the other. They take about the same amount of time. But if I had to do that rename (or several of them) on multiple machines, I would prefer to make a batch file, rather than making the change manually on each machine.

On the other hand, visual tools can be easier for beginners - no syntax to figure out.
 
 
andrew