Database systems are designed to manage large bodies of information. [1]Management of
data involves both defining structures for storage of information and providing mechanisms for
the manipulation of information. In addition, the database system must ensure the safety of the
information stored, despite system crashes or attempts at unauthorized access. If data are to be
shared among several users, the system must avoid possible anomalous results.
Because information is so important in most organizations, computer scientists have
developed a large body of concepts and techniques for managing data.
Databases are widely used. Here are some representative applications:
Banking: For customer information, accounts, and loans, and banking transactions.
Airlines: For reservations and schedule information Airlines were among the first to use
databases in a geographically distributed mannerêterminals situated around the world accessed
the central database system through phone lines and other data networks.
Universities: For student information, course registrations, and grades.
Credit card transactions: For purchases on credit cards and generation of monthly statements.
Telecommunication: For keeping records of calls made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about the communication networks.
Finance: For storing information about holdings, sales, and purchases of financial instruments
such as stocks and bonds.
Sales: For customer, product, and purchase information.
Manufacturing: For management of supply chain and for tracking production of items in
factories, inventories of items in warehouses/stores, and orders for items.
Human Resources: For information about employees, salaries, payroll taxes and benefits,
and for generation of paychecks.
Databases form an essential part of almost all enterprises today.
Over the course of the last four decades of the twentieth century, use of databases grew in
all enterprises. In the early days, very few people interacted directly with database systems,
although without realizing it they interacted with databases indirectlyêthrough printed reports
such as credit card statements, or through agents such as bank tellers and airline reservation
agents. Then automated teller machines came along and let users interact directly with databases.
Phone interfaces to computers (interactive voice response systems) also allowed users to deal
directly with databasesêa caller could dial a number, and press phone keys to enter information
or to select alternative options, to find flight arrival/departure times, for example, or to register
for courses in a university.
The Internet revolution of the late 1990s sharply increased direct user access to databases.
Organizations converted many of their phone interfaces to databases into Web interfaces, and
made a variety of services and information available online. For instance, when you access an
online bookstore and browse a book or music collection, you are accessing data stored in a
database. When you enter an order online, your order is stored in a database. When you access a
bank Web site and retrieve your bank balance and transaction information, the information is
retrieved from the bank's database system. When you access a Web site, information about you
may be retrieved from a database, to select which advertisements should be shown to you.
Furthermore, data about your Web accesses may be stored in a database.
Thus, although user interfaces hide details of access to a database, and most people are not
even aware they are dealing with a database, accessing databases forms an essential part of
almost everyone's life today.
The importance of database systems can be judged in another way today, database system
vendors like Oracle are among the largest software companies in the world, and database systems
form an important part of the product line of more diversified companies like Microsoft and IBM.
1, despite [dis'pait]
prep. 不管,尽管
2, anomalous [ə'nɔmələs]
adj. 异常的;不规则的;不恰当的
3, payroll ['peirəul]
n. 工资单(计算报告表)
4, diversified [dai'və:sifaid, di-]
adj. 多样化的;各种的
v. 使…多样化(diversify的过去分词)
Continue reading it-e-38 Applications of Database
Locale Language code LCID string Decimal Hexadecimal Codepage
Afrikaans af af 1078 436 1252
Albanian sq sq 1052 1250
Amharic am am 1118
Arabic - Algeria ar ar-dz 5121 1401 1256
Arabic - Bahrain ar ar-bh 15361 1256
Arabic - Egypt ar ar-eg 3073 1256
Arabic - Iraq ar ar-iq 2049 801 1256
Arabic - Jordan ar ar-jo 11265 1256
Arabic - Kuwait ar ar-kw 13313 3401 1256
Arabic - Lebanon ar ar-lb 12289 3001 1256
Arabic - Libya ar ar-ly 4097 1001 1256
Arabic - Morocco ar ar-ma 6145 1801 1256
Arabic - Oman ar ar-om 8193 2001 1256
Arabic - Qatar ar ar-qa 16385 4001 1256
Arabic - Saudi Arabia ar ar-sa 1025 401 1256
Arabic - Syria ar ar-sy 10241 2801 1256
Arabic - Tunisia ar ar-tn 7169 1256
Arabic - United Arab Emirates ar ar-ae 14337 3801 1256
Arabic - Yemen ar ar-ye 9217 2401 1256
Armenian hy hy 1067
Assamese as as 1101
Azeri - Cyrillic az az-az 2092 1251
Azeri - Latin az az-az 1068 1254
Basque eu eu 1069 1252
Belarusian be be 1059 423 1251
Bengali - Bangladesh bn bn 2117 845
Bengali - India bn bn 1093 445
Bosnian bs bs 5146
Bulgarian bg bg 1026 402 1251
Burmese my my 1109 455
Catalan ca ca 1027 403 1252
Chinese - China zh zh-cn 2052 804
Chinese - Hong Kong SAR zh zh-hk 3076
Chinese - Macau SAR zh zh-mo 5124 1404
Chinese - Singapore zh zh-sg 4100 1004
Chinese - Taiwan zh zh-tw 1028 404
Croatian hr hr 1050 1250
Czech cs cs 1029 405 1250
Danish da da 1030 406 1252
Divehi; Dhivehi; Maldivian dv dv 1125 465
Dutch - Belgium nl nl-be 2067 813 1252
Dutch - Netherlands nl nl-nl 1043 413 1252
Edo 1126 466
English - Australia en en-au 3081 1252
English - Belize en en-bz 10249 2809 1252
English - Canada en en-ca 4105 1009 1252
English - Caribbean en en-cb 9225 2409 1252
English - Great Britain en en-gb 2057 809 1252
English - India en en-in 16393 4009
English - Ireland en en-ie 6153 1809 1252
English - Jamaica en en-jm 8201 2009 1252
English - New Zealand en en-nz 5129 1409 1252
English - Phillippines en en-ph 13321 3409 1252
English - Southern Africa en en-za 7177 1252
English - Trinidad en en-tt 11273 1252
English - United States en en-us 1033 409 1252
English - Zimbabwe en 12297 3009 1252
Estonian et et 1061 425 1257
Faroese fo fo 1080 438 1252
Farsi - Persian fa fa 1065 429 1256
Filipino 1124 464
Finnish fi fi 1035 1252
French - Belgium fr fr-be 2060 1252
French - Cameroon fr 11276
French - Canada fr fr-ca 3084 1252
French - Congo fr 9228
French - Cote d'Ivoire fr 12300
French - France fr fr-fr 1036 1252
French - Luxembourg fr fr-lu 5132 1252
French - Mali fr 13324
French - Monaco fr 6156 1252
French - Morocco fr 14348
French - Senegal fr 10252
French - Switzerland fr fr-ch 4108 1252
French - West Indies fr 7180
Frisian - Netherlands 1122 462
FYRO Macedonia mk mk 1071 1251
Gaelic - Ireland gd gd-ie 2108
Gaelic - Scotland gd gd 1084
Galician gl 1110 456 1252
Georgian ka 1079 437
German - Austria de de-at 3079 1252
German - Germany de de-de 1031 407 1252
German - Liechtenstein de de-li 5127 1407 1252
German - Luxembourg de de-lu 4103 1007 1252
German - Switzerland de de-ch 2055 807 1252
Greek el el 1032 408 1253
Guarani - Paraguay gn gn 1140 474
Gujarati gu gu 1095 447
Hebrew he he 1037 1255
HID (Human Interface Device) 1279
Hindi hi hi 1081 439
Hungarian hu hu 1038 1250
Icelandic is is 1039 1252
Igbo - Nigeria 1136 470
Indonesian id id 1057 421 1252
Italian - Italy it it-it 1040 410 1252
Italian - Switzerland it it-ch 2064 810 1252
Japanese ja ja 1041 411
Kannada kn kn 1099
Kashmiri ks ks 1120 460
Kazakh kk kk 1087 1251
Khmer km km 1107 453
Konkani 1111 457
Korean ko ko 1042 412
Kyrgyz - Cyrillic 1088 440 1251
Lao lo lo 1108 454
Latin la la 1142 476
Latvian lv lv 1062 426 1257
Lithuanian lt lt 1063 427 1257
Malay - Brunei ms ms-bn 2110 1252
Malay - Malaysia ms ms-my 1086 1252
Malayalam ml ml 1100
Maltese mt mt 1082
Manipuri 1112 458
Maori mi mi 1153 481
Marathi mr mr 1102
Mongolian mn mn 2128 850
Mongolian mn mn 1104 450 1251
Nepali ne ne 1121 461
Norwegian - Bokml nb no-no 1044 414 1252
Norwegian - Nynorsk nn no-no 2068 814 1252
Oriya or or 1096 448
Polish pl pl 1045 415 1250
Portuguese - Brazil pt pt-br 1046 416 1252
Portuguese - Portugal pt pt-pt 2070 816 1252
Punjabi pa pa 1094 446
Raeto-Romance rm rm 1047 417
Romanian - Moldova ro ro-mo 2072 818
Romanian - Romania ro ro 1048 418 1250
Russian ru ru 1049 419 1251
Russian - Moldova ru ru-mo 2073 819
Sami Lappish 1083
Sanskrit sa sa 1103
Serbian - Cyrillic sr sr-sp 3098 1251
Serbian - Latin sr sr-sp 2074 1250
Sesotho (Sutu) 1072 430
Setsuana tn tn 1074 432
Sindhi sd sd 1113 459
Sinhala; Sinhalese si si 1115
Slovak sk sk 1051 1250
Slovenian sl sl 1060 424 1250
Somali so so 1143 477
Sorbian sb sb 1070
Spanish - Argentina es es-ar 11274 1252
Spanish - Bolivia es es-bo 16394 1252
Spanish - Chile es es-cl 13322 1252
Spanish - Colombia es es-co 9226 1252
Spanish - Costa Rica es es-cr 5130 1252
Spanish - Dominican Republic es es-do 7178 1252
Spanish - Ecuador es es-ec 12298 1252
Spanish - El Salvador es es-sv 17418 1252
Spanish - Guatemala es es-gt 4106 1252
Spanish - Honduras es es-hn 18442 1252
Spanish - Mexico es es-mx 2058 1252
Spanish - Nicaragua es es-ni 19466 1252
Spanish - Panama es es-pa 6154 1252
Spanish - Paraguay es es-py 15370 1252
Spanish - Peru es es-pe 10250 1252
Spanish - Puerto Rico es es-pr 20490 1252
Spanish - Spain (Traditional) es es-es 1034 1252
Spanish - Uruguay es es-uy 14346 1252
Spanish - Venezuela es es-ve 8202 1252
Swahili sw sw 1089 441 1252
Swedish - Finland sv sv-fi 2077 1252
Swedish - Sweden sv sv-se 1053 1252
Syriac 1114
Tajik tg tg 1064 428
Tamil ta ta 1097 449
Tatar tt tt 1092 444 1251
Telugu te te 1098
Thai th th 1054
Tibetan bo bo 1105 451
Tsonga ts ts 1073 431
Turkish tr tr 1055 1254
Turkmen tk tk 1090 442
Ukrainian uk uk 1058 422 1251
Unicode UTF-8 0 65001
Urdu ur ur 1056 420 1256
Uzbek - Cyrillic uz uz-uz 2115 843 1251
Uzbek - Latin uz uz-uz 1091 443 1254
Venda 1075 433
Vietnamese vi vi 1066 1258
Welsh cy cy 1106 452
Xhosa xh xh 1076 434
Yiddish yi yi 1085
Zulu zu zu 1077 435
Continue reading 地区语系简码表
.NET is both a business strategy from Microsoft and its collection of programming support
for what are known as Web services, the ability to use the Web rather than your own computer for
various services. Microsoft's goal is to provide individual and business users with a seamlessly
interoperable and Web-enabled interface for applications and computing devices and to make
computing activities increasingly Web browser-oriented. The .NET platform includes servers;
building-block services, such as Web-based data storage; and device software. It also includes
Passport, Microsoft's fill-in-the-form-only-once identity verification service.
The .NET platform is expected to provide:
The ability to make the entire range of computing devices work together and to have user
information automatically updated and synchronized on all of them.
Increased interactive capability for Web sites, enabled by greater use of XML (Extensible
Markup Language) rather than HTML.
A premium online subscription service, that will feature customized access and delivery of
products and services to the user from a central starting point for the management of various
applications, such as e-mail, for example, or software, such as Office .NET.
Centralized data storage, which will increase efficiency and ease of access to information, as
well as synchronization of information among users and devices.
The ability to integrate various communications media, such as e-mail, faxes, and
telephones.
For developers, the ability to create reusable modules, which should increase productivity
and reduce the number of programming errors.
According to Bill Gates, Microsoft expects that .NET will have as significant an effect on
the computing world as the introduction of Windows. One concern being voiced is that
although .NET's services will be accessible through any browser, they are likely to function more
fully on products designed to work with .NET code.
The full release of .NET is expected to take several years to complete, with intermittent
releases of products such as a personal security service and new versions of Windows and Office
that implement the .NET strategy coming on the market separately. Visual Studio .NET is a
development environment that is now available. Windows XP supports certain .NET capabilities.
1, interoperable [,intə'ɔpərəbl]
adj. 彼此协作的;能共同操作的;能共同使用的
2, intermittent [,intə(:)'mitənt]
a. 间歇的,断断续续的
Continue reading it-e-37 What is .NET
jsonp是解决跨域调用的一种方法,主要是通过script标签允许跨域的原理来实现。
下面就是示例代码:
var head = document.getElementsByTagName("head")[0];
var j = document.createElement("script");
j.type = "text/javascript";
if (c){
var id='tpc'+new Date().getTime();
src += '&jsonpid='+id;
//the response should call the function passed by jsonpid
window[id] = function(r){c(r);window[id]=null;};
}
j.onload = j.onreadystatechange = function() {
if ((!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
//ie hack
j.onload = j.onreadystatechange = null;
if (head && j.parentNode) {
head.removeChild(j);
}
}
}
j.src = src + '&tmp=' + new Date().getTime();
head.appendChild(j);
需要注意的问题是:
IE下onload事件触发不了,但是有onreadystatechange事件,
script标签设置一次src后,再改动它的src是没有效果的,所以必须每次创建,然后删除。
上面的例子还需要服务端返回的script内容调用传入的函数名来达到传递参数的效果。
还没有想到失败事件怎样实现?
Continue reading 自己动手写jsonp
SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to
communicate with a database. According to ANSI, it is the standard language for relational
database management systems. SQL statements are used to perform tasks such as update data on
a database, or retrieve data from a database. Some common relational database management
systems that use SQL are:Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc. [1]Although
most database systems use SQL, most of them also have their own additional proprietary
extensions that are usually only used on their system. However, the standard SQL commands
such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish
almost everything that one needs to do with a database.
A relational database system contains one or more objects called tables. The data or
information for the database are stored in these tables. Tables are uniquely identified by their
names and are comprised of columns and rows. Columns contain the column name, data type,
and any other attributes for the column. Rows contain the records or data for the columns. Here is
a sample table called "weather".
City, state, high, and low are the columns. The rows contain the data for this table:
The select statement is used to query the database and retrieve selected data that match the
criteria that you specify. Here is the format of a simple select statement:
select "column1"
[,"column2",etc]
from "tablename"
[where "condition"];
[] = optional
The column names that follow the select keyword determine which columns will be returned
in the results. You can select as many column names that you'd like, or you can use a "*" to
select all columns.
The table name that follows the keyword from specifies the table that will be queried to
retrieve the desired results.
The where clause (optional) specifies which data values or rows will be returned or
displayed, based on the criteria described after the keyword where.
The create table statement is used to create a new table. Here is the format of a simple create
table statement:
create table "tablename"
("column1" "data type",
"column2" "data type",
"column3" "data type");
Format of create table if you were to use optional constraints:
create table "tablename"
("column1" "data type"
[constraint],
"column2" "data type"
[constraint],
"column3" "data type"
[constraint]);
[ ] = optional
Note: You may have as many columns as you'd like, and the constraints are optional.
Example:
create table employee
(first varchar(15),
last varchar(20),
age number(3),
address varchar(30),
city varchar(20),
state varchar(20));
[2]To create a new table, enter the keywords create table followed by the table name,
followed by an open parenthesis, followed by the first column name, followed by the data type
for that column, followed by any optional constraints, and followed by a closing parenthesis. It is
important to make sure you use an open parenthesis before the beginning table, and a closing
parenthesis after the end of the last column definition. Make sure you separate each column
definition with a comma. All SQL statements should end with a ";".
The table and column names must start with a letter and can be followed by letters, numbers,
or underscores ê not to exceed a total of 30 characters in length. Do not use any SQL reserved
keywords as names for tables or column names (such as "select", "create", "insert", etc).
Data types specify what the type of data can be for that particular column. If a column
called "Last_Name", is to be used to hold names, then that particular column should have a
"varchar" (variable-length character) data type.
Note:Here are the most common data types:
char(size) Fixed-length character string. Size is specified in parenthesis. Max 255 bytes.
varchar(size) Variable-length character string. Max size is specified in parenthesis.
number(size) Number value with a max number of column digits specified in parenthesis.
Date Date value
number(size,d)
Number value with a maximum number of digits of "size" total, with a
maximum number of "d" digits to the right of the decimal.
What are constraints? When tables are created, it is common for one or more columns to
have constraints associated with them. A constraint is basically a rule associated with a column
that the data entered into that column must follow. For example, a "unique" constraint specifies
that no two records can have the same value in a particular column. They must all be unique. The
other two most popular constraints are "not null" which specifies that a column can't be left blank,
and "primary key". A "primary key" constraint defines a unique identification of each record (or
row) in a table.
The insert statement is used to insert or add a row of data into the table.
To insert records into a table, enter the key words insert into followed by the table name,
followed by an open parenthesis, followed by a list of column names separated by commas,
followed by a closing parenthesis, followed by the keyword values, followed by the list of values
enclosed in parenthesis. The values that you enter will be held in the rows and they will match up
with the column names that you specify. Strings should be enclosed in single quotes, and
numbers should not.
insert into "tablename"
(first_column,...last_column)
values (first_value,...last_value);
In the example below, the column name first will match up with the value 'Luke', and the
column name state will match up with the value 'Georgia'.
Example:
insert into employee
(first, last, age, address, city, state)
values ('Luke', 'Duke', 45, '2130 Boars Nest',
'Hazard Co', 'Georgia');
Note: All strings should be enclosed between single quotes: 'string'
Updating Records
The update statement is used to update or change records that match a specified criteria.
This is accomplished by carefully constructing a where clause.
update "tablename"
set "columnname" =
"newvalue"
[,"nextcolumn" =
"newvalue2"...]
where "columnname"
OPERATOR "value"
[and|or "column"
OPERATOR "value"];
[ ] = optional
Examples:
update phone_book
set area_code = 623
where prefix = 979;
update phone_book
set last_name = 'Smith', prefix=555, suffix=9292
where last_name = 'Jones';
update employee
set age = age+1
where first_name='Mary' and last_name='Williams';
Deleting Records
The delete statement is used to delete records or rows from the table.
delete from "tablename"
where "columnname"
OPERATOR "value"
[and|or "column"
OPERATOR "value"];
[ ] = optional
Examples:
delete from employee;
Note: if you leave off the where clause, all records will be deleted!
delete from employee
where lastname = 'May';
delete from employee
where firstname = 'Mike' or firstname = 'Eric';
To delete an entire record/row from a table, enter "delete from" followed by the table name,
followed by the where clause which contains the conditions to delete. If you leave off the where
clause, all records will be deleted.
The drop table command is used to delete a table and all rows in the table.
To delete an entire table including all of its rows, issue the drop table command followed by
the table name. Drop table is different from deleting all of the records in the table. Deleting all of
the records in the table leaves the table including column and constraint information. Dropping
the table removes the table definition as well as all of its rows.
drop table "tablename"
Example:
drop table myemployees_ts0211;
1, clause [klɔ:z]
n. 分句,从句,条款,款项
2, parenthesis [pə'renθisis]
n. 括弧,插入语,附带
3, criteria
n. 标准
Continue reading it-e-36 Brief Introduction of SQL
The broad objective of this project is to maintain and enhance the National Geochemical
Database (NGDB). The NGDB consists of 1) the original RASS and PLUTO data from the
USGS labs, which are now stored in a common format under the ORACLE relational database
management system; 2) the NURE data, which have been reformatted and reside currently on the
following web site: http://pubs.usgs.gov/of/1997/ofr-97-0492/ where downloads may be made on
the basis of 1:250,000-scale quadrangles; and 3) the newly generated data (approximately 1996þ
present) which reside on the Laboratory Information Management System. The enhancements to
the NGDB will enable both USGS scientists and external customers to more easily extract
immediately useable data on a national, regional, and local scale to help establish a baseline for
the abundance and spatial distribution of chemical elements in the Earth's surficial materials.
Specific short-term objective include:
Linking the newly developed ORACLE-based database to the Laboratory Information
Management System (LIMS) to provide for the smooth transfer of newly generated data from the
LIMS to the NGDB.
Implement the new Sample Submittal Information procedure on a nationwide basis
throughout the USGS. This procedure has only been implemented at this time (June 2002) in the
Central Region. Without this new system in place, it is possible that more errors and omissions
regarding the nature and location of samples may be generated.
Complete the re-formatting of the NURE HSSR database based on 1:250,000-scale
quadrangles, compile the quadrangle-based data into one large data set, and provide these data to
the public via a web site and CD/DVD.
Complete the upgrading of archival USGS geochemical data for Alaska and release these to
the public via a web site and CD/DVD.
Initiate the upgrading of the remainder (non-Alaska) portion of the USGS-generated data.
Generate subsets of the master databases containing data in a format more useful to geochemists so
they do not have to wade through the process of extracting the data they need from the entire database.
Communicate and coordinate the work within this Project with other data delivery efforts
within the Bureau such as NatWeb, GEODE, and Spatial Data Delivery.
Produce map representations of the database showing the spatial variation of chemical
species throughout the nation and within sub-regions that are of priority to the USGS.
Relevance and Impact
An accurate, easily accessible geochemical database containing multi-element information
on the surficial materials of the nation is vital if the USGS is to respond quickly to earth science
issues raised by Congress and land management and environmental protection agencies. A
nationally consistent geochemical database provides baseline information on the natural
abundance and spatial variation of chemical elements to which changes caused by agricultural
and irrigation practices, waste disposal, urbanization, industrial pollution, mineral exploration
and mining activities, environmental induced and restoration activities, and other land-use
practices can be compared. Human-induced chemical changes to the environment are
superimposed on a variable natural geochemical background where trace-element abundances
can range over several orders of magnitude within short distances. These variations are
inadequately documented and their existence is often overlooked in the setting of public policy.
Important aspects of change cannot be measured, or their consequences anticipated, unless the
present composition of the earth's surface materials is known. In her 2000 Presidential address to
the Geological Society of America, Mary Lou Zoback identified six "grand challenges in earth
and environmental science". The first of these was "recognizing the signal within the natural
variability". Zoback stated that "documenting and understanding natural variability is a vexing
topic in almost every environmental problem. How do we recognize and understand changes in
natural systems if we don't understand the range of baseline values?" Preserving and enhancing
the vast amount of geochemical data within MRP's databases will provide a powerful tool for
addressing this "grand challenge". The ultimate goal of producing and electronically
disseminating the vast amount of geochemical data within MRP's databases directly supports
many of the goals and objectives as stated in the Science Strategy of the Geologic Division
(Bohlen and others, 1999). These databases are essential for understanding the relationship
between geologic processes and human health, ecosystem structure and function, and the
distribution of energy and mineral resources. This project also serves as the focal point of
requests for geochemical data from outside customers. From June 2001 through May 2002, the
predecessor project (National Geochemical Database Project) received over 100 requests for data
from Federal, state, and local government clients; private sector clients; and internal USGS
clients. At a conservatively estimated cost of $300 per sample for collection, preparation, and
chemical analysis, the geochemical databases under MRP management represent an expenditure
of over $500 million of taxpayer money. To realize the fullest possible return for this investment,
these data must be archived in perpetuity in an easily accessible and user-friendly format for full
utilization by the wide array of customers that need geochemical data to accomplish their work.
1, geochemical [,dʒi:ə'kemikəl]
adj. 地球化学的
2, spatial ['speiʃəl]
a. 空间的
3, surficial [sə:'fiʃəl]
adj. 地表的;地面的
4, omission [əu'miʃən]
n. 疏忽,遗漏;省略;冗长
5, quadrangle ['kwɔdræŋɡl]
n. 四边形;方院
6, wade [weid]
v. 跋涉
7, portion ['pɔ:ʃən]
n. 部分,份,命运
v. 将...分配,分配
8, species ['spi:ʃiz]
n. 物种,种类
9, relevance
n. 中肯,适当,关联,相关性
10, irrigation [,iri'geiʃən]
n. 灌溉
11, urbanization [,ə:bənai'zeiʃən, -ni'z-]
n. 都市化;文雅化
12, remediation [ri,mi:di'eiʃən]
n. 补救;矫正;补习
13, induced
感应的
14, vexing
adj. 烦恼
15, ecosystem [i:kə'sistəm]
n. 生态系统
16, geologic [dʒiə'lɔdʒik]
a. 地质的
17, predecessor ['pri:disesə, 'pre-]
n. 前任,前辈
18, expenditure [iks'penditʃə, eks-]
n. (时间、劳力、金钱等)支出,使用,消耗
19, perpetuity [,pəpi'tjuiti]
n. 永恒,永久
Continue reading it-e-35 National Geochemical Database
The relational model is the basis for any relational database management system (RDBMS).
[1]A relational model has three core components: a collection of objects or relations, operators
that act on the objects or relations, and data integrity methods. In other words, it has a place to
store the data, a way to create and retrieve the data, and a way to make sure that the data is
logically consistent.
A relational database uses relations, or two-dimensional tables, to store the information
needed to support a business. Let's go over the basic components of a traditional relational
database system and look at how a relational database is designed. Once you have a solid
understanding of what rows, columns, tables, and relationships are, you'll be well on your way to
leveraging the power of a relational database.
A table in a relational database, alternatively known as a relation, is a two-dimensional
structure used to hold related information. A database consists of one or more related tables.
NoteDon't confuse a relation with relationships. A relation is essentially a table, and a
relationship is a way to correlate, join, or associate two tables.
A row in a table is a collection or instance of one thing, such as one employee or one line
item on an invoice. [2]A column contains all the information of a single type, and the piece of data
at the intersection of a row and a column, a field, is the smallest piece of information that can be
retrieved with the database's query language. For example, a table with information about
employees might have a column called LAST_NAME that contains all of the employees' last
names. Data is retrieved from a table by filtering on both the row and the column.
The examples throughout this article will focus on the hypothetical work of Scott Smith,
database developer and entrepreneur. He just started a new widget company and wants to
implement a few of the basic business functions using the relational database to manage his
Human Resources (HR) department.
Relation
A two-dimensional structure used to hold related information, also known as a
table.
Note
Most of Scott's employees were hired away from one of his previous employers, some
of whom have over 20 years of experience in the field. As a hiring incentive, Scott has agreed to
keep the new employees' original hire date in the new database.
Row
A group of one or more data elements in a database table that describes a person,
place, or thing.
Column
The component of a database table that contains all of the data of the same name
and type across all rows.
You'll learn about database design in the following sections, but let's assume for the moment
that the majority of the database design is completed and some tables need to be implemented.
Scott creates the EMP table to hold the basic employee information, and it looks something like
this:
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7902 FORD ANALYST 7566 03-DEC-81 3000 20
Notice that some fields in the Commission (COMM) and Manager (MGR) columns do not
contain a value; they are blank. A relational database can enforce the rule that fields in a column
may or may not be empty. [3]In this case, it makes sense for an employee who is not in the Sales
department to have a blank Commission field. It also makes sense for the president of the
company to have a blank Manager field, since that employee doesn't report to anyone.
Field
The smallest piece of information that can be retrieved by the database query
language. A field is found at the intersection of a row and a column in a database table.
On the other hand, none of the fields in the Employee Number (EMPNO) column are blank.
The company always wants to assign an employee number to an employee, and that number must
be different for each employee. One of the features of a relational database is that it can ensure
that a value is entered into this column and that it is unique. The EMPNO column, in this case, is
the primary key of the table.
Primary Key
A column (or columns) in a table that makes the row in the table
distinguishable from every other row in the same table.
Notice the different datatypes that are stored in the EMP table: numeric values, character or
alphabetic values, and date values.
As you might suspect, the DEPTNO column contains the department number for the
employee. But how do you know what department name is associated with what number?
Scott created the DEPT table to hold the descriptions for the department codes in the EMP
table.
The DEPTNO column in the EMP table contains the same values as the DEPTNO column
in the DEPT table. In this case, the DEPTNO column in the EMP table is considered a foreign
key to the same column in the DEPT table.
A foreign key enforces the concept of referential integrity in a relational database. [4]The
concept of referential integrity not only prevents an invalid department number from being
inserted into the EMP table, but it also prevents a row in the DEPT table from being deleted if
there are employees still assigned to that department.
Foreign Key
A column (or columns) in a table that draws its values from a primary or
unique key column in another table. A foreign key assists in ensuring the data integrity of a table.
Referential Integrity
A method employed by a relational database system that enforces
one-to-many relationships between tables.
Before Scott created the actual tables in the database, he went through a design process known
as data modeling. In this process, the developer conceptualizes and documents all the tables for the
database. One of the common methods for modeling a database is called ERA, which stands for
entities, relationships, and attributes. The database designer uses an application that can maintain
entities, their attributes, and their relationships. In general, an entity corresponds to a table in the
database, and the attributes of the entity correspond to columns of the table.
Data ModelingA process of defining the entities, attributes, and relationships between the
entities in preparation for creating the physical database.
The data-modeling process involves defining the entities, defining the relationships between
those entities, and then defining the attributes for each of the entities. Once a cycle is complete, it
is repeated as many times as necessary to ensure that the designer is capturing what is important
enough to go into the database. Let's take a closer look at each step in the data-modeling process.
First, the designer identifies all of the entities within the scope of the database application.
The entities are the persons, places, or things that are important to the organization and need to be
tracked in the database. Entities will most likely translate neatly to database tables. For example,
for the first version of Scott's widget company database, he identifies four entities: employees,
departments, salary grades, and bonuses. These will become the EMP, DEPT, SALGRADE, and
BONUS tables.
Once the entities are defined, the designer can proceed with defining how each of the
entities is related. Often, the designer will pair each entity with every other entity and ask, "Is
there a relationship between these two entities?" Some relationships are obvious; some are not.
In the widget company database, there is most likely a relationship between EMP and DEPT,
but depending on the business rules, it is unlikely that the DEPT and SALGRADE entities are
related. If the business rules were to restrict certain salary grades to certain departments, there
would most likely be a new entity that defines the relationship between salary grades and
departments. This entity would be known as an associative or intersection table and would
contain the valid combinations of salary grades and departments.
Associative Table
A database table that stores the valid combinations of rows from two
other tables and usually enforces a business rule. An associative table resolves a many-to-many
relationship.
In general, there are three types of relationships in a relational database:
One-to-many
The most common type of relationship is one-to-many. This means that
for each occurrence in a given entity, the parent entity, there may be one or more
occurrences in a second entity, the child entity, to which it is related. For example, in the
widget company database, the DEPT entity is a parent entity, and for each department,
there could be one or more employees associated with that department. The relationship
between DEPT and EMP is one-to-many.
One-to-one
In a one-to-one relationship, a row in a table is related to only one or none
of the rows in a second table. This relationship type is often used for subtyping. For
example, an EMPLOYEE table may hold the information common to all employees,
while the FULLTIME, PARTTIME, and CONTRACTOR tables hold information unique
to full-time employees, part-time employees, and contractors, respectively. These entities
would be considered subtypes of an EMPLOYEE and maintain a one-to-one relationship
with the EMPLOYEE table. These relationships are not as common as one-to-many
relationships, because if one entity has an occurrence for a corresponding row in another
entity, in most cases, the attributes from both entities should be in a single entity.
Many-to-many
In a many-to-many relationship, one row of a table may be related to
many rows of another table, and vice versa. Usually, when this relationship is
implemented in the database, a third entity is defined as an intersection table to contain
the associations between the two entities in the relationship. For example, in a database
used for school class enrollment, the STUDENT table has a many-to-many relationship
with the CLASS table—one student may take one or more classes, and a given class may
have one or more students. The intersection table STUDENT_CLASS would contain the
combinations of STUDENT and CLASS to track which students are in which classes.
Once the designer has defined the entity relationships, the next step is to assign the attributes
to each entity. This is physically implemented using columns, as shown here for the SALGRADE
table as derived from the salary grade entity.
After the entities, relationships, and attributes have been defined,
the designer may iterate the data modeling many more times. When
reviewing relationships, new entities may be discovered. For example,
when discussing the widget inventory table and its relationship to a
customer order, the need for a shipping restrictions table may arise.
Once the design process is complete, the physical database
tables may be created. [5]Logical database design sessions should not
involve physical implementation issues, but once the design has gone through an iteration or two,
it's the DBA's job to bring the designers "down to earth." As a result, the design may need to be
revisited to balance the ideal database implementation versus the realities of budgets and schedules.
1, leverage ['li:vəridʒ, 'le-]
n. 手段,影响力;杠杆作用;杠杆效率
2, correlate ['kɔ:rə,leit]
vi. 关联
vt. 使有相互关系;互相有关系
n. 相关物;相关联的人
adj. 关联的
3, essentially [i'senʃəli]
adv. 本质上;本来
4, hypothetical [,haipəu'θetikəl]
adj. 假设的;爱猜想的
5, entrepreneur [,ɔntrəprə'nə:]
n. 企业家
6, incentive [in'sentiv]
a. 刺激的,鼓励的
n. 刺激,鼓励,动机
7, integrity [in'teɡrəti]
n. 完整;正直;诚实;廉正
8, associative
a. 联合的(相关的,协会的)
Continue reading it-e-34 Structure of the Relational Database
jquery插件很多,但是适合你的不一定多,有的太酷有的太土,下面我来记录一下我认为比较实用的:
图片类:
1:图片浏览滚动 http://sorgalla.com/projects/jcarousel/
特点:文档详细,有demo

2: 图片浏览 http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html

特点:简单实用
3: 图片浏览滚动 http://www.gcmingati.net/wordpress/wp-content/lab/jquery/svwt/index.html
第2个的高级版本

4: tab页 idTabs http://kazge.com/archives/849.html
Continue reading jquery实用插件
网上问的大多数是不同服务器不同表结构的方法,也碰到类似我这样的同一数据库服务器不同数据库但是表结构是一样的情况,
这篇文章http://hi.baidu.com/piaokes/blog/item/c715114ecbcdf7ced1c86a92.html的方法是传入数据库名创建对应的SessionFactory。
这样的情况,同表结构不同数据库的情形是多个同逻辑的子程序。子程序可能很多,每个都建个SessionFactory以及一系列的对象,性能是很吃力地吧。
hibernate自定义数据源:
http://www.ibm.com/developerworks/cn/opensource/os-hibernate/
但这是与集群相关,与逻辑无关。
看看自动生成的HibernateSessionFactory这个类,再看看org.hibernate.SessionFactory这个类的接口,再想想hibernate的目标,为每个数据库建立一个connection是行不通的。
我觉得这种情况是不适合使用ORM的。还是自己使用jdbc处理比较好。
最后想了想,还是应该分表而不是分库。但是这样hibernate还是无法处理。
Continue reading hibernate连接一个数据库服务器中多个数据库
今天偶然看到PostgreSQL的教科书文章 ,老早就听说过它了,这次觉得还比较强大啊,看这几篇文章:
为什么选用PostgreSQL,而不是Oracle?
http://www.cublog.cn/u/17549/showart_175035.html
PostgreSQL介绍
http://blog.csdn.net/daichadongqing/archive/2010/01/13/5184588.aspx
评论MySQL和PostgreSQL两类数据库的优点与缺点
http://blog.csdn.net/arau_sh/archive/2010/06/13/5670030.aspx
吸引我眼球的的是:免费,支持面向对象,支持多种语言编程。有空看看……
Continue reading 初识PostgreSQL
Pagination