Working languages:
English to Korean
Korean to English

Moonsuk Park
Reliable, High-quality IT translation

South Korea
Local time: 18:02 KST (GMT+9)

Native in: Korean 
  • PayPal accepted
  • Send message through ProZ.com MSN IM
Feedback from
clients and colleagues

on Willingness to Work Again info
3 positive reviews
Account type Freelance translator and/or interpreter, Identity Verified Verified site user
Data security Created by Evelio Clavel-Rosales This person has a SecurePRO™ card. Because this person is not a ProZ.com Plus subscriber, to view his or her SecurePRO™ card you must be a ProZ.com Business member or Plus subscriber.
Affiliations This person is not affiliated with any business or Blue Board record at ProZ.com.
Services Translation, Website localization, Software localization
Expertise
Specializes in:
Computers (general)Computers: Hardware
Computers: SoftwareComputers: Systems, Networks
Internet, e-CommerceIT (Information Technology)

Rates

KudoZ activity (PRO) PRO-level points: 8, Questions answered: 2, Questions asked: 1
Portfolio Sample translations submitted: 1
English to Korean: Software/Article
Source text - English
As Published In

XQuery Flowers

Use XQuery to retrieve and transform both XML and relational data.

Query is an XML query language developed and standardized by the World Wide Web Consortium (W3C). XQuery's purpose is to find, retrieve, and rearrange data viewed through the lens of XML. XQuery is the syntax, and XML expressions are what you write using that syntax. Oracle's implementation of XQuery makes its debut in Oracle Database 10g Release 2, enabling you to draw data from both XML documents and relational tables, and to then use that data in generating new XML documents and relational rowsets.

A Small Scenario

Suppose you're a database developer and you help maintain a database for the tourist industry. Figure 1 shows the data you have to work with:

  • Chamber-of-commerce data in a traditional, relational table (CHAMBER_OF_COMMERCE).
  • Information about tourist attractions in XML documents that you access via the Oracle XML DB Repository. Each document represents one attraction.
  • Census data as documents in a table (COUNTY_CENSUS) in an XMLType column. Each row contains an XML document with population counts for all cities in a given county.

Your manager has just asked you to generate an XML document combining census data and information for tourists, organized by county. You need to

  1. Generate a set of county nodes from the CHAMBER_OF_COMMERCE table
  2. Retrieve the attraction data for each county from XML documents in the Oracle XML DB Repository
  3. Summarize the population counts from XML documents in the COUNTY_CENSUS table

Thankfully, you've just upgraded to Oracle Database 10g Release 2, and XQuery is at your disposal. You can view all your data, even the chamber-of- commerce data, as XML documents. You can express your query using a syntax that lets you "think in XML." Manipulating and rearranging your input XML documents to generate an entirely new type of XML document is an almost trivial exercise. XQuery makes an otherwise challenging task quite easy indeed.

Understanding an XQuery

Counties have attractions, and counties have cities with populations. When joining together many-to-one data sources, I always find it helpful to begin at the top. Listing 1 shows a simple XML query against the CHAMBER_OF_COMMERCE table.

Code Listing 1: Demonstrating the ora:view function

SELECT XMLQuery(   'for $c in ora:view("CHAMBER_OF_COMMERCE")    return $c' RETURNING CONTENT)FROM dual; <ROW>   <COC_ID>1</COC_ID>   <COC_NAME>Alger County Chamber of Commerce</COC_NAME>   <COC_PHONE>(906) 387-2138</COC_PHONE>   <COC_COUNTY>Alger</COC_COUNTY></ROW>

The XMLQuery function used in Listing 1 is part of Oracle's XQuery application-programming interface (API). It's a SQL/XML function that transmits an XQuery statement to the database and returns a single XML document as a result. The XML document will be an XMLType value. The for and return clauses in the first argument to XMLQuery represent XQuery syntax. The W3C XQuery standard requires that XQuery keywords be lowercase, something to be careful of if you're used to uppercasing your SQL keywords.

Listing 1's XQuery statement invokes the ora:view function built into Oracle's implementation of XQuery. The function transforms the rows from the CHAMBER_OF_COMMERCE table into a sequence of XML documents. Each document is composed of a single <ROW> element representing one row from the table. Elements corresponding to the column values for the row are nested under that <ROW> element.

The for clause in Listing 1 iterates over the incoming XML documents. During each iteration, the variable $c refers to the current document. No transformation of the XML takes place. The return clause executes for each iteration and simply returns each input document, unchanged, as an element in the output document. The <ROW> element shown in Listing 1 reflects the output from ora:view.

You won't be able to read much about XQuery without encountering the acronym FLWOR. This acronym is pronounced "flower," and it refers to the basic for-let-where-order by-return expression syntax that is at the core of working with XQuery. Listing 1 uses for and return.

Translation - Korean
XQuery Flowers

XQuery Flowers

XQuery 사용한 XML 관계형 데이터베이스 검색과 변환

XQuery는 W3C(World Wide Web Consortium)에서 개발하고 표준을 정한 XML 쿼리 언어입니다. XQuery의 용도는 XML을 통하여 볼 수 있는 데이터를 찾고 검색하고 재배열하는 것입니다. XQuery는 구문이며 XML 표현식은 그 구문을 사용하여 작성한 것입니다. Oracle은 Oracle Database 10g Release 2에서 처음으로 XQuery를 채용하였으며 그 구현으로 XML 문서와 관계형 테이블에서 데이터를 작성한 다음 그 데이터를 사용하여 새 XML 문서와 관계형 행 집합을 생성할 수 있습니다.

간단한 시나리오

여러분이 데이터베이스 개발자이고 관광 산업용 데이터베이스 유지 관리를 지원하고 있다고 가정합시다. 그림 1은 작업할 데이터를 나타냅니다.

  • 일반적인 관계형 테이블(CHAMBER_OF_COMMERCE)의 상공 회의소 데이터
  • Oracle XML DB Repository를 통하여 액세스하는 XML 문서의 관광 명소에 대한 정보 각 문서는 하나의 명소를 나타냅니다.
  • 테이블(COUNTY_CENSUS)의 문서로서 XMLType 열의 센서스 데이터 각 행에는 해당 카운티에 속한 모든 도시의 인구 수가 들어 있는 XML 문서가 있습니다.

관리자가 센서스 데이터와 관광객에 대한 정보를 결합한 XML 문서(카운티별로 정리)를 생성하라고 지시했습니다. 그러면 다음을 수행해야 합니다.

  1. CHAMBER_OF_COMMERCE 테이블에서 카운티 노드를 생성합니다.
  2. Oracle XML DB Repository에 있는 XML 문서의 각 카운티 관광 명소 데이터를 검색합니다.
  3. COUNTY_CENSUS 테이블 XML 문서에서 인구 수를 요약합니다.

다행히도 얼마 전에 Oracle Database 10g Release 2로 업그레이드했기 때문에 XQuery를 사용할 수 있습니다. 모든 데이터, 심지어 상공 회의소 데이터까지 XML 문서로 볼 수 있습니다. "XML로 생각할 수 있는" 구문을 사용하여 쿼리를 표현할 수 있습니다. 입력 XML 문서를 조작하고 재배열하여 완전히 새로운 유형의 XML 문서를 생성하는 것은 매우 간단한 일입니다. XQuery가 아니면 매우 힘들 수 있는 작업을 매우 쉽게 처리할 수 있도록 합니다.

XQuery의 이해

카운티에는 관광 명소가 있고 인구가 표시된 도시가 있습니다. 다대일 데이터 소스를 조인할 때 제 경우엔 맨 위에서 시작하는 것이 항상 유용하였습니다. 목록 1은 CHAMBER_OF_COMMERCE 테이블에 대한 단순 XML 쿼리입니다.

코드 목록 1: ora:view 함수 예시

SELECT XMLQuery(

   'for $c in ora:view("CHAMBER_OF_COMMERCE")

    return $c' RETURNING CONTENT)

FROM dual;

 

<ROW>

   <COC_ID>1</COC_ID>

   <COC_NAME>Alger County Chamber of Commerce</COC_NAME>

   <COC_PHONE>(906) 387-2138</COC_PHONE>

   <COC_COUNTY>Alger</COC_COUNTY>

</ROW>

목록1에서 사용된 XMLQuery 함수는 Oracle XQuery 응용 프로그래밍 인터페이스(API)의 일부 입니다. SQL/XML 함수는 XQuery 문을 데이터베이스로 전송하고 하나의 XML 문서를 결과로 반환합니다. XML 문서는 XMLType 값이 될 것입니다. XMLQuery에 대한 첫 번째 인수의 for 및 return 절은 XQuery 구문을 나타냅니다. W3C XQuery 표준에서는 XQuery 키워드가 소문자이어야 하므로 SQL 키워드를 습관적으로 대문자로 작성했었다면 주의해야 합니다.

목록 1의 XQuery 문은 Oracle의 XQuery 구현에 내장된 ora:view 함수룰 호출합니다. 이 함수는 CHAMBER_OF_COMMERCE 테이블의 행을 XML 문서로 변환합니다. 각 문서는 테이블의 한 행을 나타내는 단일 <ROW> 요소로 구성됩니다. 행의 열 값에 해당하는 요소는 그 <ROW> 요소 아래에서 중첩됩니다.

목록 1의 for 절은 수신되는 XML 문서에 대해 반복됩니다. 각 반복이 실행되는 동안에 변수 $c가 현재 문서를 참조합니다. XML 변환이 실행되지 않습니다. return 절은 각 반복에 대해 실행되며 각 입력 문서를 변경하지 않고 출력 문서의 요소로서 반환합니다. 목록 1의 <ROW> 요소는 ora:view의 출력을 반영합니다.

XQuery에 대한 내용을 읽을 때면 항상 FLWOR이라는 약어가 등장합니다. 이 약어는 "flower"와 동일하게 발음되며 XQuery 작업의 핵심인 기본 for-let-where-order by-return 표현식 구문을 나타냅니다. 목록 1에서는 for 및 return이 사용되었습니다.


Experience Years of experience: 26. Registered at ProZ.com: Feb 2005.
ProZ.com Certified PRO certificate(s) N/A
Credentials N/A
Memberships N/A
Software Microsoft Excel, Microsoft Word, Powerpoint, SDLX, Trados Studio
CV/Resume English (DOC)
Professional practices Moonsuk Park endorses ProZ.com's Professional Guidelines (v1.0).
Bio
Software localization and related documents such as user''s manual, help
file, Web site.
Also most of general documents including Marketing, business, trading etc.

Recent project(As of 10, 2005) : Oracle magazine(online), Microsoft Developer
Network(MSDN) articles.
This user has earned KudoZ points by helping other translators with PRO-level terms. Click point total(s) to see term translations provided.

Total pts earned: 8
(All PRO level)



See all points earned >
Keywords: translation, Korean, English, IT, software, computer, manual, help, web site, general documents. See more.translation, Korean, English, IT, software, computer, manual, help, web site, general documents, trados, competitive rate. See less.


Profile last updated
Apr 21, 2017



More translators and interpreters: English to Korean - Korean to English   More language pairs