Senior & Expert RoR Developers Discussion Forum by Nyros Technologies

HIRE Ruby on Rails Expert Developers Programmers Coders From India
Ruby on Rails PHP .Net Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

Variation of declaring data types in various database

 
Post new topic   Reply to topic    Senior & Expert RoR Developers Discussion Forum by Nyros Technologies Index -> Rails Database setup
View previous topic :: View next topic  
Author Message
s.nagesh



Joined: 23 Jul 2007
Posts: 131

PostPosted: Tue Jun 15, 2010 10:32 am    Post subject: Variation of declaring data types in various database Reply with quote

Hi to all,

Based on my previous experience i collected some of the datatypes declaration in some databases. Because while executing rake db:migrate many times i have faced few problems due to declaration of datatype of the each column.

Type             Postgresql          sqlite              sqlserver            sybase
-------------------------------------------------------------------------------------
:binary            bytea              blob                image               image

:boolean          boolean           boolean           bit                    bit

:date               date                date               datetime           datetime

:datetime         timestamp       datetime         datetime            datetitme

:decimal           decimal           decimal          decimal               decimal

:float                float                float           float(8)                float(8)

:integer            integer             integer           int                      int

:string             (note 1)            varchar(255)  varchar(255)    varchar(255)

:text                 text                 text                text                text

:time                time                datetime         datetime            time

:timestamp       timestamp       datetime          datetime          timestamp




Hope this will help you.

Thanks
Back to top
View user's profile Send private message
sravish



Joined: 04 Sep 2007
Posts: 26

PostPosted: Tue Jun 15, 2010 11:37 am    Post subject: Reply with quote

Its really helpful for the developers who are working with multiple databases. But if you posted the data-types for other databases like mysql, oracle..etc its really good. Just its my suggestion.


Thanks
Back to top
View user's profile Send private message
s.nagesh



Joined: 23 Jul 2007
Posts: 131

PostPosted: Tue Jun 15, 2010 12:17 pm    Post subject: Reply with quote

Here is the datatypes for remaining database


Type         DB2                mysql            openbase            oracle
-------------------------------------------------------------------------------------
:binary      blob(32768)        blob             object                  blob

:boolean     decimal(1)         tinyint(1)       boolean              number(1)   

:date        date                    date             date                    date     

:datetime    timestamp          datetime         datetime           date   

:decimal     decimal              decimal          decimal              decimal         

:float       float                      float            float                  number           

:integer     int                      int(11)          integer              number(38)   

:string      varchar(255)       varchar(255)     char(4096)           varchar2(255)

:text        clob(32768)            text              text                  clob

:time        time                      time              time                 date   

:timestamp   timestamp         datetime          timestamp            date

Back to top
View user's profile Send private message
Gary45



Joined: 13 Jul 2010
Posts: 1

PostPosted: Tue Jul 13, 2010 2:15 pm    Post subject: Reply with quote

Thank you a lot for the information
________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert RoR Developers Discussion Forum by Nyros Technologies Index -> Rails Database setup
Page 1 of 1

 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts Chat utility in a ROR application
0 shobana 2 Thu Sep 09, 2010 9:45 am
shobana View latest post
No new posts How to customize Google Maps InfoWindow using ym4r_gm
0 kalyanallampalli 54 Thu Sep 02, 2010 5:34 pm
kalyanallampalli View latest post
No new posts Drag and Drop file upload
0 umamageshwari 51 Wed Sep 01, 2010 9:36 am
umamageshwari View latest post
No new posts Flex On Rails
0 Raghu 48 Wed Sep 01, 2010 3:00 am
Raghu View latest post
No new posts MongoDB
0 Raghu 45 Tue Aug 31, 2010 3:30 pm
Raghu View latest post
No new posts Problem with Dreamweaver / java error
3 Raja 37 Tue Aug 31, 2010 3:24 pm
Raghu View latest post
No new posts Generating Model
0 phani.galla 44 Tue Aug 31, 2010 2:09 pm
phani.galla View latest post
No new posts Hide Panels using JQuery
0 Anu 48 Tue Aug 31, 2010 1:50 pm
Anu View latest post
No new posts Load a text file using ajax in jquery
0 Anu 38 Tue Aug 31, 2010 1:39 pm
Anu View latest post
No new posts Generating Migrations
0 phani.galla 31 Tue Aug 31, 2010 1:38 pm
phani.galla View latest post




Hire an expert Ruby on Rails developer / coder / programmer or development team from India now!!

Other Forums : PHP   ::   .Net   |   Free unlimited HTML CSS templates download

Nyros Technologies   |   Kakinada City Portal   |   Developers Blog   |   About Ruby on Rails Experts   |   More