MySQL Federated table(s)

9 views
Skip to first unread message

GaMaL

unread,
Sep 13, 2008, 7:38:53 PM9/13/08
to CAT Identity System Development
Al Salam 3lykom :)

This is Al Sayed Gamal stating my first recommended step to implement
this IDEA ..

I think you will need to read this ..
http://depiak.catreloaded.net/viewtopic.php?t=107#p562
and may be all the topic
http://depiak.catreloaded.net/viewtopic.php?t=107

+

for more informations about the FEDERATED Engine:
http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html

The Engine Description:
http://dev.mysql.com/doc/refman/5.0/en/federated-description.html

Limitations:
http://dev.mysql.com/doc/refman/5.0/en/federated-limitations.html =>
Very Important

+

We will make the BASICALLY the users table in phpbb3.0 a federated
one ..
so here's PHPBB3.0 source documentation
http://area51.phpbb.com/docs/code/

Now:
-Challenge 1

Install a a local 2 phpBB3.0 forums each with federated engine table
`prefix_users` ..
Both tables are pointing to a table or view in other "3rd" DB with the
same structure ..
Start registering users in both system, test main features Ex: posting
forums and topics ..

-Challenge 2

Decide which files and tables we will visit first for basic changes,
based on your visit to the documentation.
NOTE: user_function.php will be a very helpful file ..

Note: Report what happened please
Note: Please add this to documentation under "getting started" if you
don't mind.

Thanks

Salam :)

ahm_m...@yahoo.com

unread,
Sep 14, 2008, 1:35:48 PM9/14/08
to CAT Identity System Development
OK gamal I will try it isa

On Sep 14, 1:38 am, GaMaL <mail.ga...@gmail.com> wrote:
> Al Salam 3lykom :)
>
> This is Al Sayed Gamal stating my first recommended step to implement
> this IDEA ..
>
> I think you will need to read this ..http://depiak.catreloaded.net/viewtopic.php?t=107#p562
> and may be all the topichttp://depiak.catreloaded.net/viewtopic.php?t=107
>
> +
>
> for more informations about the FEDERATED Engine:http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html
>
> The Engine Description:http://dev.mysql.com/doc/refman/5.0/en/federated-description.html
>
> Limitations:http://dev.mysql.com/doc/refman/5.0/en/federated-limitations.html =>
> Very Important
>
> +
>
> We will make the BASICALLY the users table in phpbb3.0 a federated
> one ..
> so here's PHPBB3.0 source documentationhttp://area51.phpbb.com/docs/code/

Maher Saif

unread,
Sep 14, 2008, 4:05:35 PM9/14/08
to cat-ident...@googlegroups.com

Maher Saif

unread,
Sep 15, 2008, 4:20:11 PM9/15/08
to cat-ident...@googlegroups.com
I made a quick test and it was fun. But I found that we should not federate all the fields and those fields should be private for each forum as (post_no, user_rank, ...)


Maher Saif
Software Engineer
http://cat-hackers.com/


Eng.El Sayed Gamal

unread,
Sep 16, 2008, 5:47:26 AM9/16/08
to cat-ident...@googlegroups.com
Thanks Maher ..

I faced the same problem ..
We will also need to work on the session ..!!
unified login in other words ..

Salam
--
El-Sayed G. Abdul Azeem
Web Developer
PHP-MySQL instructor
ORIGIN IBM ATC
www.way2allah.com
development team
Email: mail....@gmail.Com
website: www.eGaMaL.com
(+2)0103544877

Ibrahim A. Mohamed

unread,
Sep 16, 2008, 10:10:28 AM9/16/08
to cat-ident...@googlegroups.com
Hey,

While I was looking at the users table in phpbb3.0, I found that this field: user_last_privmsg , I think this will create a problem here, because this private msg's ID can be common in most of the systems that will be integrated in the federation process.

Thanks in Advance!
--
Regards,
Ibrahim Abdel Fattah Mohamed
Web Developer
e-mail: bingo...@gmail.com
Personal bLOG: http://bingorabbit.com/

Eng.El Sayed Gamal

unread,
Sep 16, 2008, 10:58:58 AM9/16/08
to cat-ident...@googlegroups.com
The private messages tables will be federated too BTW
we talked about that .. when you have a new message you can check it anywhere and it'll be read every where ..!
the problem now is in all [unsharable data] like user posts we need a "nice" solution to separate your depiak posts from your hackers posts and so on ..
Unless we really need to sum all the posts for you ..?!
Keep mods to minimum please, and typically this will not be the fist time to face such a problem so it's recommended to have a protocol solving such a problem ..

Specially when we are dealing with data out of the main identity data like "number of posts, rank, etc .."

>>My primitive solution is to add a mod to let the posts be saved in extra fields
foundation_posts (user_id int,dep_posts int ,pixi_posts int,csed_posts int ) and we will remove the general posts_no field.
Example: ..
user data will be previewed..
{general data}
{foundation one: data} {foundation two: data} ...

So we will keep the foundation specific data and the CAT general data in one table.

That table will with time and it'll be horrible to control it ..:D

>>My other solution is to to replace every foundation table with a view with the same name and structure ..

formed of main data fields {from the main shared table} and foundation specific data from local table
so we will keep the foundation specific data and the CAT general data in two different tables.

This solution still need some search as I remembered now that Federated tables have problems with views ..
and It'll save code hacks unlike first one

I'm checking that issue now :)

Salam

Thank you guys please keep it up.
--
El-Sayed G. Abdul Azeem

Maher Saif

unread,
Sep 16, 2008, 4:03:58 PM9/16/08
to cat-ident...@googlegroups.com
My solutions is to create a table with the shared data and create a trigger for it and another tirgger for the users tables to sync up changes. Then we federate that table.
 
What do you think?

Maher Saif
Software Engineer
http://cat-hackers.com/


Eng.El Sayed Gamal

unread,
Sep 16, 2008, 7:49:50 PM9/16/08
to cat-ident...@googlegroups.com
We will create triggers anyway .. but not for that target ..
triggers will be used to update internal data while migrating old data to the unified table ..
but for runtime we will use the following technique ..

we will replace the local table ex: pixi_users with view constructed from a join query for 2 tables ..
1-local table containing foundation specific data like user_posts and so on ..
2-and local generic FEDERATED table which will update the shared cat table.

using triggers will be used before insert to update other local tables with new user ids and so on ..
and we will remove these triggers once we deploy the final refined shared table ..

Thanks, please if any one can't understand what I'm saying please report so,,?

Salam

Ahmed Soliman

unread,
Sep 17, 2008, 4:56:14 AM9/17/08
to cat-ident...@googlegroups.com
tayeb momken 7ad yet2akked en el feature deh fe mySQL 4 kaman?
--
Ahmed Soliman
R&D Engineer.
Red Hat Certified Engineer.

Linux-Plus Information Systems L.L.C,
Saray El-Maadi, Tower (A), 1st Floor
35A Cornich El-Nil, Maadi, Cairo, Egypt.
Tel/Fax: +202 2527 66 16 Ext: 802

http://www.linux-plus.com
Reply all
Reply to author
Forward
0 new messages