虎克的博客

Enthusiasm Biogeography-Biodiversity Informatics-Data Sciences

最完整的世界数字地图刚刚发布

| Comments

363796main_pia12092-516

喜马拉雅山区不丹地区的冰川

global digital elevation map

 

This image was created by processing and stereo-correlating the 1.3 million-scene ASTER archive of optical images.
› Full image and caption/related images PASADENA, Calif. – NASA and Japan released a new digital topographic map of Earth Monday that covers more of our planet than ever before. The map was produced with detailed measurements from NASA’s Terra spacecraft.
The new global digital elevation model of Earth was created from nearly 1.3 million individual stereo-pair images collected by the Japanese Advanced Spaceborne Thermal Emission and Reflection Radiometer, or Aster, instrument aboard Terra. NASA and Japan’s Ministry of Economy, Trade and Industry, known as METI, developed the data set. It is available online to users everywhere at no cost.
"This is the most complete, consistent global digital elevation data yet made available to the world," said Woody Turner, Aster program scientist at NASA Headquarters in Washington. "This unique global set of data will serve users and researchers from a wide array of disciplines that need elevation and terrain information."
According to Mike Abrams, Aster science team leader at NASA’s Jet Propulsion Laboratory in Pasadena, Calif., the new topographic information will be of value throughout the Earth sciences and has many practical applications. "Aster’s accurate topographic data will be used for engineering, energy exploration, conserving natural resources, environmental management, public works design, firefighting, recreation, geology and city planning, to name just a few areas," Abrams said.
Previously, the most complete topographic set of data publicly available was from NASA’s Shuttle Radar Topography Mission. That mission mapped 80 percent of Earth’s landmass, between 60 degrees north latitude and 57 degrees south. The new Aster data expand coverage to 99 percent, from 83 degrees north latitude and 83 degrees south. Each elevation measurement point in the new data is 30 meters (98 feet) apart.
"The Aster data fill in many of the voids in the shuttle mission’s data, such as in very steep terrains and in some deserts," said Michael Kobrick, Shuttle Radar Topography Mission project scientist at JPL. "NASA is working to combine the Aster data with that of the Shuttle Radar Topography Mission and other sources to produce an even better global topographic map."
NASA and METI are jointly contributing the Aster topographic data to the Group on Earth Observations, an international partnership headquartered at the World Meteorological Organization in Geneva, Switzerland, for use in its Global Earth Observation System of Systems. This "system of systems" is a collaborative, international effort to share and integrate Earth observation data from many different instruments and systems to help monitor and forecast global environmental changes.
NASA, METI and the U.S. Geological Survey validated the data, with support from the U.S. National Geospatial-Intelligence Agency and other collaborators. The data will be distributed by NASA’s Land Processes Distributed Active Archive Center at the U.S. Geological Survey’s Earth Resources Observation and Science Data Center in Sioux Falls, S.D., and by METI’s Earth Remote Sensing Data Analysis Center in Tokyo.
Aster is one of five Earth-observing instruments launched on Terra in December 1999. Aster acquires images from the visible to the thermal infrared wavelength region, with spatial resolutions ranging from about 15 to 90 meters (50 to 300 feet). A joint science team from the U.S. and Japan validates and calibrates the instrument and data products. The U.S. science team is located at JPL.
For visualizations of the new Aster topographic data, visit: http://www.nasa.gov/topics/earth/features/20090629.html .
Data users can download the Aster global digital elevation model at: https://wist.echo.nasa.gov/~wist/api/imswelcome and http://www.gdem.aster.ersdac.or.jp .
For more information about NASA and agency programs, visit: http://www.nasa.gov .
JPL is managed for NASA by the California Institute of Technology in Pasadena.

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/07/02/%E6%9C%80%E5%AE%8C%E6%95%B4%E7%9A%84%E4%B8%96%E7%95%8C%E6%95%B0%E5%AD%97%E5%9C%B0%E5%9B%BE%E5%88%9A%E5%88%9A%E5%8F%91%E5%B8%83/'>http://Apiaceae.github.io/blog/2009/07/02/%E6%9C%80%E5%AE%8C%E6%95%B4%E7%9A%84%E4%B8%96%E7%95%8C%E6%95%B0%E5%AD%97%E5%9C%B0%E5%9B%BE%E5%88%9A%E5%88%9A%E5%8F%91%E5%B8%83/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

推荐两部生物地理学新书

| Comments

    进化生物地理学:整合方法的案例研究

    clip_image001

    http://www.amazon.com/Evolutionary-Biogeography-Integrative-Approach-Studies/dp/0231143788/ref=pd_sim_b_1#reader

页数: 304 页

出版社和时间: Columbia University Press (December 3, 2008)

源文档 <http://www.amazon.com/Evolutionary-Biogeography-Integrative-Approach-Studies/dp/0231143788/ref=pd_sim_b_1>

书评和内容简介

“进化生物地理学这本书在覆盖面和知识深度上超过了目前为止的其它生物地理学教科书,它是生物地理学研究中卓越的贡献。”

–John Robert Grehan, Buffalo Museum of Science

作者Juan J. Morrone不仅仅是局限于单一性方法,而是对进化生物地理学的广泛发展、理论进行了全面的阐述。进化生物地理学使用分布、系统发育、分子和化石数据来评估产生目前生物格局的历史变化。泛生物地理学、特有性的简约性分析、分支生物地理学和谱系生物地理学是最近才出现的新方法。许多研究者认为它们代表着不同的研究阵营,但是本书的作者则想我们展示了在进化生物地理学分析中,它们是如何在不同的研究步骤中提出问题并应用相应的方法进行解决的。泛生物地理学和特有性的简约性分析在识别生物学成分或特有地区是时是非常有用的。分支生物地理学使用系统发育的数据来决定这些生物成分间的关系。化石、谱系格局和分子钟证据可以整合进来用于识别cenocrons。最后,已知的地质学知识能够帮助我们建立地理生物相互关系的背景,来解释所分析地区间的相互关系以及生物学成分和cenocrons在该地区是如何演化的。作者比较了这些生物地理学的方法,使用了案例研究来说明如何使用这些方法来回答相关的问题。

源文档 <http://www.amazon.com/Evolutionary-Biogeography-Integrative-Approach-Studies/dp/0231143788/ref=pd_sim_b_1>

系统学和生物地理学基础

    clip_image002

    http://www.amazon.com/Foundations-Systematics-Biogeography-David-Williams/dp/0387727280/ref=pd_bxgy_b_text_c/179-7318701-5678419#reader

    书评:

    使用历史性的方法,伦敦自然历史博物馆的Williams和Ebach (Freie Universität, Berlin)阐明了系统学家哲学理论的差异性。本书的作者对许多现存的系统学和生物地理学概念和解释提出类非常激烈的讨论。他们的目的是激发系统发育和生物地理学研究者对研究理论基础和实践的深刻反思和讨论。

    内容简介

    本书主要聚焦在一些系统学和生物地理学原创性研究思想的形成和发展。通过收集和整理Goethe, Agassiz, Geoffroy St. Hilaire, Owen, Naef, Zangerl和Nelson等著名学者的经典文学,它追溯了自19世纪以来同源性、分类等相关概念的发展。另外,作者还对目前比较生物学的研究趋势和现状进行了质疑,尤其是对这门学科的定位和研究目的。为了提醒将来的研究者,作者专门强调了系统学和生物地理学三个方面的知识缺陷:生物分类和它的机制性解释是相互分离的;许多同源性的概念是前达尔文时期的概念;所有比较生物学的基础是关系的概念,相似性和谱系发生假说对比较生物学研究都不是完全的认识。

页码: 310页

出版社和时间: Springer; 1 edition (November 15, 2007)

源文档 <http://www.amazon.com/Foundations-Systematics-Biogeography-David-Williams/dp/0387727280/ref=pd_bxgy_b_text_c/179-7318701-5678419>

源文档 <http://www.amazon.com/Foundations-Systematics-Biogeography-David-Williams/dp/0387727280/ref=pd_bxgy_b_text_c/179-7318701-5678419>

 

3生物地理学前沿:自然地理的新方向

 

 

 

Mark V. Lomolino Lawrence R. Heaney编著

2004

436页,96图版

书评

“Biogeography is still a young and dynamic integrative discipline, and this volume reflects the excitement and promise of new challenges and opportunities. … I recommend anyone who thinks they might be a biogeographer at heart, if not in title, to read this book. It should be required reading for every graduate student in a biogeography-related program and at least consulted by any conservation-minded person with a solid background in science.”

—Susan L. Woodward, The Quarterly Review of Biology

“Anyone interested in biogeography on a local or global scale will find this timely and provocative reading.”

Northeastern Naturalist

“For anyone who wishes to stretch their understanding of how ecosystems have come to be where they are today, for anyone challenged with trying to make decisions about resources and their future sustainability, this volume, with its 51-page list of referenced works, is an invaluable reference.”

—Brian McLaren, The Forestry Chronicle

 

分类群名称处理器项目taxon-name-processing

| Comments

2009-06-25_00121

由生命大百科全书网络Encyclopedia of Life和全球生物多样性咨询Global Biodiversity Information Facility两大组织支持发起的处理分类群名称的技术性项目现在在Google Code上建立了项目的工作平台。主要目的是提供出来分类学名称数据的捕获、加工和处理的工具、网络服务、技术术语、测试数据和文档等资源。

项目的地址:http://code.google.com/p/taxon-name-processing/

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/06/25/%E5%88%86%E7%B1%BB%E7%BE%A4%E5%90%8D%E7%A7%B0%E5%A4%84%E7%90%86%E5%99%A8%E9%A1%B9%E7%9B%AEtaxon-name-processing/'>http://Apiaceae.github.io/blog/2009/06/25/%E5%88%86%E7%B1%BB%E7%BE%A4%E5%90%8D%E7%A7%B0%E5%A4%84%E7%90%86%E5%99%A8%E9%A1%B9%E7%9B%AEtaxon-name-processing/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

地中海气候带生物区系的起源和演化—整合性研究的展望

| Comments

2009-06-24_154518

该会议由瑞士苏黎世大学主办,主要目的是来讨论在多学科手段综合研究框架下,如何认识和了解世界5个地中海式气候区域(地中海盆地、南非、澳大利亚、智利和加利福尼亚)的生物多样性问题。因为这些地区不仅仅因为它们相对独特的气候特征,而且也是世界生物多样性的重要热点地区。

出席会议的有150多名与会者,他们来自18个国家,包括欧洲,美洲和澳大利亚

这次会议的主题内容分为四个主要部分组成:方法、大进化、小进化和生态。通过整合多学科,包括进化生物学,系统学,生态学,古生物学,古气候和古地理学的证据,与会者共同探讨了的地中海式气候条件下生物多样性的产生和演化过程等问题。

会议的详细内容可以通过http://www.systbot.unizh.ch/static/mediterranean来了解。包括大会方案,摘要, PDF文件和地中海区系的典型植物和景观图片等。

为此会议的总结,Journal of Biogeography与今年专辑刊登了相关的学术论文共15篇。

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/06/25/%E5%9C%B0%E4%B8%AD%E6%B5%B7%E6%B0%94%E5%80%99%E5%B8%A6%E7%94%9F%E7%89%A9%E5%8C%BA%E7%B3%BB%E7%9A%84%E8%B5%B7%E6%BA%90%E5%92%8C%E6%BC%94%E5%8C%96%E2%80%94%E6%95%B4%E5%90%88%E6%80%A7%E7%A0%94%E7%A9%B6%E7%9A%84%E5%B1%95%E6%9C%9B/'>http://Apiaceae.github.io/blog/2009/06/25/%E5%9C%B0%E4%B8%AD%E6%B5%B7%E6%B0%94%E5%80%99%E5%B8%A6%E7%94%9F%E7%89%A9%E5%8C%BA%E7%B3%BB%E7%9A%84%E8%B5%B7%E6%BA%90%E5%92%8C%E6%BC%94%E5%8C%96%E2%80%94%E6%95%B4%E5%90%88%E6%80%A7%E7%A0%94%E7%A9%B6%E7%9A%84%E5%B1%95%E6%9C%9B/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

ExtJS登录界面

| Comments

效果图

2009-06-13_00084

2009-06-13_00085

Login.js代码

/// <reference path="vswd-ext_2.0.2.js" />

Ext.onReady(function() {

Ext.QuickTips.init();

<span style="color: green">// Create a variable to hold our EXT Form Panel. 
// Assign various config options as seen.     
</span><span style="color: blue">var </span>login = <span style="color: blue">new </span>Ext.FormPanel({
    labelWidth: 80,
    url: <span style="color: #a31515">'Default.aspx'</span>,
    frame: <span style="color: blue">true</span>,
    title: <span style="color: #a31515">'请登陆'</span>,
    defaultType: <span style="color: #a31515">'textfield'</span>,
    monitorValid: <span style="color: blue">true</span>,
    <span style="color: green">// Specific attributes for the text fields for username / password. 
    // The &quot;name&quot; attribute defines the name of variables sent to the server.
    </span>items: [{
        fieldLabel: <span style="color: #a31515">'用户名'</span>,
        name: <span style="color: #a31515">'loginUsername'</span>,
        allowBlank: <span style="color: blue">false
    </span>}, {
        fieldLabel: <span style="color: #a31515">'密码'</span>,
        name: <span style="color: #a31515">'loginPassword'</span>,
        inputType: <span style="color: #a31515">'password'</span>,
        allowBlank: <span style="color: blue">false

}],

        <span style="color: green">// All the magic happens after the user clicks the button     
        </span>buttons: [{
            text: <span style="color: #a31515">'登陆'</span>,
            formBind: <span style="color: blue">true</span>,
            <span style="color: green">// Function that fires when user clicks the button 
            </span>handler: <span style="color: blue">function</span>() {
                login.getForm().submit({
                    method: <span style="color: #a31515">'POST'</span>,
                    waitTitle: <span style="color: #a31515">'连接服务器'</span>,
                    waitMsg: <span style="color: #a31515">'传送数据...'</span>,

                    <span style="color: green">// Functions that fire (success or failure) when the server responds. 
                    // The one that executes is determined by the 
                    // response that comes from login.asp as seen below. The server would 
                    // actually respond with valid JSON, 
                    // something like: response.write &quot;{ success: true}&quot; or 
                    // response.write &quot;{ success: false, errors: { reason: 'Login failed. Try again.' }}&quot; 
                    // depending on the logic contained within your server script.
                    // If a success occurs, the user is notified with an alert messagebox, 
                    // and when they click &quot;OK&quot;, they are redirected to whatever page
                    // you define as redirect. 

                    </span>success: <span style="color: blue">function</span>() {
                        Ext.Msg.alert(<span style="color: #a31515">'Status'</span>, <span style="color: #a31515">'Login Successful!'</span>, <span style="color: blue">function</span>(btn, text) {
                            <span style="color: blue">if </span>(btn == <span style="color: #a31515">'ok'</span>) {
                                <span style="color: blue">var </span>redirect = <span style="color: #a31515">'Default.aspx'</span>;
                                window.location = redirect;
                            }
                        });
                    },

                    <span style="color: green">// Failure function, see comment above re: success and failure. 
                    // 如果登录失败,弹出对话框。 

                    </span>failure: <span style="color: blue">function</span>(form, action) {
                        <span style="color: blue">if </span>(action.failureType == <span style="color: #a31515">'server'</span>) {
                            obj = Ext.util.JSON.decode(action.response.responseText);
                            Ext.Msg.alert(<span style="color: #a31515">'登陆失败!'</span>, obj.errors.reason);
                        } <span style="color: blue">else </span>{
                            Ext.Msg.alert(<span style="color: #a31515">'Warning!'</span>, <span style="color: #a31515">'Authentication server is unreachable : ' </span>+ action.response.responseText);
                        }
                        login.getForm().reset();
                    }
                });
            }

}]

        });


        <span style="color: green">// This just creates a window to wrap the login form. 
        // The login object is passed to the items collection.       
        </span><span style="color: blue">var </span>win = <span style="color: blue">new </span>Ext.Window({
            layout: <span style="color: #a31515">'fit'</span>,
            width: 300,
            height: 150,
            closable: <span style="color: blue">false</span>,
            resizable: <span style="color: blue">false</span>,
            plain: <span style="color: blue">true</span>,
            border: <span style="color: blue">false</span>,
            items: [login]
        });
        win.show();
    });</pre>

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/06/14/ExtJS%E7%99%BB%E5%BD%95%E7%95%8C%E9%9D%A2/'>http://Apiaceae.github.io/blog/2009/06/14/ExtJS%E7%99%BB%E5%BD%95%E7%95%8C%E9%9D%A2/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

数据建模知识点

| Comments

在PowerDesigner的概念模型中,实体之间的关系是非常重要的,也决定了从概念模型转化到物理模型时的表现形式,所以有必须深究其中的相关设置。做数据库重要的就是表与表之间的关系,而这个关系是连接所有数据库系统的纽带,所以即使我们不用PD,也应该重视表与表之间的关系。这也是关系型数据库的由来。

PD中的表与表之间的关系有四种,分别是one-one(一对一),one-many(一对多),many-one(多对一),many-many(多对多)。在实际中使用得最多的只有前面两种,而多对一和一对多其实没有什么区别,只是二者关系的反向描述,所以其可以看成是一种类型。而多对多在实际的数据库设计中也是时有出现的,这种情况下,我们一般不直接处理多对多的关系,而是通过一种技巧,将多对多转化为多对一,和一对多的关系,这样可以简化数据库关系的复杂性。将多对多转化为多对一,再一对多意思是通过提供一个关联关系表,来使多对多的关系表与该关联关系表发生关系,而不让其直接发生多对多的关系,这样就可以简化这样的关系。前面文章中已经说明如何创建这种关联表了。这里也就不再说多对多的关系。后面只重点说明一对一,一对多的关系。

在CDM中,实体之间的关系更符合现实情况一些,以一对多的关系来说,如果一个实体对应多个实体,通常含有“包含,拥有”等这样的意思在里面。比如一个部门拥有多个员工,一个企业拥有多个部门等。而如果多个实体对应一个实体,则通常含有“属于,包含于”等这样的意思。比如多个员工属于一个部门,多个部门包含于一个企业等。在PDM中就很具体了,且与实际的有些区别了,这主要是由于在软件的实现角度上的体现,比如一对多的关系,比如T1与T2的关系为T1一对多个T2,在PDM中,通常表现在T2中有一个外键,用来存储T1的主键,这样就叫一对多,而这样的表现与实际上具有一定的差别。当然这是没有什么问题的,因为PDM才是我们真正在软件实现时所采用的方式。我只是想说的是CDM中这种关系的描述,可能更和实际情况接近一些,也就更加容易明白一点。

好了,下面分别说明一下一对多和一对一的关系详细说明:

1.对于一对多的说明

当两个实体需要进行一对多的关联时(比如T1与T2的关系为T1一对多个T2,T1和T2为两个实体),我们通过Relationship,从T1拉至T2时,二者关系就建立起来了。默认情况下就是个一对多的关系,即T1为1,T2为多。

双击拉的关系线,则弹出二者关系描述的对话框,我们就可以在这个弹出的属性对话框里进行我们所需要的设置了。在弹出来的默认属性为General属性选项。我们可以在这个属性页里面修改关系名称以及对这个关系的描述等。点击Cardinalities属性页,在上面默认显示的就是一对多的关系,我们现在是描述一对多的关系,所以不修改它。在关系下面有个Dominant role,这个右边有个下拉框,不过是被置灰了,不可操作,这里先不管,后面在说一对一时再说说这里。

在T1 to T2的内容里面,有个Role name,在其右边有个输入框,可以输入T1表的角色名字,这里就可以用前面提到的比如“拥有,包含”等这样的内容,可以用来说明T1表的职能。在Role name下面的Dependent默认是置成灰色,意即不可操作,这里我们就不管了。然后是Mandatory,这个是什么意思呢?这个是否选择决定了某个东西是否为空。是什么东西呢?指的是和本实体发生关系的对方实体的主键在本实体的外键字段是否为空。比如现在有种情况是T1中某个字段,如par1,该字段为外键,它将存储T2中的主键,则如果Mandatory被选中,则par1不为空,意即它必须存储某一个T2的值,而如果不选上,则表示该字段值可以为空。在现在的情况下T1与T2是一对多的关系,我们知道在PDM中,出现的情况是T2中会生成一个外键,用来存储T1表的主键,而T1表不会有任何字段来存储T2的主键 ,所以这个Mandatory是否被选择上,不会对关系造成任何影响,所以这里我们就不用管它了。当然,我们从实际的描述中,可以这样来说明这个值的选取相关的情况,比如现在T1指的是部门,而T2指的是员工,当你选择了该值,则在后面的Cardinality中会变成1,n,即如果选择这个值,则表示一个部门至少有一个员工,而如果不选,则表示一个部门至少有0至n个员工,就这个区别,因为为一对多,T1表中不会存储T2表中的主键,即使你选择了Cardinality,用于说明是部门至少含有1个员工,但是,T2表此时仍为空,没有任何员工,也不会出现问题的(这是因为一对多这个关系,导致T1表中不会有T2的任何相关信息造成的,当然在一对一的关系中,则不一样的,后面会说到)。

现在再说说T2到T1的内容里面的东西,其中的role name仍可以加入你所描述的T2的角色职责,比如“属于,包含于”等。在其下面,我们发现Dependent没有置灰了,是可以勾选的。我们先不管它,先趁热把Mandatory再说清楚点,此时由于我们已经知道T2表中会含有T1的主键的了,因为一对多的关系,则在生成的T2表时,会生成一个外键,用来单独存储T1的主键的,现在有个问题出现了,就是T2的存在是否依赖于T1,即说白一点就是一个员工是否一定要属于某一个部门?如果你的数据库系统中要求一定属于,那么你就把Mandatory选择上。反之,如果你认为新来的员工还没有分配好部门,可以暂时不让其属于某一个部门,到后面在人为的选择某一个部门,那么你就可以不用选择上Mandatory了。Cardinality会根据你是否选择Mandatory来决定其值是0,1还是1,1,意思很明确,就是是否T2一定属于T1,即一个员工是否一定属于一个部门。为这进一步确认Mandatory是否选中对PDM的实际表现造成的影响,可以通过CDM转化为PDM,查看其中的外键字段是否允许为空就可以明确了,如果你选择了Mandatory,则在PDM中T2生成的外键中将不允许为空,即必须含有T1的某一主键,而如果不选择Mandatory,则在PDM中T2生成的外键是可以允许为空的。

好了,现在来说说Dependent的意思,如果其不选,则没有什么变化,如果其被选择中了,则会在PDM中对T2中生成的用于存储T1主键的那个外键(FK)将会成为T2的另外一个主键,这就是这个值的意思,如果你不需要T2中的外键同时成为主键,则不用选择该值。通常情况下,都不需要选择这个。

2.一对一的关系说明

在两个实体表中的关系中,如果一个表和另一个表是一对一的关系,这种一对一的关系有两种形式,以T1表和T2表为例。一种是T1中有个字段(外键)是T2表的主键,T2中有一个字段(外键)是T1表的主键,另一种情况是只有其中的一个表含有另一个表的主键,而另一个表不含有前一个表的主键。前面说的第一种情形是指两个实体互相感知,互相拥有对方的信息,另一种情况是指二者含有一定的依赖关系。某一个实体的存在依赖于另一个实体的存在。

相对来说,在软件领域中,第二种情形更常见一些,完全平等的两个实体在现实中存在的意义不大,毕竟社会是一个充满着各种联系的实体,实体之间存在的着一定的依赖关系,就象孩子依赖于父母,员工依赖于企业,当然存在着两个互相感知的实体,这样带来的一个好处是在查询时非常迅速。下面说一下一对一关系的某些属性的改变带来的变化。

当T1和T2实体建立好了关系之后,正如前面所言,默认情况下是个一对多的关系,我们这次就要改变这种关系了。在关系线的属性中,在Cardinalities属性页,我们将one-many修改为one-one,当我们选中one-one后,下面的Dominant role由原来的置灰不可操作状态变为可操作状态了。Dominant role的意思是占支配地位的角色,在其右边的下拉框中默认值为none,这里要求我们选择的是两个实体,谁占支配地位,谁占被支配地位。即谁支配谁。默认值中的none表示二者双方都不占支配地位,意即二者地位平等,则就是前面所述的第一种情况,即二者互相感知。这种情况下,在PDM中会发现T1表和T2表中都会生成一个外键,用于存储对方的主键。而下面的Dependent和Mandatory和前面描述一对多的关系时表现是一样的。这里就不再赘述了,只是需要注意的一点是如果你的关系是二者互相平等的话,在选择Mandatory中,不要将T1和T2都同时选择上,不然就会出现互斥现象,永远不成立。

现在我重点说一下关于第二种情形,现在假设我们需要T2中的外键来存储T1的主键,那么这种情况下谁是支配地位的角色呢?在Dominant role中是选择T1->T2还是T2->T1呢?在->前面的是支配地位,后面的是被支配地位。想一下,为什么T2需要用一个外键来存储T1的主键呢?是因为T2需要T1的信息,需要T1来支持T2的存在,即T2依赖于T1,则说明T1应该是支配地位角色,那么在Dominant role项中,我们就需要选择T1->T2。明白了这个,就明白了为什么在一对多的关系里,这个Dominant role是置灰的呢?原因很简单,不需要我们指定这种支配角色,因为一对多的关系中,为一的那个必定是支配地位的角色,不需要我们改变。

好了,关于实体之间的关系就结束了。如果你不是很确定关系的选项对后来的PDM造成的影响,你可以通过试验,通过简单的两个实体表,从CDM转化为PDM,实际看一下二者关系的表现,就明确了,这是我在实际的使用过程中,所用的方法。

基数(Cardinality)用实体间实例的数值对应关系表示,它反映了两个实体间的数值联系,它从父实体的角度描述了一对实体间的数量维度,换句话说,基数中的数字是描述父实体在子表中可能出现的次数范围,基数实际是1个闭区间。基数可能是:

1)0,1

        一个父实体,在子表中可能出现1次,或者不出现(0)。例如:

        用户和权限的关系,用户是父实体:用户A和权限代码001的关系,用户A若没有这个权限,则0值存在;用户拥有001权限时,则1值存在;用户对001的权限只能拥有一次

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/06/02/%E6%95%B0%E6%8D%AE%E5%BB%BA%E6%A8%A1%E7%9F%A5%E8%AF%86%E7%82%B9/'>http://Apiaceae.github.io/blog/2009/06/02/%E6%95%B0%E6%8D%AE%E5%BB%BA%E6%A8%A1%E7%9F%A5%E8%AF%86%E7%82%B9/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

读取数据库数据到HTML Table 并加入一些漂亮的CSS

| Comments

效果图

2009-05-28_00079

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "–//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;> <html xmlns="http://www.w3.org/1999/xhtml&quot;> <head runat="server">

<span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">style</span><span class="kwrd">&gt;</span></pre>
//见附件
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="display" runat="server">
            中国高等植物名录</div>
    </div>
    </form>
</body>
</html>

Default.aspx.cs

 

using System;

using System.Data;

using System.Data.SqlClient;

using System.Web.Configuration;

 

public partial class _Default : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

        // Connection set up

        String strConnection = WebConfigurationManager.ConnectionStrings["CNPCEditConnectionString"].ConnectionString;

 

        SqlConnection objConnection = new SqlConnection(strConnection);

        String strSQL = "SELECT FamilyName, FamilyNameCh,FamilyID from Family";

        // DataAdapter setup

        SqlDataAdapter objAdapter = new SqlDataAdapter(strSQL, objConnection);

        // DataSet & Adapter & Table

        DataSet objDataSet = new DataSet();

        objAdapter.Fill(objDataSet, "Family");

        String strResultsHolder;

        strResultsHolder = "<table>";

        strResultsHolder += "<tr>";

        //Change the column header name

        objDataSet.Tables["Family"].Columns[0].ColumnName = "科学名";

        objDataSet.Tables["Family"].Columns[1].ColumnName = "科中文名";

        objDataSet.Tables["Family"].Columns[2].ColumnName = "科编号";

        foreach (DataColumn c in objDataSet.Tables["Family"].Columns)

        {

            strResultsHolder += "<td>" + c.ColumnName + "</td>";

        }

        strResultsHolder += "</tr>";

        foreach (DataRow r in objDataSet.Tables["Family"].Rows)

        {

            strResultsHolder += "<tr><td width=5%>" + r["科学名"] + "<td width=5%>" + r["科中文名"] + "<td width=5%>" + r["科编号"] + "</td><

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/28/%E8%AF%BB%E5%8F%96%E6%95%B0%E6%8D%AE%E5%BA%93%E6%95%B0%E6%8D%AE%E5%88%B0HTML+Table+%E5%B9%B6%E5%8A%A0%E5%85%A5%E4%B8%80%E4%BA%9B%E6%BC%82%E4%BA%AE%E7%9A%84CSS/'>http://Apiaceae.github.io/blog/2009/05/28/%E8%AF%BB%E5%8F%96%E6%95%B0%E6%8D%AE%E5%BA%93%E6%95%B0%E6%8D%AE%E5%88%B0HTML+Table+%E5%B9%B6%E5%8A%A0%E5%85%A5%E4%B8%80%E4%BA%9B%E6%BC%82%E4%BA%AE%E7%9A%84CSS/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

久违的DELTA系统有和大家见面了

| Comments

2009-05-27_180500

DELTA格式(DEscription Language for TAxonomy)是一种非常灵活和高效的方法通过计算机来记录分类学的描述语言。它被作为生物多样性信息学Biodiversity Information Standards (TDWG)的数据交换标准之一。

DELTA系统是基于DELTA格式的数据整合系统。它包括传统检索表的生成,其他分类程序的数据格式的输出,以及交互式Intkey检索表和鉴定工具的生成。该系统式从1971-2000年期间在澳大利亚的CSIRO Division of Entomology进行开发的。 到目前为止已经应用在包括病毒、珊瑚、甲壳类、昆虫、鱼类、真菌、植物和木材等多种有机体中。该系统式完全免费使用的。

由于商业管理维护成本的增加,以及原开发者Mike教授面临退休,无人维护管理的尴尬境地,Delta系统一度离线,现在我们很高兴的通知大家,DELTA又回来了!!!原来久为大家熟知的域名没变。将来我们的工作小组会在此系统基础上,结合时下新的技术手段,比如XML对原系统进行改造,使他能更容易的被用户接受、增强它的功能和使用界面。有兴趣的朋友欢迎加入!!!

哈哈,刚接通就用户来了,看来大家都还是很期望系统重新上线哦。

2009-05-27_182221

Repeater控件嵌套绑定科属数据

| Comments

显示效果如下

2009-05-26_00078

RepeaterDemo.aspx

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RepeaterDemo.aspx.cs" Inherits="RepeaterDemo" %>

 

<!DOCTYPE html PUBLIC "–//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>

<html xmlns="http://www.w3.org/1999/xhtml&quot;>

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <asp:Repeater ID="repeaterMain" runat="server" OnItemDataBound="repeaterMain_ItemDataBound">

            <ItemTemplate>

                <table>

                    <tr>

                        <td><%#DataBinder.Eval(Container,"DataItem.familyid")%></td>

                        <td><%#DataBinder.Eval(Container,"DataItem.familyname")%></td>

                    </tr>

                    <asp:Repeater ID="repeaterSub" runat="server">

                        <ItemTemplate>                        

                            <tr>

                                <td><%#DataBinder.Eval(Container, "DataItem.familyid")%></td>

                                <td><%#DataBinder.Eval(Container, "DataItem.genusid")%></td>

                                <td><%#DataBinder.Eval(Container, "DataItem.genusname")%></td>                                

                            </tr>

                            <asp:Repeater ID="repeaterSub1" runat="server">

                        <ItemTemplate>                        

                            <tr>

                                 <td><%#DataBinder.Eval(Container, "DataItem.genusid")%></td>

                                 <td><%#DataBinder.Eval(Container, "DataItem.spnumber")%></td>                              

                                <td><%#DataBinder.Eval(Container, "DataItem.AbbreviateName")%></td>                                

                            </tr>                            

                        </ItemTemplate>

     

   original link:
   <a href='http://Apiaceae.github.io/blog/2009/05/26/Repeater%E6%8E%A7%E4%BB%B6%E5%B5%8C%E5%A5%97%E7%BB%91%E5%AE%9A%E7%A7%91%E5%B1%9E%E6%95%B0%E6%8D%AE/'>http://Apiaceae.github.io/blog/2009/05/26/Repeater%E6%8E%A7%E4%BB%B6%E5%B5%8C%E5%A5%97%E7%BB%91%E5%AE%9A%E7%A7%91%E5%B1%9E%E6%95%B0%E6%8D%AE/</a><br/>
   &nbsp;written by <a href='http://Apiaceae.github.io'>Hooker</a>
   &nbsp;posted at <a href='http://Apiaceae.github.io'>http://Apiaceae.github.io</a>
   </p>

合并多行数据到一行:合并异名记录到接受名的Synsum字段

| Comments

原来的数据表的格式及需求如下:

2009-05-25_00078

 

-- SQL2005 新的解决方法 -- 示例数据
DECLARE @t TABLE
    (
      id INT,
      value VARCHAR(300)
    )
INSERT  @t
        SELECT  synof,
                AbbreviateName
        FROM    dbo.Species
        WHERE   synof > 0    
-- 查询处理
SELECT  *
FROM    ( SELECT DISTINCT
                    id
          FROM      @t
        ) A
        OUTER APPLY ( SELECT    [values] = STUFF(REPLACE(REPLACE(( SELECT   value
                                                                   FROM     @t N
                                                                   WHERE    id = A.id
                                                                 FOR
                                                                   XML AUTO
                                                                 ), '<N value="', ','),
                                                         '"/>', ''), 1, 1, '')
                    ) N                    
                    
运行结果
2009-05-25_00079