1DBD::File::Roadmap(3) User Contributed Perl DocumentationDBD::File::Roadmap(3)
2
3
4
6 DBD::File::Roadmap - Planned Enhancements for DBD::File and pure Perl
7 DBD's
8
9 Jens Rehsack - May 2010
10
12 This document gives a high level overview of the future of the
13 DBD::File DBI driver and groundwork for pure Perl DBI drivers.
14
15 The planned enhancements cover features, testing, performance,
16 reliability, extensibility and more.
17
19 Features
20 There are some features missing we would like to add, but there is no
21 time plan:
22
23 LOCK TABLE
24 The newly implemented internal common table meta storage area would
25 allow us to implement LOCK TABLE support based on file system
26 "flock ()" support.
27
28 Transaction support
29 While DBD::AnyData recommends explicitly committing by importing
30 and exporting tables, DBD::File might be enhanced in a future
31 version to allow transparent transactions using the temporary
32 tables of SQL::Statement as shadow (dirty) tables.
33
34 Transaction support will heavily rely on lock table support.
35
36 Data Dictionary Persistence
37 SQL::Statement provides dictionary information when a "CREATE TABLE
38 ..." statement is executed. This dictionary is preserved for some
39 statement handle attribute fetches (as "NULLABLE" or "PRECISION").
40
41 It is planned to extend DBD::File to support data dictionaries to
42 work on the tables in it. It is not planned to support one table in
43 different dictionaries, but you can have several dictionaries in
44 one directory.
45
46 SQL Engine selecting on connect
47 Currently the SQL engine selected is chosen during the loading of
48 the module DBI::SQL::Nano. Ideally end users should be able to
49 select the engine used in "DBI->connect ()" with a special
50 DBD::File attribute.
51
52 Other points of view to the planned features (and more features for the
53 SQL::Statement engine) are shown in SQL::Statement::Roadmap.
54
55 Testing
56 DBD::File and the dependent DBD::DBM requires a lot more automated
57 tests covering API stability and compatibility with optional modules
58 like SQL::Statement.
59
60 Performance
61 Several arguments for support of features like indexes on columns and
62 cursors are made for DBD::CSV (which is a DBD::File based driver, too).
63 Similar arguments could be made for DBD::DBM, DBD::AnyData, DBD::RAM or
64 DBD::PO etc.
65
66 To improve the performance of the underlying SQL engines, a clean re-
67 implementation seems to be required. Currently both engines are
68 prematurely optimized and therefore it is not trivial to provide
69 further optimization without the risk of breaking existing features.
70
71 Join the DBI developers IRC channel at <irc://irc.perl.org/dbi> to
72 participate or post to the DBI Developers Mailing List.
73
74 Reliability
75 DBD::File currently lacks the following points:
76
77 duplicate table names
78 It is currently possible to access a table quoted with a relative
79 path (a) and additionally using an absolute path (b). If (a) and
80 (b) are the same file that is not recognized (except for flock
81 protection handled by the Operating System) and two independent
82 tables are handled.
83
84 invalid table names
85 The current implementation does not prevent someone choosing a
86 directory name as a physical file name for the table to open.
87
88 Extensibility
89 I (Jens Rehsack) have some (partially for example only) DBD's in mind:
90
91 DBD::Sys
92 Derive DBD::Sys from a common code base shared with DBD::File which
93 handles all the emulation DBI needs (as getinfo, SQL engine
94 handling, ...)
95
96 DBD::Dir
97 Provide a DBD::File derived to work with fixed table definitions
98 through the file system to demonstrate how DBI / Pure Perl DBDs
99 could handle databases with hierarchical structures.
100
101 DBD::Join
102 Provide a DBI driver which is able to manage multiple connections
103 to other Databases (as DBD::Multiplex), but allow them to point to
104 different data sources and allow joins between the tables of them:
105
106 # Example
107 # Let table 'lsof' being a table in DBD::Sys giving a list of open files using lsof utility
108 # Let table 'dir' being a atable from DBD::Dir
109 $sth = $dbh->prepare( "select * from dir,lsof where path='/documents' and dir.entry = lsof.filename" )
110 $sth->execute(); # gives all open files in '/documents'
111 ...
112
113 # Let table 'filesys' a DBD::Sys table of known file systems on current host
114 # Let table 'applications' a table of your Configuration Management Database
115 # where current applications (relocatable, with mountpoints for filesystems)
116 # are stored
117 $sth = dbh->prepare( "select * from applications,filesys where " .
118 "application.mountpoint = filesys.mountpoint and ".
119 "filesys.mounted is true" );
120 $sth->execute(); # gives all currently mounted applications on this host
121
123 Our priorities are focused on current issues. Initially many new test
124 cases for DBD::File and DBD::DBM should be added to the DBI test suite.
125 After that some additional documentation on how to use the DBD::File
126 API will be provided.
127
128 Any additional priorities will come later and can be modified by
129 (paying) users.
130
132 See <http://dbi.perl.org/contributing> for how you can help.
133
134 If your company has benefited from DBI, please consider if it could
135 make a donation to The Perl Foundation "DBI Development" fund at
136 <http://dbi.perl.org/donate> to secure future development.
137
138 Alternatively, if your company would benefit from a specific new DBI
139 feature, please consider sponsoring it's development through the
140 options listed in the section "Commercial Support from the Author" on
141 <http://dbi.perl.org/support/>.
142
143 Using such targeted financing allows you to contribute to DBI
144 development and rapidly get something specific and directly valuable to
145 you in return.
146
147 My company also offers annual support contracts for the DBI, which
148 provide another way to support the DBI and get something specific in
149 return. Contact me for details.
150
151 Thank you.
152
153
154
155perl v5.36.0 2023-01-20 DBD::File::Roadmap(3)