As anyone can testify in the software industry, applications evolve as requirements change to meet expanding market demands. Determining when the file system is no longer an appropriate data store must be driven by current requirements as well as the future scaling and direction for the application. Considerations for the decision should not only include the database feature set of a commercial database, but time-to-market, reliability and maintenance costs.
A database management system or DBMS is feature rich tool that the application developer can use to easily and reliably store and retrieve data. However, a DBMS is not always an appropriate solution for addressing the application’s data storage needs. Some conditions where this might be applicable not to use a DBMS are:
Simple application data requirements or special purpose and relatively static data;
Data sets are very small and data loss is an acceptable risk; or,
Concurrent, multi-user access to data is not needed (“users” can be defined as multiple threads and/or multiple processes).
One example of an appropriate use for a file-system data store is the application configuration file or INI file. This type of data is typically static and rarely modified after the application installation.
Key Questions to Ask
Determining when it is no longer an effective design decision to use or continue to use a file system for data storage may not be a clear cut decision. The following questions may help in guiding the decision process.
Do you need object management?
Real world data are not files, they are objects. Applications map their objects into files and manage them through the application. A DBMS, on the other hand, is designed to manage objects and will allow the application to manage them directly without the need to add object management code.
Do you need object relationship management?
Relationships between different object types are required by most applications. File systems have no object concept, so no ability to manage relationships. A DBMS is designed to provide and manage object relationships.
Do you need transactional data operations?
Making sure that your data does not get corrupted, that threads don’t see inconsistent data or that data changes aren’t only partially completed can’t be handled through a file system. Without the support for ACID (Atomic, Consistent, Isolated, Durable) data transactions, vendors can fall into these traps resulting in large amount of code being added to the application. Embedded databases implement ACID transactions which prevents these problems.
Do you need concurrent access to your data?
Multiple applications accessing the same file will only exercise the file system lock arbiter. File systems do not notify waiting applications when another lock releases. The application ends up pooling or managing the sharing of data through its code. A DBMS manages concurrent access to data efficiently through resulting in faster access to your data and overall better performance for your application.
Do you need indexed data for fast lookups?
File systems do not index objects, they index files. Needing fast access to objects, implemented through a file system, means the application needs to manage index information. A DBMS manages indexing for the application seamlessly through the database schemas.
Do you need intelligent memory managed data?
Real-time applications needing complex memory and data management will find it hard to combine in-memory management with file based data management. With real-time data, RAM based management may be the only way to achieve performance requirements.
Do you need data redundancy?
Application vendors desiring failover and data redundancy will need to manage this in the application if it’s based on a file system.
Will your data management requirements change?
As applications get more complex so does the data management. File based solutions are tightly coupled with the initial application requirements and extremely hard to re-define and change.
Answering “yes” to any of the above question may indicate the data requirements for your application design is becoming more complex. Using a commercial DBMS allows the application development team to focus on the core competencies of their application while taking advantage of a data management solution which addresses the complexities of managed data.
DBMS Advantages
The feature list of a DBMS can only be considered an advantage if those features are essential in providing an effective solution to the application data management requirements. A quick summary of the features that address the questions above are:
Transaction Support- Atomic transactions guarantee complete failure or success of an operation. This includes automatic recovery of the database to a transaction consistent point in the event of an abnormal termination of the application (crash, power loss, etc.).
Concurrent Access- The ability to share data by controlling access to data items, many users (process or threads) can access data concurrently.
Data Normalization- A well designed database schema can reduce storage requirements on the target storage media by reducing duplicate data.
Expandability, Flexibility, Scalability- A database system can scale easily to larger data sets.
Standards Enforcement- One example of this advantage would be to use the DBMS for all data storage requirements for the application. Multiple data structures can be manipulated using the same API functions. The can lead to reduced application development times and reduced maintenance costs in the future.
Fast Query Access- Databases allow indexing based on any attribute or data-property (i.e. SQL columns). This helps fast retrieval of data, based on the indexed attribute. This is an importance advantage as data-sets begin to grow large as it provides a more predictable query response time.
Interoperability- Connectivity through industry standard protocols allowing third-party tools to access and analyze data.
อย่างที่ทุกคนสามารถเป็นพยานในอุตสาหกรรมซอฟต์แวร์ , โปรแกรมประยุกต์พัฒนา ตามความต้องการ เปลี่ยนเพื่อตอบสนองการความต้องการของตลาด กำหนดเมื่อระบบแฟ้มจะไม่มีการจัดเก็บข้อมูลที่เหมาะสมจะต้องขับเคลื่อนด้วยความต้องการปัจจุบัน รวมทั้งอนาคต ปรับทิศทาง สำหรับโปรแกรมข้อพิจารณาในการตัดสินใจควรเท่านั้นไม่รวมฐานข้อมูลชุดคุณลักษณะของฐานข้อมูลเชิงพาณิชย์ แต่ เวลา การตลาด ต้นทุนความน่าเชื่อถือและการบำรุงรักษา .
ระบบจัดการฐานข้อมูล หรือ DBMS เป็นคุณลักษณะที่อุดมไปด้วยเครื่องมือที่ผู้พัฒนาโปรแกรมสามารถใช้งานได้อย่างง่ายดายและเชื่อถือได้จัดเก็บและดึงข้อมูล อย่างไรก็ตามเป็น DBMS ไม่ได้เสมอทางออกที่เหมาะสมในการเป็นโปรแกรมการจัดเก็บข้อมูลความต้องการ บางเงื่อนไขที่อาจจะใช้ได้ไม่ต้องใช้ DBMS :
โปรแกรมง่ายๆข้อมูลความต้องการหรือวัตถุประสงค์พิเศษและข้อมูลที่ค่อนข้างคงที่ ;
ชุดข้อมูลมีขนาดเล็กมากและการสูญหายของข้อมูลมีความเสี่ยงที่ยอมรับได้ หรือ
พร้อมกัน ,ชื่อผู้ใช้ข้อมูลที่ไม่จำเป็น ( " ผู้ใช้ " สามารถกำหนดเป็นหลายกระทู้และ / หรือหลายกระบวนการ ) .
ตัวอย่างหนึ่งของการใช้ที่เหมาะสมสำหรับระบบแฟ้มเก็บข้อมูลเป็นโปรแกรมปรับแต่งไฟล์หรือไฟล์ INI ข้อมูลชนิดนี้มักจะคงที่ และแทบแก้ไขหลังการติดตั้งโปรแกรม คำถามที่สำคัญที่จะถาม
กำหนดเมื่อมันไม่มีประสิทธิภาพ การออกแบบการใช้และยังคงใช้ระบบแฟ้มสำหรับการจัดเก็บข้อมูลอาจจะตัดสินใจตัดชัดเจน คำถามต่อไปนี้จะช่วยให้แนวทางในการตัดสินใจ .
คุณต้องการการจัดการวัตถุ ?
ข้อมูลโลกจริงไม่ไฟล์พวกเขาเป็นวัตถุ โปรแกรมแผนที่วัตถุลงในไฟล์และจัดการกับพวกเขาผ่านทางโปรแกรม เป็น DBMS ,บนมืออื่น ๆที่ถูกออกแบบมาเพื่อจัดการกับวัตถุ และจะช่วยให้โปรแกรมที่จะจัดการกับพวกเขาโดยตรงโดยไม่ต้องเพิ่มรหัสการจัดการวัตถุ .
คุณต้องการการจัดการความสัมพันธ์กับวัตถุ ? ความสัมพันธ์ระหว่างชนิดของวัตถุที่แตกต่างกัน
จะถูกบังคับใช้โดยการประยุกต์ใช้มากที่สุด ระบบแฟ้มที่ไม่มีวัตถุ แนวคิดจึงไม่มีความสามารถในการจัดการความสัมพันธ์เป็น DBMS ที่ถูกออกแบบมาเพื่อให้ และจัดการความสัมพันธ์ของวัตถุ .
คุณต้องการข้อมูลการดำเนินงาน ?
เพื่อให้แน่ใจว่าข้อมูลของคุณไม่ได้รับความเสียหายที่กระทู้ไม่เจอข้อมูลที่ไม่สอดคล้องกัน หรือการเปลี่ยนแปลงข้อมูลไม่เพียงเสร็จบางส่วนไม่สามารถจัดการผ่านระบบแฟ้ม โดยการสนับสนุนสำหรับกรด ( อะตอม , สอดคล้อง , แยก , ทนทาน ) รายการข้อมูลผู้ขายสามารถตกอยู่ในกับดักเหล่านี้ส่งผลให้จำนวนมากของรหัสที่ถูกเพิ่มไปยังโปรแกรมประยุกต์ ฝังตัวฐานข้อมูลการใช้กรดซึ่งจะช่วยป้องกันปัญหาเหล่านี้ .
คุณต้องการการเข้าถึงข้อมูลของคุณ ?
หลายโปรแกรมเข้าถึงไฟล์เดียวกันจะใช้ระบบแฟ้มล็อกผู้ตัดสิน . ระบบแฟ้มที่ไม่แจ้ง รอการใช้งานเมื่ออื่นล็อคออกการสิ้นสุดการ หรือการจัดการการแบ่งปันข้อมูลผ่านรหัสของ เป็น DBMS จัดการการเข้าถึงข้อมูลได้อย่างมีประสิทธิภาพผ่านส่งผลให้เข้าถึงได้เร็วขึ้นและประสิทธิภาพโดยรวมที่ดีของข้อมูลสำหรับโปรแกรมของคุณ .
คุณต้องการข้อมูลดัชนีสำหรับการค้นหาอย่างรวดเร็ว
ระบบแฟ้มไม่ดัชนีวัตถุพวกเขาดัชนีไฟล์ ต้องการได้อย่างรวดเร็วการเข้าถึงวัตถุที่ใช้ผ่านระบบแฟ้มหมายถึง ความต้องการในการใช้เพื่อจัดการข้อมูลดัชนี เป็น DBMS จัดการดัชนีสำหรับการประยุกต์ใช้ได้อย่างลงตัวผ่านฐานข้อมูล schema .
คุณต้องการหน่วยความจำฉลาดการจัดการข้อมูล
เวลาจริงโปรแกรมต้องการหน่วยความจำที่ซับซ้อนและการจัดการข้อมูลจะพบว่ามันยากที่จะรวมในการจัดการหน่วยความจำกับไฟล์ตามข้อมูลการจัดการ ด้วยข้อมูลแบบเรียลไทม์แรมใช้จัดการอาจเป็นวิธีเดียวที่จะบรรลุประสิทธิภาพความต้องการ .
คุณต้องการความซ้ำซ้อนข้อมูล
ผู้ขายใบสมัครปรารถนายาเส้นและข้อมูลที่ซ้ำซ้อนจะต้องจัดการในโปรแกรมถ้ามันขึ้นอยู่กับระบบแฟ้ม .
คุณจะจัดการข้อมูลความต้องการการเปลี่ยนแปลง ?
เป็นโปรแกรมได้ซับซ้อนมากขึ้นแล้วข้อมูลการจัดการแฟ้มตามโซลูชั่นแน่น ๆควบคู่กับความต้องการโปรแกรมเริ่มต้นและยากมากที่จะ Re กำหนดและเปลี่ยนแปลง .
ตอบ " ใช่ " ใด ๆของคำถามข้างต้นอาจบ่งชี้ถึงความต้องการข้อมูลสำหรับการออกแบบใบสมัครของคุณจะกลายเป็นความซับซ้อนมากขึ้นใช้เชิงพาณิชย์หรือช่วยให้พัฒนาโปรแกรมทีมที่จะมุ่งเน้นไปที่ความสามารถหลักของโปรแกรมของพวกเขาในขณะที่การใช้ประโยชน์จากการจัดการข้อมูลโซลูชั่นที่เน้นความซับซ้อนของการจัดการข้อมูล .
หรือข้อดีรายการคุณลักษณะของ DBMS จะพิจารณาเป็นพิเศษถ้าคุณสมบัติเหล่านั้นที่จำเป็นในการให้บริการโซลูชั่นที่มีประสิทธิภาพการประยุกต์ใช้การจัดการข้อมูลความต้องการ บทสรุปของคำถามข้างต้นเป็นคุณสมบัติที่อยู่ :
สนับสนุนธุรกรรมธุรกรรมอะตอมรับประกันความสำเร็จ ความล้มเหลว หรือสมบูรณ์ของการผ่าตัดซึ่งรวมถึงการกู้คืนอัตโนมัติของฐานข้อมูลการธุรกรรมสอดคล้องจุด ในกรณีที่มีการเลิกจ้างที่ผิดปกติของโปรแกรม ( ความผิดพลาด , การสูญเสียพลังงาน , ฯลฯ ) .
พร้อมกันการเข้าถึง -- ความสามารถในการแบ่งปันข้อมูล โดยการควบคุมการเข้าถึงรายการข้อมูลผู้ใช้หลายคน ( กระบวนการหรือกระทู้ ) สามารถเข้าถึงข้อมูลพร้อมกัน .
ข้อมูลการฟื้นฟู - การออกแบบฐานข้อมูลสามารถลดความต้องการจัดเก็บข้อมูลในสื่อจัดเก็บข้อมูลซ้ำโดยการลดเป้าหมาย .
ขยาย , ความยืดหยุ่น , scalability - ระบบฐานข้อมูลสามารถปรับขนาดได้อย่างง่ายดายขนาดใหญ่ชุดข้อมูล .
มาตรฐานการบังคับใช้ - ตัวอย่างหนึ่งของผลประโยชน์นี้จะใช้ระบบการจัดการฐานข้อมูลสำหรับทุกการจัดเก็บข้อมูลความต้องการสำหรับโปรแกรมโครงสร้างของข้อมูลหลายที่สามารถจัดการการใช้ API เดียวกันฟังก์ชัน สามารถนำไปสู่การลดเวลาการพัฒนาและการลดต้นทุนการบำรุงรักษาในอนาคต การเข้าถึงฐานข้อมูลได้อย่างรวดเร็ว
- ช่วยให้ดัชนีตามคุณลักษณะหรือข้อมูลใด ๆคุณสมบัติ ( เช่นคอลัมน์ SQL ) นี้จะช่วยให้เรียกใช้อย่างรวดเร็วของข้อมูลตามดัชนีคุณลักษณะนี่คือความสำคัญประโยชน์เป็นชุดข้อมูลเริ่มเติบโตขนาดใหญ่มันมีได้มากกว่าการตอบสนองเวลาจริงการเชื่อมต่อผ่านอุตสาหกรรม .
- มาตรฐานโปรโตคอลที่ช่วยให้เครื่องมือของบุคคลที่สามสามารถเข้าถึงและวิเคราะห์ข้อมูล
การแปล กรุณารอสักครู่..
