Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
349 views
in Themes by
I want to analyze some behavior of the users of my Q2A, but I am not quite sure, if I understand the stucture and the content of the database correctly. Is there anywhere a description of the structure of the database.

THX
by
Unfortunately no. Only way is to see the database table in MySQL. But it is not very difficult.

1 Answer

+3 votes
by

You won't be able to see the exact SQL needed to build a database anywhere in the core as it is created dynamically. Anyway, you can see some table definitions that are quite easy to read here. Those correspond to v1.7.4 and should be a useful starting point.

by
In case SQL is needed for table creation this can be used:

show create table qa_posts

and similarly for other tables.
by
Alternatively, the whole schema can be dump (only the DDL, of course) with the mysqldump command. I'd go for checking the PHP code anyway as it is easier to access and read
by
yes, PHP code is easier. But SQL command is useful if one wants to create a new table like this :)
...