Difference between revisions of "Database Schema"

From MythTV Official Wiki
Jump to: navigation, search
(Conventions)
(Added to Category:DB Table)
Line 1: Line 1:
[[Category:Developer Documentation]]
+
Contains an entry for each [[video capture card]] installed in master and slave backends across the system.
  
==Conventions==
+
You can manually alter this table as long as you restart all backends afterwards.
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].
+
  
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.
+
||<tablewidth="100%" rowbgcolor="#D6DFE7">Field||Type||NULL||Default||
===History===
+
||[[cardid]]||int(10)||No||||
Thanks to [[Kevin Kuphal]] for doing the original keying of this stuff, so that all I had to do was copy, paste, and annotate.
+
||[[videodevice]]||varchar(128)||Yes||NULL||
 +
||[[audiodevice]]||varchar(128)||Yes||NULL||
 +
||[[vbidevice]]||varchar(128)||Yes||NULL||
 +
||[[cardtype]]||varchar(32)||Yes||V4L||
 +
||[[defaultinput]]||varchar(32)||Yes||Television||
 +
||[[audioratelimit]]||int(11)||Yes||NULL||
 +
||[[hostname]]||varchar(255)||Yes||NULL||
 +
||[[dvb_swfilter]]||int(11)||Yes||0||
 +
||[[dvb_recordts]]||int(11)||Yes||0||
 +
||[[dvb_sat_type]]||int(11)||No||0||
 +
||[[dvb_wait_for_seqstart]]||int(11)||No||1||
 +
||[[dvb_dmx_buf_size]]||int(11)||No||8192||
 +
||[[dvb_pkt_buf_size]]||int(11)||No||8192||
 +
||[[skipbtaudio]]||tinyint(1)||Yes||0||
 +
||[[dvb_on_demand]]||tinyint(4)||No||0||
  
==Interfaces==
+
(a/o CVS 204-05-16)
===command line===
+
[[Category:DB Table]]
 
+
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 [http://www.phpmyadmin.net 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''
+
<!--
+
 
+
note to contributors: I've commented out a few tables that don't exist in my setup. These may be obsolete or they may be created by components I'm not using at present.
+
 
+
-->
+
 
+
===Tables===
+
Information about tables within the mythconverg database at schema 1123, MythTV 0.19
+
 
+
* [[callsignnetworkmap table]]
+
* [[capturecard table]]
+
* [[cardinput table]]
+
* [[channel table]]
+
* [[codecparams table]]
+
<!-- * [[conflictresolutionany table]]
+
* [[conflictresolutionoverride table]]
+
* [[conflictresolutionsingle table]] -->
+
* [[credits table]]
+
* [[dtv_multiplex table]]
+
* [[dtv_privatetypes table]]
+
* [[dvdinput table]]
+
* [[dvdtranscode table]]
+
<!-- * [[dvb_channel table]]
+
* [[dvb_pids table]]
+
* [[dvb_sat table]]
+
* [[dvb_signal_quality table]] -->
+
* [[favorites table]]
+
* [[filemarkup table]]
+
* [[gallerymetadata table]]
+
* [[gameplayers table]]
+
* [[housekeeping table]]
+
* [[inuseprograms table]]
+
* [[jobqueue table]]
+
* [[jumppoints table]]
+
* [[keybindings table]]
+
* [[keyword table]]
+
* [[mamemetadata table]]
+
* [[mamesettings table]]
+
* [[musicmetadata table]]
+
* [[musicplaylist table]]
+
* [[mythlog table]]
+
* [[mythweb_sessions table]]
+
* [[neskeyword table]]
+
* [[nestitle table]]
+
* [[networkiconmap table]]
+
* [[newsites table]]
+
* [[oldfind table]]
+
* [[oldprogram table]]
+
* [[oldrecorded table]]
+
* [[people table]]
+
* [[phonecallhistory table]]
+
* [[phonecalldirectory table]]
+
* [[pidcache table]]
+
* [[playgroup table]]
+
* [[profilegroups table]]
+
* [[program table]]
+
* [[programgenres table]]
+
* [[programrating table]]
+
* [[recgrouppassword table]]
+
* [[record table]]
+
* [[recorded table]]
+
* [[recordedcredits table]]
+
* [[recordedmarkup table]]
+
* [[recordedprogram table]]
+
* [[recordedrating table]]
+
* [[recordingprofiles table]]
+
<!-- * [[recordoverride table]] -->
+
* [[recordmatch table]]
+
* [[romdb table]]
+
* [[schemalock table]]
+
* [[settings table]]
+
* [[smartplaylist table]]
+
* [[smartplaylistcategory table]]
+
* [[smartplaylistitem table]]
+
* [[snessettings table]]
+
<!-- * [[transcoding table]] -->
+
* [[tvchain table]]
+
* [[videobookmarks table]]
+
* [[videocategory table]]
+
<!-- * [[videocountry table]] -->
+
* [[videogenre table]]
+
* [[videometadata table]]
+
* [[videometadatacountry table]]
+
* [[videometadatagenre table]]
+
* [[videosource table]]
+
* [[videotypes table]]
+
* [[websites table]]
+
* [[xvmc_buffer_settings table]]
+

Revision as of 17:13, 3 March 2006

Contains an entry for each video capture card installed in master and slave backends across the system.

You can manually alter this table as long as you restart all backends afterwards.

||<tablewidth="100%" rowbgcolor="#D6DFE7">Field||Type||NULL||Default|| ||cardid||int(10)||No|||| ||videodevice||varchar(128)||Yes||NULL|| ||audiodevice||varchar(128)||Yes||NULL|| ||vbidevice||varchar(128)||Yes||NULL|| ||cardtype||varchar(32)||Yes||V4L|| ||defaultinput||varchar(32)||Yes||Television|| ||audioratelimit||int(11)||Yes||NULL|| ||hostname||varchar(255)||Yes||NULL|| ||dvb_swfilter||int(11)||Yes||0|| ||dvb_recordts||int(11)||Yes||0|| ||dvb_sat_type||int(11)||No||0|| ||dvb_wait_for_seqstart||int(11)||No||1|| ||dvb_dmx_buf_size||int(11)||No||8192|| ||dvb_pkt_buf_size||int(11)||No||8192|| ||skipbtaudio||tinyint(1)||Yes||0|| ||dvb_on_demand||tinyint(4)||No||0||

(a/o CVS 204-05-16)