Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flora Case Distribution data on plants in Cleveland area are held on a simple database. Basically records of names and locations. plant data held is similar.

Similar presentations


Presentation on theme: "Flora Case Distribution data on plants in Cleveland area are held on a simple database. Basically records of names and locations. plant data held is similar."— Presentation transcript:

1 Flora Case Distribution data on plants in Cleveland area are held on a simple database. Basically records of names and locations. plant data held is similar to http://scm- intranet.tees.ac.uk/users/u0000667/cweb2 003/slides/flora_plant.ppt

2 reference_nogrid1km 101NZ640220 102NZ420220 106NZ480340 107NZ440160 107NZ560240 108NZ400140 108NZ400220 108NZ440140 Distribution data is held as (tetrad records-column misnamed)-

3 A low cost mapping system exists. However, it is not capable of reading data directly from the database and requires data in specific formats. SQL queries or transactions are required which produce the following data which can exported into the mapping system- Species Data A species list consisting of a reference number and a species naming information. e.g. 2 Nymphaea alba White Water Lily 11 Pseudofumaria lutea Yellow Corydalis 3 Nuphar lutea Yellow Water Lily

4 Boundary Data (of map) A list of eight figure map references defining the site boundary terminated by -1 NZ489367 NZ485367 NZ483364 NZ480368 Species data easily generated using SQL using simple query. Boundary data are base table data i.e. held in database.

5 Species Distribution Data A distribution list consisting of a list of species reference number and map references, terminated by –1. e.g. 2 NZ400140 NZ480140 NZ520120 NZ580140 3 NZ440220 NZ480140 NZ500140 NZ520120 NZ580140 Requires a transaction to generate this data

6 Blechnum spicant Hard Fern This data is used by the mapping system to produce output that looks like the following-

7 Create Procedure distdmapdata /* ( @parameter1 datatype = default value, @parameter2 datatype OUTPUT ) */ As /* set nocount on */ declare @x int select @x=1 while @x<342 begin insert into dmapdatadist values(@x) insert into dmapdatadist select grid1km from record where reference_no =@x insert into dmapdatadist values('-1') select @x=@x+1 end return Creates a table with one column. Contains the mapping data which can them be exported to the mapping system.

8 Alter Procedure distdmapdata_rareplants /* (@parameter1 datatype = default value, @parameter2 datatype OUTPUT) */ As /* set nocount on */ declare @x int select @x=1 while @x<342 begin if exists(select grid1km from record,plant where record.reference_no=plant.reference_no and record.reference_no =@x and rare_or_scarce='y' ) begin insert into dmapdatadist values(@x) insert into dmapdatadist select grid1km from record,plant where record.reference_no=plant.reference_no and record.reference_no =@x and rare_or_scarce='y' insert into dmapdatadist values('-1') end select @x=@x+1 end return


Download ppt "Flora Case Distribution data on plants in Cleveland area are held on a simple database. Basically records of names and locations. plant data held is similar."

Similar presentations


Ads by Google