cloudy

Author Topic: Custom WD MYSQL  (Read 6068 times)

0 Members and 1 Guest are viewing this topic.

Offline Weather Display

  • Posts: 65,566
Custom WD MYSQL
« on: June 06, 2007, 09:27:33 PM »
I am starting on this project
see screen shot
i.e you enter the custom tag and then tick what type of data it is and then also enter the corresponding table name

just looking for feedback...
i have 20 data points...is more needed?
i will have it that if you dont fill in the ones at the end not needed, then they will not be used
screen shot:




Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Custom WD MYSQL
« Reply #1 on: June 06, 2007, 09:45:52 PM »
Brian are you intending this to replace the standard MySQL table, or it this in addition to the existing one?

My idea is to make this replace the existing MySQL function but set this up to use all the fields you currently have for MySQL so anyone wanting to store data in the database who is happy with the current schema simply uses the default on this new function and ends up with the original data format. However those who wish to change the schema then alter or remove the fields here.

Why have two to support. Just my thoughts on this....

Stuart

Offline Weather Display

  • Posts: 65,566
Re: Custom WD MYSQL
« Reply #2 on: June 06, 2007, 09:50:48 PM »
its built into the original wdmysql.exe, i.e a new setup screen via a custom setup button, but replaces the standard mysql table, as an option
the whole idea is you build up your very own customised mysql data base and you have adding to it what you want, and only that data
thats the way I am going to develop it

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Custom WD MYSQL
« Reply #3 on: June 06, 2007, 10:12:35 PM »
i have 20 data points...is more needed?

Well, you know that as soon as you release it someone will want 21  :lol:

Online TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,865
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Custom WD MYSQL
« Reply #4 on: June 06, 2007, 10:37:57 PM »

Rather than having 20 input sets of boxes, wouldn't it be easier to just have a simple menu that lets you edit/add/delete columns.

[ADD NEW COLUMN]
[LIST EXISTING COLUMNS]
[EDIT COLUMN]
[GENERATE SAVE TABLE]

When Inserting:

     Data Column X: _______________
     Type:          __ Float
                    __ Int
                    __ Smallint
                    ...
     Data Name      _______________

     [ADD] [CANCEL]

When Listing:

   Col#   Data         Type         Data Name
   01      xxxxxxx         Int             Xxxxxxxx
   02      xxxxxxx         Text            Xxxxxxxx
   03      xxxxxxx         Int             Xxxxxxxx
   04      xxxxxxx         SmallInt        Xxxxxxxx

When you edit or delete

   Edit Which Column: ___

or

   Delete Which Column: ____



When you edit, it just shows you the list of current columns with numbers and you enter in the number you want to edit.  When they are done, the hit Generate Save Table... and it saves it and does whatever is needed.

When they reenter the subsytem, they get the same menu with all the currently defined columns already in it to add/change or delete as needed.  You could start out with your current MySQL table schema setup as default.

Would make the screen easier to deal with and eliminates any arbitrary limits need to assert.

Put the max number of columns at 30 or so.

All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline Chipperdog

  • Posts: 307
  • Reading, PA USA
    • Chipperdog Weather
Re: Custom WD MYSQL
« Reply #5 on: June 07, 2007, 12:39:17 AM »
Brian - This looks great!  :D

The UI isn't that important to me just the end result.  The user should be setting up the table only once anyway or maybe a few times if they add more sensors.  I would say go with whatever is easier for you to implement and keep the maximum columns to around 30 as suggested by krelvinaz.  The original WDMySQL has 60+ columns and this is definitely too many in my opinion.

     

Offline FrankP999

  • Posts: 1,131
  • Macon, Georgia USA
    • My Weather
Re: Custom WD MYSQL
« Reply #6 on: June 07, 2007, 03:24:39 AM »
I like this a lot! :D I stopped using the MySQL option because I was not using many of the columns. This should be much quicker to upload and more effecient.

Frank

Offline Breitling

  • Luis
  • Posts: 1,162
  • NW Spain
    • Meteo Aerolugo
Re: Custom WD MYSQL
« Reply #7 on: June 07, 2007, 06:01:53 AM »
I like it !!

Is it problematic to have as many fields as you want in the table?  Surely we won't need more than 30 or 40, but as Nico says someone will want one more in three days :) . So oversize it a bit to avoid further work.

Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Custom WD MYSQL
« Reply #8 on: June 07, 2007, 06:07:10 AM »
I like krelvinaz idea however I have a concern that 30 columns will not be enough, currently the table has about 64 and if I remove only those columns which I cannot use because I dont have that station type it comes down to 47, so I would suggest say 50 as a limit. Better to have a higher limit rather than have to change it later. The majority of the data left after removing battery data and some of the extra temps etc would be valid for most users I believe. If we only have a limit of 30 columns people will be forced to leave out otherwise potentially useful data.

My other concern is how do we switch over because those of us currently using MySQL will have to build the required table from scratch and test it before going live with a new database. This is likely to mean that unless you ship the capability to run both versions in parallel we will have a gap of at least a few hours in our data.

Stuart

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Custom WD MYSQL
« Reply #9 on: June 07, 2007, 12:11:13 PM »
Stuart: How many of those many columns are actually derived from other columns? e.g do you have temp, rh and dew point? Once you start down the database path wouldn't you want to avoid redundancy like that?

Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Custom WD MYSQL
« Reply #10 on: June 07, 2007, 04:22:42 PM »
Stuart: How many of those many columns are actually derived from other columns? e.g do you have temp, rh and dew point? Once you start down the database path wouldn't you want to avoid redundancy like that?

I guess there are a few columns which could be calculated but I'm not sure that there are that many. I'm also aware that we have a chance here to get the design right for the most people. I am pretty sure that as soon as we have a lower limit on the number of columns someone will want it increased. I think 50 is a sensible limit as it will allow for people who dont want to be bothered calculating values to store them as that work has been done by WD already. There are also a few I though all along should have been there anyway like the solar values (w/m2 and % and others). I'm just not convinced 30 is the right number. My initial look counted 64 (I think) and 17 that could be removed (maybe 19) so say that leaves 45, then I still need to add at least 3 or 4 for solar so you easily get up towards 50. I just think set it too low and Brian will be asked in days to up the count!

Stuart

Offline Weather Display

  • Posts: 65,566
Re: Custom WD MYSQL
« Reply #11 on: June 07, 2007, 11:36:33 PM »
try it out for size (up to 50 positions available)
(new WeatherD.exe and new wdmysql.exe needed)
http://www.weather-display.com/downloadfiles/WeatherD.zip

note, if you use say the %time% and %date% custom tags.....for time and date...then instead just enter say time and date as the tags...but as long as you have set the data type to be time and date respectively, then the time and date at the point of data update to the database will be used (gets away from probem of am/pm stuffing up the space delimited file)
some info:
custommysqlin.txt, in the clientraw folder location (default is the webfiles folder)
is the file with the custom tags, updated auto by the wdmysql program after click on OK in the custom setup, and is based on the custom tags setup
custommysqlout.txt is the file used with the custom tags parsed into data

good luck
(make sure you set up your table to match the datanames and data types setup)

« Last Edit: June 08, 2007, 05:20:45 PM by windy »

Offline chinookzone

  • Posts: 209
  • Calgary, Alberta Canada
    • South East Calgary Weather
Re: Custom WD MYSQL
« Reply #12 on: June 09, 2007, 12:16:00 AM »
Could someone clue me in as to exactly what this is all about?  :? I probably don't need it if I don't know what it is, but I'm curious!

Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Custom WD MYSQL
« Reply #13 on: June 09, 2007, 05:56:35 AM »
Could someone clue me in as to exactly what this is all about?  :? I probably don't need it if I don't know what it is, but I'm curious!

You are almost cetainly right that now you dont need it. MySQL is a database and WD can write its data into a database which you can use to do all sorts of things like trend analysis, graph creation, web page generation etc. You name it you can probably do it with MySQL.

The problem with the current way this works is that there is a fix set of data which is written to the database, a kind of one size fits all, but this means that quite a lot of the data redundant for certain weather station types - for me 25% is not needed. Also some of the data currently being written can be derived from other values being written so that potentially makes other stuff redundant.

Now what Brian is doing here is allowing the user to determine exactly what data they want in the database so that 100% of the data is worthwhile, this is likely to make the database smaller and faster to both create and use.

Hope this helps...

Stuart

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
    • Weather at Silkeborg, Denmark
Re: Custom WD MYSQL
« Reply #14 on: June 09, 2007, 08:37:54 AM »
Hi

The new custom WD MySql - will that overwrite the old way ?

In other words - im using the WD standard MySql - what do I have to do now?

Best regards,

JWWD