Development talk:XMLDB column types: Difference between revisions
From MoodleDocs
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
What is the difference between int, number and float? | What is the difference between int, number and float? | ||
Well, int are integers, no decimal point (comma in Spain), you know. :-) | :Well, int are integers, no decimal point (comma in Spain), you know. :-) | ||
About the difference between number (or decimal or numeric) and float, I really think it's more related with DB internals and how such info is stored, because from their values, they are pretty equivalents (practically, practically, the same). | :About the difference between number (or decimal or numeric) and float, I really think it's more related with DB internals and how such info is stored, because from their values, they are pretty equivalents (practically, practically, the same). | ||
Initially I was going to use only one of them (number, I think), but then I discovered we had some of the others (float) currently inside Moodle, so finally I decided to implement both of them. Some RDBMS (Oracle) lacks support for the float type, so we'll convert them to number there). | :Initially I was going to use only one of them (number, I think), but then I discovered we had some of the others (float) currently inside Moodle, so finally I decided to implement both of them. Some RDBMS (Oracle) lacks support for the float type, so we'll convert them to number there). | ||
Also another possibility is to convert all those float columns (2-3 only) to number to use only that. But, in order to break the minor numbers of things I decided to keep both supported in the XMLDB Schema. | :Also another possibility is to convert all those float columns (2-3 only) to number to use only that. But, in order to break the minor numbers of things I decided to keep both supported in the XMLDB Schema. | ||
[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 20:31, 10 August 2006 (WST) | :[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 20:31, 10 August 2006 (WST) |
Revision as of 12:32, 10 August 2006
What is the difference between int, number and float?
- Well, int are integers, no decimal point (comma in Spain), you know. :-)
- About the difference between number (or decimal or numeric) and float, I really think it's more related with DB internals and how such info is stored, because from their values, they are pretty equivalents (practically, practically, the same).
- Initially I was going to use only one of them (number, I think), but then I discovered we had some of the others (float) currently inside Moodle, so finally I decided to implement both of them. Some RDBMS (Oracle) lacks support for the float type, so we'll convert them to number there).
- Also another possibility is to convert all those float columns (2-3 only) to number to use only that. But, in order to break the minor numbers of things I decided to keep both supported in the XMLDB Schema.
- Eloy Lafuente (stronk7) 20:31, 10 August 2006 (WST)