You are here: Re: visual databasing « PHP SQL « IT news, forums, messages
Re: visual databasing

Posted by Jim Michaels on 02/24/06 03:10

"Stefan Rybacki" <stefan.rybacki@gmx.net> wrote in message
news:45ltojF7djm3U1@individual.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> NC schrieb:
>> Tony Peardon wrote:
>>> I've got a bunch of tables now, and I'm starting to lose track
>>> of table relations. Is there a command, or even a program,
>>> that I can use to visually see my relationships?
>>
>> Relationshpis are not stored within the database; rather, they are
>> defined on per-query basis using JOIN clauses. Programs that allow you
>> to visualize relationships simply store your "notes to self" and help
>> you build queries based on those notes. So, in my opinion, the best
>> (and vendor-independent) solution is to simply document your database
>> design, and not just the relationships, but purpose of tables and
>> fields as well.
>>
>
>
> Thats not complete true. If you're using a RDBMS which supports foreign
> key constraints you're able to visualize at least them and they should
> represent the relations.

yes. the fact that it's stored in the RDBMS allows you to use a program
like Aqua to generate ER diagrams with lines between tables, showing the
keys that have the relationships. When you create a table, the
relationship is created as follows with the keyword REFERENCES:
CREATE TABLE `dbo`.`categoryroots` (
`cat_id` int(10) unsigned NOT NULL default '0' COMMENT 'copy of cat_id
from categories table',
PRIMARY KEY (`cat_id`),
FOREIGN KEY (`cat_id`) REFERENCES `categories`(`cat_id`) ON DELETE CASCADE
ON UPDATE NO ACTION,
UNIQUE KEY `ix_crcat_id` (`cat_id`)
) ENGINE=InnoDB;



> In fact I fully agree to your statement, that documentation is one of
> the most important things.
>
> Regards
> Stefan
>
>> Cheers,
>> NC
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.1 (MingW32)
>
> iD8DBQFD9cEUyeCLzp/JKjARAueYAKCBKX6imW6DaxQD6t8KzhLFLJDKVwCgwwZu
> XVIfGHv3TNC5+xYxIhJn1oQ=
> =fI8s
> -----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация