Warning, /libraries/kdb/docs/kdb_issues.txt is written in an unsupported language. File is not indexed.
0001 --------------------------------------------------------- 0002 IDEAS, ISSUES, PROPOSALS for KDb 0003 Copyright (C) 2003 Jarosław Staniek staniek at kde.org 0004 Started: 2003-08-01 0005 KDb home page: https://community.kde.org/KDb 0006 0007 Changes: 0008 2005-09-16 Global BLOBs Storage 0009 --------------------------------------------------------- 0010 0011 | 0012 | This document is expected to be independent of given KDb dirver implementation, 0013 | but proposals are described here are after certain decisions has been made: 0014 | -drivers are (by current importance): SQLite (embedded), 0015 | ODBC (universality reasons ), Mysql (historical reasons), PostgreSQL 0016 | 0017 0018 ----------------------------------------------------------------- 0019 0020 1. EXTENSION: Option for setting user-defined error messages on selected error types. 0021 0022 Since new KDb has fully i18n'd user-visible messages, it outperforms other products as MSA 0023 (that often shows confusing message coming directly from the engine). There is possibility 0024 to provide users with table of error messages that they can personalize. These settings can 0025 be properties of table (query, form, etc.) and thus can be inherited (eg. by form from a table). 0026 By default, i18n'd messages from KDb can be presented. 0027 0028 <EXAMPLE> 0029 Before we set our message for UNIQUE KEY conflict for table Cars (name varchar UNIQUE, price integer), 0030 we have got this message when try to violate 'unique' restionction: 0031 "There is already added one record with field 'name' set to 'Dodge' in table 'Cars'. 0032 This field must be unique." 0033 Now, we want more descriptive message: "There should be only one car named 'Dodge'!". 0034 We write this not as above, but rather: "There should be only one car named %field%!", 0035 since %field% is automatically substituted by given field value. After this we get message 0036 that is easier to understand for everyday user. Of course KDb (and competitors too) never will 0037 be so clever as a human in building such messages automatically. 0038 </EXAMPLE> 0039 0040 <NOTE>Inheriting messages: it will be more conventient to set up custom messages (if required) 0041 for table definition rather than just in form. If we set up given message in for a table, every 0042 form that uses this table as data source (end every query that do so) can use this message when needed. 0043 This note is also useful for other types of properties that can be inherited by extended objects from. 0044 </NOTE> 0045 0046 ----------------------------------------------------------------- 0047 0048 2. KDb classes inheritance diagram 0049 0050 TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO 0051 0052 Object 0053 DriverManager 0054 Driver 0055 [DRIVER]Driver 0056 Connection 0057 [DRIVER]Connection 0058 0059 [DRIVER] should be substituted by SQLite, MySQL, etc. 0060 These are classess to reimplement in the drivers. 0061 0062 ConnectionData 0063 Field 0064 Cursor 0065 [DRIVER]Cursor 0066 FieldList 0067 TableSchema 0068 QuerySchema 0069 IndexSchema 0070 Transaction 0071 TransactionGuard 0072 BaseExpr 0073 NArgExpr 0074 UnaryExpr 0075 BinaryExpr 0076 ConstExpr 0077 VariableExpr 0078 0079 ----------------------------------------------------------------- 0080 0081 3. Table schema, query schema, etc. storage 0082 0083 Table or query schemas are extended with additional properties, 0084 usually not available from most db engines or even related to gui. 0085 0086 //This table contains list of KDb object stored within project (tables, queries, etc.) 0087 kexi__objects 0088 o_id integer unsigned primary key auto_increment, 0089 o_type byte, //type id taken from KDb::ObjectTypes 0090 o_name varchar(200), 0091 o_caption varchar(200), //optional, enriched name, can contain non-latin1 characters 0092 o_help varchar 0093 0094 //This table contains object's data, such as form's xml def. 0095 kexi__objectdata 0096 o_id integer REFERENCES kexi__objects(o_id), 0097 o_data varchar, 0098 o_sub_id varchar(200) //sometimes single object can have more than one data 0099 //-these can be identified by o_sub_id 0100 //if not needed, leave it as NULL 0101 0102 0103 //This table contains fields that are members of given KDb object. 0104 //Not all object types should be allowed, now allowed are tables and queries 0105 kexi__fields 0106 t_id integer REFERENCES kexi__objects(o_id), 0107 f_type byte, 0108 f_name varchar(200), 0109 f_length integer, 0110 f_precision integer, 0111 f_constraints integer, 0112 f_options integer, 0113 f_default varchar, 0114 //these are additional properties: 0115 f_order integer, 0116 f_caption varchar(200), 0117 f_help varchar 0118 0119 //This table contains a list of parts defined for this database 0120 kexi__parts 0121 p_id integer unsigned primary key auto_increment, 0122 p_name varchar(200), 0123 p_mime varchar(200), 0124 p_url varchar 0125 TODO: add version? 0126 0127 //This table contains global (predefined or not) properties for this database 0128 kexi__db 0129 db_property varchar(32), 0130 db_value varchar 0131 0132 //Predefined properties stored in kexi__db: 0133 property="kexidb_major_ver", value=<major_version> 0134 Where: <version> is a string containing integer in textual form that denotes 0135 KDb implementation major version used to create or update this database. 0136 This property is useful for KDb library and applications to denote 0137 what KDb features could be available. This ensures backward compatibility 0138 and (at least in some cases) -- forward compatibility. 0139 property="kexidb_minor_ver", value=<minor_version> 0140 like above -- minor KDb version 0141 property="project_caption", value=<string> 0142 property="project_desc", value=<string> 0143 0144 TODO: put more props. todo - creator, created date, etc. (also to KexiProjectData) 0145 0146 // Global BLOBs Storage (BLOB == BINARY LARGE OBJECT) 0147 // Designed to store any kind of static images, sound and other binary data 0148 //Table: 0149 kexi__blobs 0150 o_id integer unsigned primary key auto_increment, //unique project-wide identifier of a BLOB 0151 o_data BLOB, 0152 o_name varchar(200), //optional, name of the blob, 0153 //can be e.g. a name of original file the data comes from, 0154 //can contain non-latin1 characters 0155 o_caption varchar(200), //optional, enriched name, can contain non-latin1 characters 0156 o_mime varchar(200) NOT NULL, //MIME type of a BLOB, e.g. image/jpg 0157 o_folder_id integer unsigned //references kexi__gallery_folders.f_id 0158 //If null, the BLOB only points to virtual "All" folder 0159 //WILL BE USED in Kexi >=1.1 0160 0161 //(not yet implemented, planned for 1.1) 0162 //User-defined folders for better BLOBs categorizing. 0163 //For simplification, folders have no lowlevel name but only caption. 0164 //By default there are no physical folders, but only following virtual: 0165 //-"All" folder 0166 //-"Used" folder (computation of this takes some time because design of forms 0167 // and reports needs to be parsed) 0168 //-"Unused" folder (the same note as for "Used) 0169 //-"By type" folder with "jpeg", "png" subfolders, etc. - available by grepping using BLOB's o_mime 0170 kexi__gallery_folders 0171 f_id integer unsigned primary key auto_increment, //unique id of a folder 0172 f_parent_id integer unsigned //references f_id, can be null for top level folders 0173 f_caption varchar(200), //optional, enriched name, can contain non-latin1 characters 0174 f_notes varchar, //optional notes 0175 0176 ----------------------------------------------------------------- 0177 0178 4. DEPRECATED TABLES 0179 0180 //This table contains additional information for query schemas 0181 kexi__querydata 0182 q_id integer REFERENCES kexi__objects(o_id), 0183 q_sql varchar, //raw sql text - stored in the unchanged form entered by a user (or generated) 0184 q_valid boolean, //query schema may be invalid (syntactically or logically, 0185 //but still can be stored) 0186 q_parent_tab integer REFERENCES kexi__objects(o_id) //parent table of this query 0187 0188 //This table contains information about fields defined in select queries 0189 kexi__queryfields 0190 q_id integer REFERENCES kexi__objects(o_id), 0191 f_order integer, //order of this field in query schema 0192 f_id integer REFERENCES kexi__objects(f_order), //may be NULL if a field is asterisk 0193 f_tab_asterisk integer REFERENCES kexi__objects(o_id), //if this is "single-table" asterisk 0194 //this member references to valid tables id, otherwise is NULL 0195 f_alltab_asterisk boolean //true if this is "all-tables" asterisk, otherwise false 0196 0197 //This table contains information about tables used by select queries 0198 kexi__querytables 0199 q_id integer REFERENCES kexi__objects(o_id), 0200 t_id integer REFERENCES kexi__objects(o_id), //references to table used by given q_id 0201 t_order integer //order of t_id table in query schema's tables list 0202 0203