Subject Re: how to use the same column from a single table to other tables?
Author dice_in_trouble
--- In firebird-support@yahoogroups.com, Ann Harrison <aharrison@...> wrote:
>
> On Fri, May 3, 2013 at 8:07 PM, dice_in_trouble
> <dice_in_trouble@...>wrote:
>
> You wrote:
>
> > > >
> > > > the client id also doens't auto increment.
> > > >
>
>
> I asked
>
> >
> >
> > How do you generate client identifiers?
> > >
> >
> > You responded
>
> > What do you mean by client identifiers? I would like to summarize all the
> > data in a certain column.
> >
>
> Summarizing data can be done with computed columns, or with triggers.
> Triggers introduce a chance
> for deadlocks but perform better if you have a high read:write ratio
> because the sum doesn't have to be
> computed on reference. However, you also mentioned that your client_id
> field is not generated automatically.
> One way people get in trouble with Firebird is using something like setting
> an identifier column with an
> expression like <identifier> = MAX(<identifier>) + 1 I wondered if that
> was how you were creating unique
> identifiers.
>
> Good luck,
>
> Ann
>
>
> [Non-text portions of this message have been removed]
>

Thanks for the reply. Unfortunately I just put a char on the id and without a null option. I encountered once a problem because I used the number 1 already but have it deleted on the record, but I cannot use the number 1 again. Anyways I was planning to make the client ID automatically generates the numbers so that I will not mix up if the time comes that I have lots of data already encoded to the database.

Regarding your answer regarding the summary. I honestly can't understand anything from deadlocks to triggers and identifiers.

Thank you.

Sincerely,

Cedris