redundancy is due to the fact i have store a lakh rows(for each single image) in my table for every single user out of the lakh users.. hope u understand it.. On Jun 18, 8:02 pm, Himesh Madhusoodanan <[email protected]> wrote: > @AJ > > Can you please give me an example of redundancy in this design. Sorry, > iam just a beginner. > > Thank You > Himesh Madhusoodanan. > > On Sat, Jun 18, 2011 at 2:06 AM, AJ <[email protected]> wrote: > > Thanks Himesh for replying.. > > excatly this came to my mind also and i also setup the foreign key > > relationship of user_imag_table with both other tables(along with > > cascade on delete and update).. > > but problem with this approach is that if u got a lakh images and a > > lakh user total no combinations is lakh-square and thts really very > > large in terms of memory and efficiency of searching.. also it has > > redundancy.. > > > On Jun 17, 4:09 pm, Himesh <[email protected]> wrote: > > > @AJ > > > > You will need three tables atleast, simplest way. Lets say > > > img_tbl, usr_tbl, usr_img_tbl > > > > The img_tbl will have two fields the img_id( Primary key) , and > > > second img_url. > > > > The usr_tbl, usr_id(Primary key), usr_name. > > > > The usr_img_tbl will have the primary keys of both the other > > > tables as fields, thus creating the relationship, usr_id, img_id. > > > > Now all comes up to how you create the indexes on your tables, > > > I would suggest you create indexes for the id fields on tables img_tbl > > > and usr_tbl, and create 2 unique index using both the fields for > > > usr_img_tbl, inter changing the order of the fileds in each. > > > > Hope this helps. > > > > Thanks > > > Himesh. > > > > On Jun 17, 3:21 pm, AJ <[email protected]> wrote:> help needed on > > this: > >http://stackoverflow.com/questions/6384320/optimised-database-archite... > > > -- > > Mailing list guidelines and other related articles: > >http://lug-iitd.org/Footer
-- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
