Difference between revisions of "Database Schema"

From MythTV Official Wiki
Jump to: navigation, search
m (Database Schemata moved to Database Schema)
(Conventions)
Line 1: Line 1:
 +
[[Category:Developer Documentation]]
 +
 
==Conventions==
 
==Conventions==
 
This section is for the layouts and internal detail of the tables Myth stores in your database engine; either [http://www.mysql.com/ MySQL] or (hopefully sometime soon) [http://www.postgresql.org/ PostgreSQL].
 
This section is for the layouts and internal detail of the tables Myth stores in your database engine; either [http://www.mysql.com/ MySQL] or (hopefully sometime soon) [http://www.postgresql.org/ PostgreSQL].

Revision as of 18:39, 28 February 2006


Conventions

This section is for the layouts and internal detail of the tables Myth stores in your database engine; either MySQL or (hopefully sometime soon) PostgreSQL.

There will be one page for each table; it will list each field, what it does, it's domain, and what other tables link to it, as well as a paragraph at the top explaining the semantics. Hopefully, the development team will help out on this one; inferring database semantics is a mug's game, at best.

History

Thanks to Kevin Kuphal for doing the original keying of this stuff, so that all I had to do was copy, paste, and annotate.

Interfaces

command line

Use the mysql command on the host running the database:

% mysql -u mythtv -pmythtv mythconverg

SQL commands can be issued at the mysql> prompt.

Web

Try phpMyAdmin.

mythconverg database

Structure

Use the following SQL to list all of the table names in the mythconverg database:

SHOW tables

To list the structure of an individual table:

DESCRIBE name_of_table

To generate the SQL necessary to recreate a table:

SHOW CREATE TABLE name_of_table

Tables

Information about tables within the mythconverg database at schema 1123, MythTV 0.19