In contrast, a database programming language is distinguished from a persistent programming language by its incorporation of features beyond persistence, such as transaction
management, concurrency control, and recovery (Bancilhon and Buneman, 1990). The
ISO SQL standard specifies that SQL can be embedded in the programming languages ‘C’,
Fortran, Pascal, COBOL, Ada, MUMPS, and PL/1 (see Appendix E). Communication is
through a set of variables in the host language, and a special preprocessor modifies the
source code to replace the SQL statements with calls to DBMS routines. The source code
can then be compiled and linked in the normal way. Alternatively, an API can be provided,
removing the need for any precompilation. Although the embedded approach is rather
clumsy, it was useful and necessary, as the SQL2 standard was not computationally complete.† The problems with using two different language paradigms have been collectively
called the impedance mismatch between the application programming language and
the database query language (see Section 25.2). It has been claimed that as much as
30% of programming effort and code space is devoted to converting data from database
or file formats into and out of program-internal formats (Atkinson et al., 1983). The
integration of persistence into the programming language frees the programmer from this
responsibility
ในทางตรงกันข้ามการเขียนโปรแกรมภาษาฐานข้อมูลจะแตกต่างจากการเขียนโปรแกรมภาษาถาวรโดยการรวมตัวกันของคุณสมบัติเกินคงอยู่เช่นการทำธุรกรรม
การจัดการการควบคุมการทำงานพร้อมกันและการกู้คืน (Bancilhon และ Buneman, 1990)
ISO มาตรฐาน SQL es speci Fi ว่า SQL สามารถฝังตัวในการเขียนโปรแกรมภาษา 'C'
Fortran, ปาสคาล, โคบอล, Ada, คางทูม, และ PL / 1 (ดูภาคผนวก E) การสื่อสารเป็น
ผ่านชุดของตัวแปรในภาษาโฮสต์และ preprocessor พิเศษ Modi ไฟ es
รหัสแหล่งที่มาเพื่อแทนที่คำสั่ง SQL ที่มีการเรียกไปตามปกติ DBMS รหัสแหล่งที่มา
นั้นจะสามารถรวบรวมและเชื่อมโยงในลักษณะปกติ หรือ API สามารถให้
การลบความจำเป็นในการ precompilation ใด ๆ แม้ว่าวิธีการฝังตัวค่อนข้าง
เงอะงะมันเป็นประโยชน์และจำเป็นเป็นมาตรฐาน SQL2 ยังไม่เสร็จสมบูรณ์คอมพิวเตอร์. †ปัญหากับการใช้กรอบความคิดสองภาษาที่แตกต่างได้รับการรวมกัน
เรียกว่าไม่ตรงกันความต้านทานระหว่างการเขียนโปรแกรมภาษาโปรแกรมและ
ภาษาการสืบค้นฐานข้อมูล ( ดูส่วนที่ 25.2) จะได้รับการอ้างว่ามากที่สุดเท่าที่
30% ของความพยายามในการเขียนโปรแกรมและพื้นที่รหัสคือเพื่อรองรับการแปลงข้อมูลจากฐานข้อมูล
หรือไฟเลอรูปแบบที่เข้าและออกจากรูปแบบโปรแกรมภายใน (แอตกินสัน et al., 1983)
การบูรณาการความคงทนในการเขียนโปรแกรมภาษาช่วยให้โปรแกรมเมอร์จากนี้
ความรับผิดชอบ
การแปล กรุณารอสักครู่..
