Forum Moderators: open

Message Too Old, No Replies

structure of a DB

         

ganderla

5:36 pm on May 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lets just say that hypothetically someone were to ask me for the SQL to show my current database structure. Lets just say that I would not know how to get that information, but I am familiar with using phpmyadmin. Is there a link to get this or a command I can use to get this information about my database?

Igor_fr

5:45 am on May 14, 2006 (gmt 0)

10+ Year Member



From the mysql command line tool you go:

USE your_db_name

SHOW tables;

And then for the structure of a specific table:
DESCRIBE your_table_name;

topr8

7:36 am on May 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



slightly related:

you can use the backup tab in phpmyadmin to back your database up - i think you can choose to back up structure only - no data.

this way you can save the structure to a text file.

piatkow

2:12 pm on May 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The question suggests that the database was not designed but just thrown together on the fly. If I was auditing the site in question (not an unreasonable assumption - it is my day job) I would expect to be presented with a full model of the database expressed in business terms, without any delay.

henry0

10:21 pm on May 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



piatkow
I would expect to be presented with a full model of the database expressed in business terms, without any delay.

I am curious
Would you draft a model of what you expect to be presented with?

Do you ref to mapping functionality and relationship before coding?

piatkow

2:14 pm on May 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As an IT auditor I would expect the project to have built their database from a formal data model which was then agreed and signed off by the user. Failure to produce this would result in an adverse report to the project manager's boss.

Any "need" for reverse engineering of a bespoke database is an admission of bad development practice.