A massive amount of link fixes (just links, almost no rewording)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / Glossary.pod
CommitLineData
24105556 1=head1 NAME
2
880a1a0c 3DBIx::Class::Manual::Glossary - Clarification of terms used.
24105556 4
5=head1 INTRODUCTION
6
9e7b9292 7This document lists various terms used in DBIx::Class and attempts to
8explain them.
24105556 9
92fcfd01 10=head1 DBIx::Class TERMS
24105556 11
db2b2eb6 12=head2 DB schema
13
14Refers to a single physical schema within an RDBMS. Synonymous with the terms
15'database', for MySQL; and 'schema', for most other RDBMS(s).
16
17In other words, it's the 'xyz' _thing_ you're connecting to when using any of
18the following L<DSN|DBI/connect>(s):
19
20 dbi:DriverName:xyz@hostname:port
21 dbi:DriverName:database=xyz;host=hostname;port=port
22
9e7b9292 23=head2 Inflation
24
25The act of turning database row data into objects in
92fcfd01 26language-space. DBIx::Class result classes can be set up to inflate
27your data into perl objects which more usefully represent their
28contents. For example: L<DBIx::Class::InflateColumn::DateTime> for
29datetime or timestamp column data.
9e7b9292 30
92fcfd01 31See also L<DBIx::Class::InflateColumn>.
9e7b9292 32
92fcfd01 33=head2 Deflation
9e7b9292 34
92fcfd01 35The opposite of L</Inflation>. Existing perl objects that represent
36column values can be passed to DBIx::Class methods to store into the
37database. For example a L<DateTime> object can be automatically
38deflated into a datetime string for insertion.
9e7b9292 39
92fcfd01 40See L<DBIx::Class::InflateColumn> and other modules in that namespace.
9e7b9292 41
24105556 42=head2 ORM
43
9e7b9292 44Object-relational mapping, or Object-relationship modelling. Either
45way it's a method of mapping the contents of database tables (rows),
46to objects in programming-language-space. DBIx::Class is an ORM.
47
7cf4ae7a 48=head2 Relationship
49
50In DBIx::Class a relationship defines the connection between exactly
51two tables. The relationship condition lists the columns in each table
52that contain the same values. It is used to output an SQL JOIN
53condition between the tables.
54
55=head2 Relationship bridge
56
57A relationship bridge, such as C<many_to_many> defines an accessor to
8273e845 58retrieve row contents across multiple relationships.
7cf4ae7a 59
92fcfd01 60The difference between a bridge and a relationship is, that the bridge
61cannot be used to C<join> tables in a C<search>, instead its component
62relationships must be used.
24105556 63
92fcfd01 64=head2 Schema
24105556 65
92fcfd01 66A Schema object represents your entire table collection, plus the
67connection to the database. You can create one or more schema objects,
68connected to various databases, with various users, using the same set
5529838f 69of table L</Result Class> definitions.
92fcfd01 70
71At least one L<DBIx::Class::Schema> class is needed per database.
72
5529838f 73=head2 Result Class
92fcfd01 74
75A Result class defines both a source of data (usually one per table),
fb13a49f 76and the methods that will be available in the L</Result> objects
77created using that source.
92fcfd01 78
79One Result class is needed per data source (table, view, query) used
80in your application, they should inherit from L<DBIx::Class::Core>.
24105556 81
fb13a49f 82See also: L<DBIx::Class::Manual::ResultClass>
83
24105556 84=head2 ResultSource
85
92fcfd01 86ResultSource objects represent the source of your data, these are
87sometimes (incorrectly) called table objects.
88
89ResultSources do not need to be directly created, a ResultSource
5529838f 90instance is created for each L</Result Class> in your L</Schema>, by
92fcfd01 91the proxied methods C<table> and C<add_columns>.
24105556 92
93See also: L<DBIx::Class::ResultSource/METHODS>
94
92fcfd01 95=head2 ResultSet
96
97This is an object representing a set of conditions to filter data. It
98can either be an entire table, or the results of a query. The actual
99data is not held in the ResultSet, it is only a description of how to
100fetch the data.
101
102See also: L<DBIx::Class::ResultSet/METHODS>
103
fb13a49f 104=head2 Result
105
106Result objects contain your actual data. They are returned from
107ResultSet objects. These are sometimes (incorrectly) called
108row objects, including older versions of the DBIC documentation.
109
110See also: L<DBIx::Class::Manual::ResultClass>
24105556 111
2dcff23a 112=head2 Row
113
114See Result.
115
24105556 116=head2 Object
117
fb13a49f 118See Result.
24105556 119
2dcff23a 120=head2 Record
24105556 121
2dcff23a 122See Result.
fb13a49f 123
92fcfd01 124=head2 prefetch
125
9acb6956 126Similar to a join, except the related result objects are fetched and
fb13a49f 127cached for future use, instead of used directly from the ResultSet. This
128allows you to jump to different relationships within a Result without
129worrying about generating a ton of extra SELECT statements.
92fcfd01 130
131=head1 SQL TERMS
132
fb13a49f 133=head2 CRUD
134
135Create, Read, Update, Delete. A general concept of something that can
136do all four operations (INSERT, SELECT, UPDATE, DELETE), usually at a
137row-level.
138
92fcfd01 139=head2 Join
140
141This is an SQL keyword, it is used to link multiple tables in one SQL
142statement. This enables us to fetch data from more than one table at
143once, or filter data based on content in another table, without having
144to issue multiple SQL queries.
145
146=head2 Normalisation
147
148A normalised database is a sane database. Each table contains only
149data belonging to one concept, related tables refer to the key field
150or fields of each other. Some links to webpages about normalisation
5529838f 151can be found in L<the FAQ|DBIx::Class::Manual::FAQ>.
92fcfd01 152
153=head2 Related data
154
155In SQL, related data actually refers to data that are normalised into
fb13a49f 156the same table. (Yes. DBIC does mis-use this term.)
157
158=head1 AUTHOR AND CONTRIBUTORS
159
160See L<AUTHOR|DBIx::Class/AUTHOR> and L<CONTRIBUTORS|DBIx::Class/CONTRIBUTORS> in DBIx::Class
161
162=head1 LICENSE
163
164You may distribute this code under the same terms as Perl itself.