X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FGlossary.pod;h=ae783a5e91be8cac9bc4802daf85cdb59e931155;hb=f7d6f0e11ffa9b0e8cce55a20de2edce00ca1786;hp=3e9d36a5846656b468f80ab961413d3e4fc04a19;hpb=880a1a0cc6a48a3165656fe5daf7ec288901c3e2;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Manual/Glossary.pod b/lib/DBIx/Class/Manual/Glossary.pod index 3e9d36a..ae783a5 100644 --- a/lib/DBIx/Class/Manual/Glossary.pod +++ b/lib/DBIx/Class/Manual/Glossary.pod @@ -4,42 +4,164 @@ DBIx::Class::Manual::Glossary - Clarification of terms used. =head1 INTRODUCTION -This document lists various terms used in DBIx::Class and attempts to explain them. +This document lists various terms used in DBIx::Class and attempts to +explain them. -=head1 TERMS +=head1 DBIx::Class TERMS + +=head2 DB schema + +Refers to a single physical schema within an RDBMS. Synonymous with the terms +'database', for MySQL; and 'schema', for most other RDBMS(s). + +In other words, it's the 'xyz' _thing_ you're connecting to when using any of +the following L(s): + + dbi:DriverName:xyz@hostname:port + dbi:DriverName:database=xyz;host=hostname;port=port + +=head2 Inflation + +The act of turning database row data into objects in +language-space. DBIx::Class result classes can be set up to inflate +your data into perl objects which more usefully represent their +contents. For example: L for +datetime or timestamp column data. + +See also L. + +=head2 Deflation + +The opposite of L. Existing perl objects that represent +column values can be passed to DBIx::Class methods to store into the +database. For example a L object can be automatically +deflated into a datetime string for insertion. + +See L and other modules in that namespace. =head2 ORM -=head2 ResultSet +Object-relational mapping, or Object-relationship modelling. Either +way it's a method of mapping the contents of database tables (rows), +to objects in programming-language-space. DBIx::Class is an ORM. -This is an object representing a set of data. It can either be an -entire table, or the results of a query. The actual data is not held -in the ResultSet, it is only a description of how to fetch the data. +=head2 Relationship -See also: L +In DBIx::Class a relationship defines the connection between exactly +two tables. The relationship condition lists the columns in each table +that contain the same values. It is used to output an SQL JOIN +condition between the tables. + +=head2 Relationship bridge + +A relationship bridge, such as C defines an accessor to +retrieve row contents across multiple relationships. + +The difference between a bridge and a relationship is, that the bridge +cannot be used to C tables in a C, instead its component +relationships must be used. + +=head2 Schema + +A Schema object represents your entire table collection, plus the +connection to the database. You can create one or more schema objects, +connected to various databases, with various users, using the same set +of table L definitions. + +At least one L class is needed per database. + +=head2 Result Class + +A Result class defines both a source of data (usually one per table), +and the methods that will be available in the L objects +created using that source. + +One Result class is needed per data source (table, view, query) used +in your application, they should inherit from L. + +See also: L =head2 ResultSource -ResultSource objects represent the source of your data, they are also known as -a table objects. +ResultSource objects represent the source of your data, these are +sometimes (incorrectly) called table objects. + +ResultSources do not need to be directly created, a ResultSource +instance is created for each L in your L, by +the proxied methods C and C. See also: L -=head2 Record +=head2 ResultSet + +This is an object representing a set of conditions to filter data. It +can either be an entire table, or the results of a query. The actual +data is not held in the ResultSet, it is only a description of how to +fetch the data. + +See also: L + +=head2 Result + +Result objects contain your actual data. They are returned from +ResultSet objects. These are sometimes (incorrectly) called +row objects, including older versions of the DBIC documentation. -See Row. +See also: L =head2 Row -Row objects contain your actual data. They are returned from ResultSet objects. +See Result. =head2 Object -See Row. +See Result. -=head2 Schema +=head2 Record -A Schema object represents your entire table collection, plus the -connection to the database. You can create one or more schema objects, -connected to various databases, with various users, using the same set -of table (ResultSource) definitions. +See Result. + +=head2 prefetch + +Similar to a join, except the related result objects are fetched and +cached for future use, instead of used directly from the ResultSet. This +allows you to jump to different relationships within a Result without +worrying about generating a ton of extra SELECT statements. + +=head1 SQL TERMS + +=head2 CRUD + +Create, Read, Update, Delete. A general concept of something that can +do all four operations (INSERT, SELECT, UPDATE, DELETE), usually at a +row-level. + +=head2 Join + +This is an SQL keyword, it is used to link multiple tables in one SQL +statement. This enables us to fetch data from more than one table at +once, or filter data based on content in another table, without having +to issue multiple SQL queries. + +=head2 Normalisation + +A normalised database is a sane database. Each table contains only +data belonging to one concept, related tables refer to the key field +or fields of each other. Some links to webpages about normalisation +can be found in L. + +=head2 Related data + +In SQL, related data actually refers to data that are normalised into +the same table. (Yes. DBIC does mis-use this term.) + +=head1 FURTHER QUESTIONS? + +Check the list of L. + +=head1 COPYRIGHT AND LICENSE + +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L.