Please use this identifier to cite or link to this item: https://cuir.car.chula.ac.th/handle/123456789/55600
Title: เครื่องมือตรวจหาเอสคิวแอลแอนติแพตเทิร์น และการกำหนดกระบวนการรีแฟคทอริงฐานข้อมูล
Other Titles: SQL Antipatterns Detection Tool and Database Refactoring Process Definition
Authors: ปุณยนุช ขำนิล
Advisors: ทวิตีย์ เสนีวงศ์ ณ อยุธยา
Other author: จุฬาลงกรณ์มหาวิทยาลัย. คณะวิศวกรรมศาสตร์
Advisor's Email: Twittie.S@Chula.ac.th,twittie.s@chula.ac.th
Issue Date: 2559
Publisher: จุฬาลงกรณ์มหาวิทยาลัย
Abstract: เอสคิวแอลแอนติแพตเทิร์น เป็นขั้นตอนการทำงานที่ผิดพลาดที่มักพบบ่อย ๆ ในการออกแบบฐานข้อมูลเชิงสัมพันธ์ การใช้เอสคิวแอล และการพัฒนาแอพพลิเคชันฐานข้อมูล ขั้นตอนการทำงานเหล่านี้ทำเพื่อแก้ปัญหาบางอย่าง แต่ในที่สุดก็สามารถนำไปสู่ปัญหาอื่น ๆ ได้ วัตถุประสงค์ของงานวิจัยนี้คือการช่วยผู้ดูแลระบบฐานข้อมูลในการวินิจฉัยหรือตรวจหาเอสคิวแอลแอนติแพตเทิร์น และแนะนำเทคนิคการรีแฟคทอริงฐานข้อมูลเพื่อแก้ปัญหาเอสคิวแอลแอนติแพตเทิร์น โดยเฉพาะอย่างยิ่ง งานวิจัยนี้พยายามที่จะทำให้การตรวจหาเอสคิวแอลแอนติแพตเทิร์นของการออกแบบฐานข้อมูลเชิงตรรกะสามารถทำได้อย่างอัตโนมัติ โดยการพัฒนาเครื่องมือที่ใช้ภาษาทรานแซคเอสคิวแอล เพื่อค้นหาและวิเคราะห์สคีมาฐานข้อมูล เครื่องมือสามารถรายงานเอสคิวแอลแอนติแพตเทิร์นที่อาจเกิดขึ้นและให้คำแนะนำในการรีแฟคทอริงสคีมาของฐานข้อมูลได้ จากการประเมินผลฐานข้อมูลสามแหล่งจากอุตสาหกรรม พบว่าประสิทธิภาพของเครื่องมือนี้เป็นที่น่าพอใจในแง่ของค่าเรียกคืนเอสคิวแอลแอนติแพตเทิร์น แต่เครื่องมือทำนายผิดว่าเกิดแอนติแพตเทิร์นในหลายจุด ซึ่งส่งผลต่อความเที่ยงตรง อย่างไรก็ตาม ผู้วิจัยได้ทำการทดสอบเพื่อเปรียบเทียบประสิทธิภาพของเครื่องมือที่เสนอกับวิธีการตรวจหาเอสคิวแอลแอนติแพตเทิร์นของงานวิจัยอื่น ได้แก่งานวิจัยของ Eessaar พบว่าเครื่องมือที่เสนอมีค่าเรียกคืนและค่าความเที่ยงตรง ส่วนมากดีกว่าวิธีของ Eessaar จากผลการวิจัยสรุปได้ว่าการตรวจสอบเอสคิวแอลแอนติแพตเทิร์น ยังต้องอาศัยการพิจารณาความหมายของข้อมูลอยู่อีกมากและเครื่องมือตรวจสอบควรถูกนำมาใช้ในรูปแบบกึ่งอัตโนมัติมากกว่า กล่าวคือสามารถใช้เครื่องมือในการชี้ตำแหน่งที่เป็นไปได้ที่อาจเกิดแอนติแพตเทิร์นขึ้นในสคีมาฐานข้อมูลจากนั้นจึงใช้การวิเคราะห์เพิ่มเติมจากผู้ดูแลระบบฐานข้อมูล วิธีนี้จะเป็นประโยชน์โดยเฉพาะอย่างยิ่งในบริบทของฐานข้อมูลขนาดใหญ่ที่การตรวจสอบเอสคิวแอลแอนติแพตเทิร์นด้วยมนุษย์เป็นเรื่องยาก
Other Abstract: SQL antipatterns are frequently-made missteps that are commonly found in the design of relational databases, the use of SQL, and the development of database applications. They are intended to solve certain problems but will eventually lead to other problems. The motivation of this research is how to assist database administrators in diagnosing SQL antipatterns and suggest refactoring techniques to solve the antipatterns. Specifically, this research attempts to automate the detection of logical database design antipatterns by developing a tool that uses Transact-SQL language to query and analyze the database schema. The tool reports on potential antipatterns and gives an instruction on how to refactor the database schema. In an evaluation based on three databases from the industry, the performance of the tool is satisfactory in terms of recall of the antipatterns but the tool detects a number of false positives which affect its precision. However, an experiment is further conducted to compare the performance of the proposed tool with that of other SQL antipattern detection research by Eessaar. The result shows that the tool has better recall and precision for most cases of antipattern detection. From this research, it is found that SQL antipatterns detection still largely depends on the semantics of the data and the detection tool should rather be used in a semi-automated manner, i.e it can point out potential problematic locations in the database schema which require further diagnosis by the database administrators. This approach would be useful especially in the context of large databases where manual antipatterns inspection is difficult.
Description: วิทยานิพนธ์ (วท.ม.)--จุฬาลงกรณ์มหาวิทยาลัย, 2559
Degree Name: วิทยาศาสตรมหาบัณฑิต
Degree Level: ปริญญาโท
Degree Discipline: วิศวกรรมซอฟต์แวร์
URI: http://cuir.car.chula.ac.th/handle/123456789/55600
URI: http://doi.org/10.58837/CHULA.THE.2016.988
metadata.dc.identifier.DOI: 10.58837/CHULA.THE.2016.988
Type: Thesis
Appears in Collections:Eng - Theses

Files in This Item:
File Description SizeFormat 
5870948621.pdf5.78 MBAdobe PDFView/Open


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.