Database tables for Exchange rates

2010-05-10 Thread Mimi Cafe
I am designing a database to store exchange rates and other information. The
tables fro the exchange rates will store exchange rates fro all currencies. 

Can I have any suggestions about the number of tables to use for the
exchange rate? I think I will need at least 2 tables, but I am looking for
suggestions on how to achieve maximum speed when querying the database and
also avoid redundant tables or rows.

Mimi


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Database tables for Exchange rates

2010-05-10 Thread Phil
For the exchange rates only you don't really need more than one table. I
work with an enterprise financial system and we have exchange rate tables
which are updated with data every day.

Something like

BASE_CURR char(3)
NONBASE_CURR char(3)
EFF_DATE   DATE
EXCH_RATE  DECIMAL(15,6)-- or however much precision you need

We have other columns storing tolerances but that should be enough. First 3
columns are your key.

Separate tables for the currency codes themselves.

On Mon, May 10, 2010 at 7:28 AM, Mimi Cafe mimic...@googlemail.com wrote:

 I am designing a database to store exchange rates and other information.
 The
 tables fro the exchange rates will store exchange rates fro all currencies.

 Can I have any suggestions about the number of tables to use for the
 exchange rate? I think I will need at least 2 tables, but I am looking for
 suggestions on how to achieve maximum speed when querying the database and
 also avoid redundant tables or rows.

 Mimi


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=pchap...@nc.rr.com




-- 
Distributed Computing stats
http://stats.free-dc.org


Re: Out of range value for column 'datestamp' at row 1

2010-05-10 Thread Jay Ess

On 2010-05-09 13:29, Prabhat Kumar wrote:

INSERT INTO myTable_info (id,range, total_qt, qt_correct, finish_time,
username, datestamp) VALUES (NULL,'Kumar', '20', '17', '111', 'Prabhat','*
NOW()');*

Last_SQL_Error: Error 'You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax

I think problem with* `datestamp` datetime NOT NULL default '-00-00
00:00:00',*

Can any one please suggest me, how to deal with this error.



Remove the ' around NOW(). ' Makes NOW() a literal string and not a function 
call.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Out of range value for column 'datestamp' at row 1

2010-05-10 Thread Prabhat Kumar
Thanks, It worked :)

On Mon, May 10, 2010 at 6:25 PM, Jay Ess li...@netrogenic.com wrote:

 On 2010-05-09 13:29, Prabhat Kumar wrote:

 INSERT INTO myTable_info (id,range, total_qt, qt_correct, finish_time,
 username, datestamp) VALUES (NULL,'Kumar', '20', '17', '111', 'Prabhat','*
 NOW()');*

 Last_SQL_Error: Error 'You have an error in your SQL syntax; check the
 manual that corresponds to your MySQL server version for the right syntax

 I think problem with* `datestamp` datetime NOT NULL default '-00-00
 00:00:00',*

 Can any one please suggest me, how to deal with this error.


 Remove the ' around NOW(). ' Makes NOW() a literal string and not a
 function call.


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=aim.prab...@gmail.com




-- 
Best Regards,

Prabhat Kumar
MySQL DBA
Datavail-India Mumbai
Mobile : 91-9987681929
www.datavail.com

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


RE: Database tables for Exchange rates

2010-05-10 Thread Mimi Cafe
Hi Phil

Yep, it looks like that will do. 

Thanks


 -Original Message-
 From: freedc@gmail.com [mailto:freedc@gmail.com] On Behalf Of
 Phil
 Sent: 10 May 2010 13:53
 To: mysql@lists.mysql.com
 Subject: Re: Database tables for Exchange rates
 
 For the exchange rates only you don't really need more than one table. I
 work with an enterprise financial system and we have exchange rate tables
 which are updated with data every day.
 
 Something like
 
 BASE_CURR char(3)
 NONBASE_CURR char(3)
 EFF_DATE   DATE
 EXCH_RATE  DECIMAL(15,6)-- or however much precision you need
 
 We have other columns storing tolerances but that should be enough. First
 3
 columns are your key.
 
 Separate tables for the currency codes themselves.
 
 On Mon, May 10, 2010 at 7:28 AM, Mimi Cafe mimic...@googlemail.com
 wrote:
 
  I am designing a database to store exchange rates and other
 information.
  The
  tables fro the exchange rates will store exchange rates fro all
 currencies.
 
  Can I have any suggestions about the number of tables to use for the
  exchange rate? I think I will need at least 2 tables, but I am looking
 for
  suggestions on how to achieve maximum speed when querying the database
 and
  also avoid redundant tables or rows.
 
  Mimi
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 http://lists.mysql.com/mysql?unsub=pchap...@nc.rr.com
 
 
 
 
 --
 Distributed Computing stats
 http://stats.free-dc.org


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



starting multiple instances with mysqld_multi

2010-05-10 Thread Nitin Mehta
Hi,

I am exploring multiple instances with MySQL which will be running using the 
same set of binaries (single MySQL base). Two things which I'm not able to work 
out are - 

1. Why mysqld_multi stop grp_id doesn't work? Well, I know why it 
doesn't because there is nothing in the script to handle a 'stop' call; the 
actual question would be - why it doesn't work when it is mentioned in the 
MySQL reference manual?
2. how to (auto) restart the instances after a server restart? do I 
need to write my own script for this or is there anything available which I'm 
not aware of?
If you have resolved these issues, please let me know.
 
 
Best Regards,
Nitin