Loading ...
Sorry, an error occurred while loading the content.

[firebird-support] DATA TYPES - float and so on

Expand Messages
  • Codebue Fabio - P-Soft
    Ciao , someone could explain exactly difference between these data types: DECIMAL FLOAT DOUBLE NUMERIC naturally in firebird.... Codebue Fabio
    Message 1 of 11 , Feb 1, 2008
    View Source
    • 0 Attachment
      Ciao ,
      someone could explain exactly difference between these data types:

      DECIMAL
      FLOAT
      DOUBLE
      NUMERIC

      naturally in firebird....


      Codebue Fabio
      .-----------------------------.
      _ \ __| _||
      __/____|\__ \ _ \ _| _|
      _| ____/\___/_| \__|

      P-Soft di Codebue Fabio & C. sas
      via B.Storti, 19
      24060 - Chiuduno - BG
      Italy
      Phone: +39.030.839435
      Fax: +39.030.5100306
      Mobile: +39.348.3515786
      .-----------------------------.
      Web : www.p-soft.biz
      EMail: f.codebue@...
    • Ivan Prenosil
      ... DOUBLE PRECISION - it is standard floating point type, advantage is that it can store very big and very small values (like number of atoms in universe or
      Message 2 of 11 , Feb 1, 2008
      View Source
      • 0 Attachment
        > someone could explain exactly difference between these data types:
        >
        > DECIMAL
        > FLOAT
        > DOUBLE
        > NUMERIC
        >
        > naturally in firebird....

        DOUBLE PRECISION - it is standard floating point type,
        advantage is that it can store very big and very small values
        (like number of atoms in universe or wavelength of light),
        disadvantage is that it is not precise, .e.g. it can't store
        value "0.1" exactly, instead it will store something like
        "0.0999999999999999". This fact is usually hidden
        by different built-in roundings, but you should be aware of it.

        FLOAT - similar do Double Precision, but Double is 8-bytes
        and Float is 4-bytes. Because of its poor precision
        you should avoid it.

        DECIMAL and NUMERIC are exact types (internally stored
        as Integer or Bigint), more suitable e.g. for handling money.
        Small problem is that such types are usually not supported
        directly by programming languages. E.g. in Delphi there is
        datatype "Currency", which is equivalent to NUMERIC(18,4),
        but for handling NUMERIC(18,5) you would probably need
        to use Extended (which is similar to Double, but has better
        precision since it is stored in 10 bytes)


        You can find some notes here:
        http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=fb_conf_timetable_2006
        (slides for "Data types" presentation)

        Ivan
      • solutionsdxb
        Hi I am building an software where i want that it should sync some data from sql server and keep in firebrid data , if anybody can help in giving some sample
        Message 3 of 11 , Feb 1, 2008
        View Source
        • 0 Attachment
          Hi

          I am building an software where i want that it should sync some data
          from sql server and keep in firebrid data , if anybody can help in
          giving some sample scripts that would be great.

          with regards

          Pankaj
        • tomkrej
          May be using embedded server default character set of Your OS (instead of NONE as TCP/IP connection to remote server), try to define the character set in
          Message 4 of 11 , Feb 2, 2008
          View Source
          • 0 Attachment
            May be using embedded server default character set of Your OS (instead
            of NONE as TCP/IP connection to remote server), try to define the
            character set in connection parameters.

            Tom
          • solutionsdxb
            Hi I am building an software where i want that it should sync some data from sql server and keep in firebrid data , if anybody can help in giving some sample
            Message 5 of 11 , Feb 7, 2008
            View Source
            • 0 Attachment
              Hi
              I am building an software where i want that it should sync some data
              from sql server and keep in firebrid data , if anybody can help in
              giving some sample scripts that would be great.

              with regards

              Pankaj
            • Fidel Viegas
              ... Hi Pankaj, you should discuss about kind of solutions in firebird-tools or firebird-devel. But, have a look at http://funambol.com/opensource/, which may
              Message 6 of 11 , Feb 7, 2008
              View Source
              • 0 Attachment
                On Feb 8, 2008 7:12 AM, solutionsdxb <solutionsdxb@...> wrote:

                > Hi
                > I am building an software where i want that it should sync some data
                > from sql server and keep in firebrid data , if anybody can help in
                > giving some sample scripts that would be great.
                >
                > with regards
                >
                > Pankaj

                Hi Pankaj,

                you should discuss about kind of solutions in firebird-tools or
                firebird-devel. But, have a look at http://funambol.com/opensource/,
                which may be of help.

                All the best,

                Fidel.
              • Fidel Viegas
                ... Sorry, wrong link. That is for mobile sync. Check your email.
                Message 7 of 11 , Feb 7, 2008
                View Source
                • 0 Attachment
                  On Feb 8, 2008 7:56 AM, Fidel Viegas <fidel.viegas@...> wrote:

                  >
                  > you should discuss about kind of solutions in firebird-tools or
                  > firebird-devel. But, have a look at http://funambol.com/opensource/,
                  > which may be of help.

                  Sorry, wrong link. That is for mobile sync. Check your email.
                • solutionsdxb
                  my apologies for wrong posting will take care in near future. Regards
                  Message 8 of 11 , Feb 7, 2008
                  View Source
                  • 0 Attachment
                    my apologies for wrong posting

                    will take care in near future.

                    Regards

                    --- In firebird-support@yahoogroups.com, "Fidel Viegas"
                    <fidel.viegas@...> wrote:
                    >
                    > On Feb 8, 2008 7:56 AM, Fidel Viegas <fidel.viegas@...> wrote:
                    >
                    > >
                    > > you should discuss about kind of solutions in firebird-tools or
                    > > firebird-devel. But, have a look at http://funambol.com/opensource/,
                    > > which may be of help.
                    >
                    > Sorry, wrong link. That is for mobile sync. Check your email.
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.