Reply
creating a portable schema!!!
Old 04-22-2008, 05:16 AM creating a portable schema!!!
Junior Talker

Posts: 3
hi,
i am working on a project where in i am supposed to create a database schema which should be platform independent, which is why i have chosen MySQL.
is there anything that i am supposed to consider while creating the installation script for tables?
It should work on Windows as well as linux!

Also any advice/info on creating schema that would be compatible to any backend would be appreciated.

Thanking in advance.
hvolvo is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Old 04-22-2008, 02:07 PM Re: creating a portable schema!!!
chrishirst's Avatar
Super Moderator

Posts: 10,639
Location: Blackpool. UK
Only that the *nix OSes are case sensitive and windows OSes are not.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-23-2008, 02:16 AM Re: creating a portable schema!!!
Junior Talker

Posts: 3
thanx for ur prompt reply!
so i guess having all the names in small letters will b the safest thing to do.

Regarding the second part of it:
what i ment is not all datatypes are supported by all the DB's
eg. there is no varchar2 in MySQL & varchar is deprecated in Oracle
OR there is no 'tinyint' in Oracle etc.
is there any place where i can get the datatypes which are supported by all the DB's or will i have to create separate schemas for diff DB's?
hvolvo is offline
Reply With Quote
View Public Profile
 
Old 04-23-2008, 04:49 AM Re: creating a portable schema!!!
chrishirst's Avatar
Super Moderator

Posts: 10,639
Location: Blackpool. UK
For that you should read This Thread.

Two methods I use when creating a portable app is to create the queries in seperate classes for each different DB expected to be used. Then;

1/ Have a "driver" class using case (switch) statements to route the called method to the appropriate class method. You then provide a configuration file to tell the app which DB is being used.

2/ Use the directX approach to abstraction and only install the class module for the db that will be used. The configuration can then be included in the class module.

Method 2 is the simplest, when you know the environment that the app will be installed in. And method 1 gives flexibility when the app is being installed for the end user to select what is available.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-23-2008, 06:59 AM Re: creating a portable schema!!!
Junior Talker

Posts: 3
Thanx a lot Chris!
this is going to be a lot of help

would like to trouble u in future if i get stuck somewhere
hvolvo is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Reply     « Reply to creating a portable schema!!!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Page generated in 0.15140 seconds with 14 queries