What happens when you need to make some really complex queries, with a few
joins of different types, group by's and aggregates? Is it still possible?

On Tue, Jan 11, 2011 at 5:02 AM, Octavian Rasnita <orasn...@gmail.com>wrote:

> From: "Sean Murphy" <mhysnm1...@gmail.com>
>
>  Hi
>>
>> With this class, can you build relationships with it? so if I have a
>> database that has five tables.
>>
>> table1 contains a list of book names, book type, etc.
>>
>> Table 2 contains book id and author id to establish a many to many
>> relation ship with the author table with is table 3.
>>
>> Table 4 is the category table with id and category name.
>>
>> Table 5 is another many to many relationship to permit a book to be in
>> multiple categories.
>>
>> From memory, DBI you had to have a good knowledge of SQL and the sql
>> statements got very long and complex when you had a complex relationship.
>> Note, i am using SQL lite for the database at this stage as I am playing
>> with a small catalog program for personal use.
>> Sean
>>
>
>
>
> Yes you can define these relationships. You han define a has_one, has_many,
> many_to_many, belongs_to type of relationships.
>
> DBIx::Class::Schema::Loader can generate the whole schema (including the
> relations among tables if they are defined in the DB using foreign keys).
> Of course, even they are not defined in the DB, you can define them
> manually in the result source classes.
> Octavian
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

Reply via email to