| This is an agent to use with the IBL tutorial Part 4 -- Version 20060705 ||||||||||||||||||||||||| Using existing SQL tables |||||||||||||||||||||||||||||||||||||||||||| for some-disease in the country with code some-country-code the occurrence is some-percent1 the code that-country-code corresponds to some-country for some-haplotype in that-country the occurrence is some-percent2 ----------------------------------------------------------------------------------------------- 6. in that-country the occurrences are that-disease that-percent1 and that-haplotype that-percent2 url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:Disease port:3306 id:mysql password:mysqlmysql ------------------------------------------------------------------------------------------------------------------ for this-disease in the country with code this-country-code the occurrence is this-percent url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:Countrycode port:3306 id:mysql password:mysqlmysql --------------------------------------------------------------------------------------------------------------------- the code this-countrycode corresponds to this-country url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:Haplotype port:3306 id:mysql password:mysqlmysql -------------------------------------------------------------------------------------------------------------------- for this-haplotype in this-country the occurrence is this-percent url:www.reengineeringllc.com dbms:mysql dbname:mysql tablename:Hapresult port:3306 id:mysql password:mysqlmysql ----------------------------------------------------------------------------------------------------- 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 6. in some-country the occurrences are some-disease some-percent1 and some-haplotype some-percent2 add : 8. SAVED RESULT in that-country the occurrences are that-disease that-percent1 and that-haplotype that-percent2 ------------------------------------------------------------------------------------------------------------------- 7. ADD SAVED RESULT in that-country the occurrences are that-disease that-percent1 and that-haplotype that-percent2 count : 7. ADD SAVED RESULT in some-country the occurrences are some-disease some-percent1 and some-haplotype some-percent2 = a-number ------------------------------------------------------------------------------------------------------------------------------- 10. ADD that-number rows to the SAVED RESULT TABLE 8. SAVED RESULT in some-country the occurrences are some-disease some-percent1 and some-haplotype some-percent2 del : 8. SAVED RESULT in that-country the occurrences are that-disease that-percent1 and that-haplotype that-percent2 ------------------------------------------------------------------------------------------------------------------------ 9. DELETE SAVED RESULT ROWS in that-country the occurrences are that-disease that-percent1 and that-haplotype that-percent2 ||||||||||||||||||||||||| Creating and Dropping SQL tables |||||||||||||||||||||||||||||||||||||||||||| some-table should be in tablespace some-tablespace that-table should have a column some-colnumber some-colname some-coltype create sql table : that-table that-colnumber that-colname that-coltype that-tablespace ------------------------------------------------------------------------------------- 2. CREATE a table with heading -- that-table -- in tablespace that-tablespace that-colnumber that-colname that-coltype some-table should have a column some-number some-name some-type drop sql table : that-table --------------------------------------------------------------- 1. REMOVE the the sql table -- that-table this-table should be in tablespace this-tablespace ======================================================================================================= for this-disease in the country with code this-country-code the occurrence is this-percent users the code this-country-code corresponds to this-country users for this-haplotype in this-country the occurrence is this-percent users 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 users this-table should have a column this-number this-name this-type ============================================================================================================================ for this-disease in the country with code this-country-code the occurrence is this-percent 1 Disease CHAR(30) for this-disease in the country with code this-country-code the occurrence is this-percent 2 CountryCode CHAR(3) for this-disease in the country with code this-country-code the occurrence is this-percent 3 Percent FLOAT(30) the code this-country-code corresponds to this-country 1 Countrycode CHAR(3) the code this-country-code corresponds to this-country 2 Country CHAR(50) for this-haplotype in this-country the occurrence is this-percent 1 Haplotype INT(8) for this-haplotype in this-country the occurrence is this-percent 2 Country CHAR(30) for this-haplotype in this-country the occurrence is this-percent 3 Percent FLOAT(30) 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 1 Country CHAR(30) 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 2 Disease CHAR(30) 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 3 DisPercent FLOAT(30) 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 4 Haplotype CHAR(30) 8. SAVED RESULT in this-country the occurrences are this-disease this-percent1 and this-haplotype this-percent2 5 HapPercent CHAR(30) ||||||||||||||||||||||||| Adding data to SQL tables |||||||||||||||||||||||||||||||||||||||||||| table Disease should contain an entry this-disease this-country-code this-percent ================================================================================= Sickle-cell DE 0.0002 Sickle-cell IS 0.000001 Sickle-cell JP 0.00001 Sickle-cell IN 0.00008 Phenylketonuria DE 0.00012 Phenylketonuria IS 0.00161 Phenylketonuria JP 0.00012 Phenylketonuria IN 0.00011 Porphyria DE 0.000022 Porphyria IS 0.000031 Porphyria JP 0.000021 Porphyria IN 0.000035 table Haplotype should contain an entry this-haplotype this-country this-percent ================================================================================ 1 Germany 78 2 Germany 10 3 Germany 30 1 Iceland 65 2 Iceland 74 3 Iceland 32 1 Japan 3 2 Japan 13 3 Japan 26 1 India 44 2 India 9 3 India 25 table Countrycode should contain an entry this-country-code corresponds to this-country ======================================================================================= DE Germany IN India IS Iceland JP Japan table Haplotype should contain an entry some-haplotype some-country some-percent add : for that-haplotype in that-country the occurrence is that-percent ------------------------------------------------------------------------------- 3. ADD for that-haplotype in that-country the occurrence is that-percent table Countrycode should contain an entry some-country-code corresponds to some-country add : the code that-country-code corresponds to that-country ------------------------------------------------------------------------------------- 4. ADD the entry that-country-code corresponds to that-country table Disease should contain an entry some-disease some-country-code some-percent add : for that-disease in the country with code that-country-code the occurrence is that-percent ---------------------------------------------------------------------------------------------- 5. ADD for that-disease in the country with code that-country-code the occurrence is that-percent