Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



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

Posts: 7
Trades: 0
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
 
 
Register now for full access!
Old 04-22-2008, 03:07 PM Re: creating a portable schema!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Only that the *nix OSes are case sensitive and windows OSes are not.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-23-2008, 03:16 AM Re: creating a portable schema!!!
Novice Talker

Posts: 7
Trades: 0
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, 05:49 AM Re: creating a portable schema!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-23-2008, 07:59 AM Re: creating a portable schema!!!
Novice Talker

Posts: 7
Trades: 0
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
 
Reply     « Reply to creating a portable schema!!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.45358 seconds with 12 queries