data type for astromical algorithms

Hello everyone.

IM using Oracle 12 g of data.

I have to face a new application where I have to develop a large number of astronomical algorithms, normally calculated them on the speed of the planets, astronomical positions and so forth.

These algorithms usually have a large number of decimal place, between 10 and 20.

So, Im trying to find the best types of data, because the accuracy is a must. And these are my doubts...

Read the tutorial of Oracle it say that the number data type contains all the other subclass of numbers. For example, as I understand it, the integer data type is only one type of data number with some restrictions.

My question is:

If I declare a variable as number, this variable will have the same accuracy as a variable declared as binary_double? For example

Declare

x number; -Without defining the decimal scale in this way, it can accept the range possible decimal

x BINARY_DOUBLE:-that class will have the same accuracy as the number of x?

What is the best way to declare these vars?  by order of accuracy, storage and speed is not so important in this application.

Regards to all the world and thanks in advance.

Use the NUMBER unless you have a specific reason NOT to use it.

See the built-in data types in the doc of the SQL language

http://docs.Oracle.com/CD/B28359_01/server.111/b28286/sql_elements001.htm#i54330

2

NUMBER[ (p [, s]) ]

Number having precision p and scale s . Precision p may vary from 1 to 38. Wide s can vary from-84 to 127. Precision and scale are in decimal digits. A NUMBER value requires 1 to 22 bytes.

Tags: Database

Similar Questions

  • What the best data type for storing jpeg/gif images?

    Hello
    What the best data type for storing jpeg/gif images?
    Idon't want to use the blob data type
    Ordimage is the best?
    Thank you.

    VDH says:

    What the best data type for storing jpeg/gif images?
    Idon't want to use the blob data type
    Ordimage is the best?

    Don't be stupid.

    If you do not want to use BLOBs then, or you can use the ordimage.

    It uses ordsys.ordsource for the storage of the image data type. This is a user defined Type of data in advance and has a property called LocalData that stores the actual image. And what is its data type? BLOB OBJECT.

  • Data type for special characters

    Hi all

    I am working in Oracle 11 g r2 EE and Linux operating system. We need to insert special characters in table as! @# $.

    What type of data we use for the column.  I used varchar2 (100). .as data type... is this good or any other data type better we have for the storage of special characters.

    create table conv_defp (conv_id varchar2 (100));

    In the conv_id column we want to insert special characters.

    ! @$# are not more special than to abcd

    VARCHAR2 is fine

  • Change data type for the column in a table - Oracle 8i

    Team,

    I need to change a VARCHAR2 column in number.

    ALTER table xyz change number abc;

    By giving the above statement, it says I need empty this column before you change.

    I can't change the data type before emptying this column.

    Please indicate any other solution. Give me some suggestions.

    Empty the column for me here BIG task.

    user11081688 wrote:
    I can't change the data type before emptying this column.

    Not according to the documentation:

    You can change the data type of any column or decrease the size of the entire column if all rows in the column contains NULL values.

    Please indicate any other solution. Give me some suggestions.

    You can add another column with the correct data type.

    ALTER TABLE xyz ADD COLUMN def NUMBER;
    UPDATE TABLE xyz SET def = TO_NUMBER(abc);
    ALTER TABLE xyz DROP COLUMN abc;
    ALTER TABLE xyz ADD COLUMN abc NUMBER;
    UPDATE TABLE xyz SET abc = def;
    ALTER TABEL xyz DROP COLUMN xyz;
    

    If I remember correctly, Oracle 8i does not support the change of name of column if this solution is a bit more complicated than 9i and above. Another option would be to create a new table with CREATE TABLE AS... SELECT, drop the old one and rename a new one to the old.

  • Oracle data type for a bit column

    I want to add a new column to my table, but I can't seem to find any data type in oracle. the only data on the ground will be 1 or 0. What is the best type of data to use?

    Also, is this correct SQL to add a new 'flag' titles to the table tblLocations:

    ALTER TABLE tblLocations
    Bit flag ALTER COLUMN

    Thank you
    Mark

    user8721624 wrote:
    Also, is this correct SQL to add a new 'flag' titles to the table tblLocations:

    ALTER TABLE tblLocations
    Bit flag ALTER COLUMN

    It should be something like:

     ALTER TABLE tbllocations
     ADD  FLAG_BIT CHAR(1)
    

    I guess you can use the char(1) data type to contain these data. Also, you can create a check on the flag_bit column constraint to ensure that only 0 and 1 can be stored in the column.

    I hope this helps.

    Kind regards
    JO

  • Data type for representing €

    Hello

    I want to create, a table, a field that represents money, specifically in €.

    looking on the net I found unfortunately that Oracle doesn't have a SPECIFIC type to represent money in euros or dollars.

    My idea was to use a NUMBER type, and then when I put the data try to concatenate the symbol €. But I think that's not possible.

    If I try to use the VARCHAR2 instead of the NUMBER type, but although functions for later converted to NUMBER, I have with that is not very professional and loses the functionality


    What would recommended you?

    Thank you. Concerning

    You can store your number, such as salary value.
    Show the euro sign is a problem with the output screen, and you can get it in the query that retrieve data from db: TO_CHAR (salary, 'L999G999D99')
    L as currency.
    To learn more:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions181.htm#SQLRF06130

    Nicolas.

  • How 2 call a procedure with the data type for the parameter Ftree.NODE

    Hello

    in this link
    http://Andreas.Weiden.ORCL.over-blog.de/article-29307730.html


    Down in the page after you run the package, I created the procedure and it compiled successfully but when call PR_WTNS in trigger WHEN-TREE-NŒUD-SELECTED

    PROCEDURE PR_WTNE (i_ndNode IN Ftree.NODE);

    as

    PR_WTNE (i_ndNode Ftree.NODE);


    I got the error message; A wrong number or types of argument in the call

    pls I'm stuck can help any one?


    Kind regards

    Abdetu...

    Published by: Abdetu on October 24, 2010 02:36

    Published by: Abdetu on October 24, 2010 02:36

    YKou have to give a variable of type Ftree.NODE when calling this function. If called fromm a WHEN-TREE-NODE-SELECTED-trigger, use: SYSTEM. TRIGGER_NODE

  • Data types in the design for the producer consumer model

    Is it possible for me to use any type of data in a model of design producer consumer, without specifying specific data type?

    what I mean is if there is a way to connect to a data type with which I can use any other type of data, not to mention that one that I have connected, and if not, how can I specify the data type for a number or any other data type, for use in a design of producer-consumer model?

    You can make a part of your cluster of data a Variant.  It will take any type of data.  A common architecture for the producer/consumer is a cluster which is an enum and a Variant.  The enum contains all possible "orders", you might want to send.  The variant contains data that could be of any type.

    Ungroup you in the consumer and get the enum and Variant.  Attach the enum to a case structure.  In the specific case, convert the variant type in a data type of regular LabVIEW and with it as you please.

  • Convert or map Typedonnees decimal Transact-SQL for Oracle Number data type?

    MSSQL 2005
    Oracle 10.2 g

    In a MSSQL table, I have a column with the data type set on (decimal (1.0), null) with the values of line-1. (695 lines in total)

    In the Oracle table, the proposed mapped column is a number data type. When I import data, I received 695 errors with the message "invalid value for the field. How to properly convert or map Decimal (MSSQL) Transact-SQL for Oracle Number data type for a negative value?

    Thank you.

    How do you load data into Oracle? What tool or programming language you are using? Can you post something cause what you stated in your post should work, but there may be some ODBC, or other type of conversion factors to be taken into account.

     > create table t1 (field1  number(1,0));
    
    Table created.
    
     > insert into t1 values (-1);
    
    1 row created.
    
    UT1 > select * from t1;
    
        FIELD1
    ----------
            -1
    

    HTH - Mark D Powell.

  • Change the Data Type to node e/s on PXI-7841R FPGA

    I would like to change the data type for the node FPGA of e/s on my card FPGA 7841R (simulation). So far, I have raw data (I16). I want to test something with the calibrated data (FXP).

    The cRIO, you usually go to the properties of module to change the calibration mode...

    I searched 7841R documentation and could not do any weather information this calibration mode was also available on this map.

    Any tips?

    Vincent

    The new maps in the series R offer node fixed point IO (for example, the SMU-7858R), but as mentioned all the old PXI based cards R-series offer only modes of measurement I16.

    Page 22 manual R series is about how to do this conversion: http://www.ni.com/pdf/manuals/370489g.pdf#page=22

    Specifically, it notes that you can calculate the voltage by (output Code I16) * 10.0V / (32 768).

    Even if this can use FPGA resources, it records the host do the same conversions. RT old target with slow processors doing the conversion of I16 or FXP to SGL on the FPGA has saved a lot of time CPU

  • Modification of the data types of the custom shared variables

    My application includes a library containing a number of shared single process variables. I use type defs to create the shared variable "of the custom control." I know that shared variables do not-automatic update since the type defs, so I'm updating shared variables (data type, do a right click, properties) whenever I update the type definitions.  However, if I make a change to a type design that does not change the data type, for example to change the labels controls, these changes will be reflected in the shared variable.  The data types of variable window shared list contains entries for each previous update, which indicates he uses the previous entries.  How can I make the window of properties of shared variables 'forget' my previous defs type wandering without deleting the variable total? Withdrawal and replacement would be troublesome because the done variable references throughout my project.

    Thank you

    Wes

    The variable is not in the Distributed System Manager, or Manager of the Variable, and cancellation of the deployment has not been resolved.  However, I found Labview from closing completely and reboot clears the memory of the previously used custom data types that sees the library.  Thus, the effective workaround I found is:

    1 make a significant change to the data type of the type (per your suggestion) FED. Record.

    2 - redefine the variable screw-notice type FED.

    3. save the project. Close and restart labview.

    4 - the old def type is now disabled.

    5. return the significant change of the def type, implement trivial change and save.

    6 redefine the variable using the type correct now def. Viola!

    Thank you!

  • ODI-15005: data type "varchar" does not close in technology: file?

    Hello

    I created the interface that loads data from flat file (source) oracle (target).

    For this, I took LKM SQL FOR SQL and SQL TO ADD FILE IKM.

    Please check the source and target data types.

    [WORK REPOSITORY1] Oracle Data Integrator 11g  ORCL_TO_FLAT_2015-08-11_11-59-12.png

    When I am executing this interface, I get the error as

    ODI-15005: data type "varchar" does not close in technology: file.


    To resolve this error, I changed the types of flat file data.

    I went to the Manager of topology-> select technology of files-> data types: string - > orcle to the number data type.

    Even if I do not correct this error. Please help me.


    Thanks in advance,

    A.Kavya.

    Hello

    Can you please check what are the data types for the columns in your data target store. As you say it's a file, can you check if the data type for the two columns has the String value (and not varchar).

    Thank you

    Ajay

  • Subtype and data types

    Hi all

    We can overload subprogrammes that setting differ in the number, order, and type of family data. But impossible to overload if the parameter differs only in the void type.

    If I see the standard package, I get
    subtype types BINARY_FLOAT is NUMBER;
    subtype BINARY_DOUBLE is NUMBER;

    But I am able to overload the two procedures, we have a parameter types binary_float and binary_double other. They are of subtype of the same data type. that is the number. So, how is it possible. Also, most of the subtypes have no difference. So, why are there these number of subtypes? Oracle defines subtypes as data type with some sort of constraint on the base data type, but is valid for all? for example, smallint, and decimal.

    type of NUMBER is NUMBER_BASE;
    subtype of FLOAT is NUMBER;
    ACTUAL subtype is FLOAT;
    subtype 'DOUBLE PRECISION' is FLOAT;
    INTEGER subtype is NUMBER (38.0).
    subtype INT is INTEGER;
    subtype SMALLINT is NUMBER (38.0).
    DECIMAL subtype is NUMBER (38.0).
    DIGITAL subtype is DECIMAL;
    DEC subtype is DECIMAL;

    >
    We can overload subprogrammes that setting differ in the number, order, and type of family data. But impossible to overload if the parameter differs only in the void type.

    If I see the standard package, I get
    subtype types BINARY_FLOAT is NUMBER;
    subtype BINARY_DOUBLE is NUMBER;

    But I am able to overload the two procedures, we have a parameter types binary_float and binary_double other. They are of subtype of the same data type. that is the number. So, how is it possible. Also, most of the subtypes have no difference. So, why are there these number of subtypes? Oracle defines subtypes as data type with some sort of constraint on the base data type, but is valid for all? for example, smallint, and decimal.

    type of NUMBER is NUMBER_BASE;
    subtype of FLOAT is NUMBER;
    ACTUAL subtype is FLOAT;
    subtype 'DOUBLE PRECISION' is FLOAT;
    INTEGER subtype is NUMBER (38.0).
    subtype INT is INTEGER;
    subtype SMALLINT is NUMBER (38.0).
    DECIMAL subtype is NUMBER (38.0).
    DIGITAL subtype is DECIMAL;
    DEC subtype is DECIMAL;
    >
    Some of those who, as a smallint, SQL ANSI data types. See table 2-6 ANSI Datatypes converted to Oracle data types in the doc of the SQL language
    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/sql_elements001.htm

    Oracle allows the name of the ANSI data type to use and combines the name of the ANSI for the appropriate Oracle data type
    >
    ANSI SQL/DS and DB2 data types

    The SQL statements that create tables and clusters allows also ANSI data types and products IBM SQL/DS and DB2 data types. Oracle recognizes the ANSI or IBM data type name that differs from the Oracle database data type name. It converts the data type for the equivalent Oracle data type, stores the Oracle data type under the name of the column data type and stores the data in the column in the data type Oracle based on the conversions listed in the following tables.
    >
    But BINARY_FLOAT and BINARY_DOUBLE types are each defined as unique data types (see table 2-1 in this doc).

    Because they are unique Oracle data types, they can be overloaded.

  • DAte data type

    Hello
    I'm loading external table data. In this .csv file it be a date like 2005-03-14 22:23:45 format. How to specify the data type for this column... I used the date and timestamp, but it displays error.
    column_name   CHAR(19) date_format DATE mask "YYYY-MM-DD HH24:Mi:SS"
    

    http://docs.Oracle.com/CD/B19306_01/server.102/b14215/et_concepts.htm

  • The wrong data type on bind variable

    We are testing framework entity with ODP.NET and linq to entities and have a little problem.

    We run a simple linq to entities statement with a variable binding and our problem is that the column in the oracle database is the CHAR type framework but entity sends the binding as NVARCHAR2 variable. This causes the oracle do not use the index on the column and a full table scan is performed.

    Entities are generated from the database.

    LINQ:
    public string Name (string value)
    {
    var object = (from s in ctx3. TABLE
    where s.COLUMN1 is value
    Select s.COLUMN2). ToList();
    Returns the object [0]. ToString();
    }

    Is there a way to set the data type for a variable binding when you use linq?

    Published by: 872217 on March 13, 2012 04:42

    Because the .NET string is in Unicode, by default, NVARCHAR2 is used in the binding of parameter to string variables.

    EntityFunctions.AsNonUnicode (of use) should be able to say ODP.NET you want to treat a non-Unicode string.
    In this case, VARCHAR2 should be used for the link.
    I hope this will save for you table scan when there is no conversion data more.

    using System.Data.Objects;

    public string Name (string value)
    {
    var object = (from s in ctx3. TABLE
    where s.COLUMN1 is EntityFunctions.AsNonUnicode (value)
    Select s.COLUMN2). ToList();
    Returns the object [0]. ToString();
    }

    Please let me know if it works for you.

Maybe you are looking for