GSoC Proposal: “G2 DB Reloaded” (Organization: Gallery)
This is the text of my proposal for the Google Summer of Code 2008 “G2 DB Reloaded”. The Organization is Gallery. All comments are welcome.
“G2 DB Reloaded”
1: Abstract (2500 characters limit)
1.1 Proposal Name
“G2 DB Reloaded”
1.2 Problem
Lack of built-in referential integrity support into Gallery2 (G2)’s Database Abstraction Layer (DBAL).
1.3 Purpose
To improve G2’s Database (DB) referential integrity
1.4 General Objective:
• To enable referential constrains into G2’s DBAL.
1.5 Deliverables
For the Mid-term Evaluation:
• Updated abstract DB schema design for G2 that supports foreign keys, with full documentation.
• Updated XML definitions for the abstract DB schema.
For the Final Evaluation:
• Updated SQL generation programs for all targeted databases.
• Modified relevant G2 DB APIs (such as GalleryStorage and GalleryCoreAPI) and their tests.
1.6 Web Site
http://allentiak.wordpress.com
2: Detailed Proposal (7500 characters limit)
This is the text of my proposal for the Google Summer of Code 2008 “G2 DB Reloaded”. The Organization is Gallery. All comments are welcome.
“G2 DB Reloaded”
1 Abstract (2500 characters limit)
1.1 Proposal Name
“G2 DB Reloaded”
1.2 Problem
Lack of built-in referential integrity support into Gallery2 (G2)’s Database Abstraction Layer (DBAL).
1.3 Purpose
To improve G2’s Database (DB) referential integrity
1.4 General Objective:
• To enable referential constrains into G2’s DBAL.
1.5 Deliverables
For the Mid-term Evaluation:
• Updated abstract DB schema design for G2 that supports foreign keys, with full documentation.
• Updated XML definitions for the abstract DB schema.
For the Final Evaluation:
• Updated SQL generation programs for all targeted databases.
• Modified relevant G2 DB APIs (such as GalleryStorage and GalleryCoreAPI) and their tests.
1.6 Web Site
http://allentiak.wordpress.com
2 Detailed Proposal (7500 characters limit)
2.1 Proposal Name
“G2 DB Reloaded”
2.2 Problem
Lack of a Gallery2 (G2) DB schema with foreign keys in order to
support internal coherence.
2.3 Purpose
To ease G2 DB schema’s referential integrity
2.4 General Objective:
• To modify the G2 DB schema and its APIs in order to support
foreign keys.
Specific Objectives
• To analyze the current DB schema in order to document all the
implicit (undocumented) logical references between tables.
• To create a new DB schema that expresses all the references
found in the previous step.
• To modify G2 APIs in order to support referential integrity
2.5 Deliverables
For the Mid-term Evaluation:
• A new DB schema design for G2 that supports foreign keys, fully
documented.
For the Final Evaluation:
• Modified G2 DB API (GalleryStorage)
2.6 Benefits for the Gallery Community
There are at least three benefits of accomplishing this idea. All
of them will contribute to boost the adoption of G2 over other
similar software.
• To take full advantage of G2’s approach of being DB-based by
using a basic DB mechanism: referential integrity.
• To increase the quality of G2’source code by eliminating the
occurrence of ERROR_MISSING_OBJECT-related errors.
• To increase the documentation available regarding G2 DB design.
2.7 Motivation
G2 (as opposite to G1) is database-driven. This approach aim is
supposed to let the DB engine take care of the management logic of
the data and let G2 concentrate on the application logic.
However, a key aspect for this is still missing: referential
integrity. Such a situation makes impossible to eliminate all the
DB logic-related errors[-1], by letting the DB engine handle
them.
In order to change this situation for the better, a modified G2
DB schema is needed. Given that G2 uses its own APIs in order to
manage the DB-related operation, this component also should be
modified in order not to disrupt the DB CRUD operations.
The value of a well documented and complete DB schema (that
Gallery currently lacks of) is high. That is why the
documentation of the whole DB schema is considered to be so
important in this project.
2.8 Activities
Here is how it is intended to proceed.
1. Research on how the G2 API (specifically, the GalleryStorage
class) works and what CRUD operation implements.
2. Analysis of the current DB schema in order to document all the
implicit (undocumented) logical references between tables.
3. Modification of G2’s DB schema in order to support foreign
keys that implement all the references found in the previous
step.
4. Modification of G2 APIs in order to support referential
integrity
5. Developing of Unit Tests for the new G2 DB schema.
(a) Installation Tests.
(b) CRUD Tests.
(c) Usage Tests.
6. Performing of Unit Tests defined above.
7. Documentation of the whole process.
2.9 Considerations
• This project will be the main activity during the period it
lasts.
• Weekly status reports will be made.
• The communication with the rest of the G2 community will be
fluent.
2.10 About the Student (section written in first person)
My name is Leandro Doctors; I am 26 years old. I live in San Juan
(Argentina), a small town located 1000 km to the west of Buenos
Aires, not too far from the border with Chile.
Contact Info
• Name: Leandro Doctors
• E-Mail: ldoctors-at-gusila.org.ar
• XMMP (Jabber): allentiak-at-lugmen.org.ar;
ldoctors-at-gmail.com
• Web Site: http://allentiak.wordpress.com
• Timezone: UTC -3 (minus three)
Educational and Technical Background
I am a student at the Faculty of Exact, Physical and Natural
Sciences (FCEFyN)[0] of the National University of San Juan
(UNSJ)[1]. I graduated one month ago from my first major
(Information Systems) and I started my second one (Computer
Science). My IS thesis[2] (in Spanish) describes the potential
application of grid technology to the FCEFyN campus and includes
a working prototype as a proof of concept. I love languages:
besides my native Spanish, I speak fluent English (B2 CEFRL[3]
level) and French (B1) and some Portuguese (A1) and German (A1).
You will find a résumé of my skills and abilities in my
weblog[2].
Free Software Background
I am a GNU/Linux user since 1999 and I have evolved into a free
software activist in 2002. I am co-founder of a small Free
Software Users Group: GUSILA[3]. Although it is currently not so
active right now, GUSILA has contributed to highlight Free
Software as a Subject of discussion into the City of San Juan.
Specially worth mentioning is the organization of the local
editions of the FLISoL (Latin American Free Software Install
Fest) in San Juan, in 2005, 2006[4] and 2007[5].
Also, I have contributed PHP code to the web console of Pandora
FMS (Free Monitoring System)[6].
Specific Skills
I have some expertise with database design, management and SQL. I
have worked at my University’s data center servers room for one
year and done small projects for local clients. From those
experiences, I have learned the value of a well documented and
complete DB schema (that Gallery currently lacks of). That is why
I consider the documentation of the whole DB schema to be so
important.
References
Regarding my modeling abilities, you can ask Mrs. María Inés
Lund[7], one of my professors at the UNSJ. Regarding my
contribution to the Pandora FMS project, you can ask Sancho
Lerena[8]. If you need other references, just let me know.
I think that my knowledge of Analysis and Design Languages (such
as UML) along with A&D techniques (such as the UP) plus some
knowledge about Knowledge Management can help me be the right man
for the job.
[-1]
http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=117411&group_id=7130&group_project_id=14056
[0] FCEFyN: http://www.fcefn.unsj-cuim.edu.ar/
[1] UNSJ: http://www.unsj.edu.ar
[2] Web log / Web site http://allentiak.wordpress.com
[3] GUSILA: http:/www.gusila.org.ar
[4] FLISoL 2006@San Juan:
http://installfest.info/FLISOL2006/Argentina/SanJuan
[5] FLISoL 2006@Rivadavia,San Juan:
http://installfest.info/FLISOL2007/Argentina/Rivadavia
[6] http://pandora.sourceforge.net/en/index.php?sec=about
[7] María Inés Lund: mlund-at-iinfo.unsj.edu.ar
[8] Sancho Lerena: slerena-at-gmail.com
3: Link to Further Information:
April 5, 2008 um 4:30 Uhr vormittags
I think that your on the right track, but you are underestimating the effort to modify the database schema to support foreign keys.
Because not only will the new unit tests you propose have to work, but the other 2600+ unit tests will need to run successfully as well.
In addition, what ever approach you develop not only has to work for MySQL, but also for Oracle, DB2, MS SQLServer, SqLite and postgesql.
You will also have to to make changes to how the schemas are generated which will require changes to the XML definitions as well. Check out gallery2/lib/tools/bin directory. Also see http://codex.gallery2.org/Gallery2:Module_Development_Tutorial#Working_With_the_Database for some background
Defining the foreign key and referential constraints is probably the easy part.
What might be a more realistic set of deliverables would be:
* A new schema for the supported modules that defines the referential constraints and foreign key relationships.
* new XML schema definitions
* Updated SQL generation programs
* An implementation documentation which clearly describes an approach to phasing in foreign key and referential constraints.
* And if time permits, start phasing in your foreign key implementation.
Hope this helps, Good luck