An app needs a "Setup the Database" routine correct ?
Doug Easterbrook
doug at artsman.com
Wed Jan 24 20:44:40 EST 2018
hi das:
the analogy to all this is
in DF1, we edit the file and add a field name. it doe not exist until we ran a file reorganization and sometimes needed to reindex the database. it could take a long time on a large DF1
in sql, we
edit the schema to add the file name. it doesn’t exist until we tell the database to add it. yes it manual, but that has advantages.
in postgres -if you send a SQL command from omnis
1) yo can do it on the fly. adding a field or a table — can be done while the user is using the database
2) you can reindex on the fly and in the background — while the person is using the database
With DML, you are down until the reorganization is done… and you had better have backed up before starting
with postgres, you just run your app.. constantly .. adding the field when you want —the act of adding a field does not affect anybody else.
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978
see you at the third annual users conference
https://tickets.proctors.org/TheatreManager/95/online?performance=29086 <https://tickets.proctors.org/TheatreManager/95/online?performance=29086>
> On Jan 24, 2018, at 3:31 PM, Phil (OmnisList) via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>
> Hi Das,
>
> Yep, like others, we do that, the installer creates a database and a default user...
>
> But then the Omnis code creates tables and columns from its own Schema structure.
>
> Any changes down the line in the schemas are also handled by the code, so modifications...
>
> Be careful of schema versions, if someone logs in with an old lib, you don't want the code to revert to an old schema definition, potentially losing columns (fields) of data.
>
> We store the database structure version within the database, so it knows if it can be updated.
>
> Joins, if your using tables for queries then check out the $fromclause...
> this is a good place for joins leaving the where clause to do its job...
>
> regards
> Phil Potter
> Based in Chester in the UK.
>
> On 24/01/2018 20:29, Das Goravani wrote:
>> When you have say a vertical app moreso than a single enterprise using an app you constantly maintain as more of an IT person, you need a routine in the Vertical which is the “Setup the Database” routine, and would make server tables from schema’s say, make the indexes, create sequencing tables, would basically prepare the database for use. This routine would be first in the “utilities” section of the app.
>>
>> Does this sound correct? A setup the database routine that’s all worked out so you don’t have to do anything manually to setup the database?
>>
>> Just wanted to check before I write one.
>>
>> And I need a heads up on maybe they’re called “joins”… that which makes it possible to easily pull in associated parent or child records (I don’t know which way it goes). I’ve heard it hinted that this is possible so that it’s less work and quicker. I don’t know what words to look up.
>>
>> I heard the word “nextval()” from Bastiaan so today I’m studying “create sequence” and “nextval” for that functionality.
>>
>> I just need to hear the words so I can look it up. Of course more than the words is good too. :) Pointers, help, welcome.
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list