Schematodoc - Pubs

Schematodoc - Pubs

<p>SchemaToDoc - pubs</p><p>Table of Contents Publishers...... 1 pub_info...... 1 publishers...... 2 Authors...... 3 authors...... 3 roysched...... 3 Titles...... 5 titleauthor...... 5 titles...... 5 Sales...... 7 discounts...... 7 sales...... 7 stores...... 7 Workforce...... 9 employee...... 9 jobs...... 9 Publishers pub_info Primary Key(s): pub_id Field Type Size Default Nulls? pub_id char 4 No logo image Yes pr_info text Yes</p><p>Index Name Unique Clustered Fields UPKCL_pubinfo Yes Yes pub_id</p><p>No Check Constraints</p><p>Internal Foreign Key Constraint Affected Field Source Table FK__pub_info__pub_id__173876EA pub_id publishers</p><p>No External Foreign Keys publishers Primary Key(s): pub_id Field Type Size Default Nulls? pub_id char 4 No pub_name varchar 40 Yes city varchar 20 Yes state char 2 Yes country varchar 30 ('USA') Yes</p><p>Index Name Unique Clustered Fields UPKCL_pubind Yes Yes pub_id</p><p>Check Constraint Name Text CK__publisher__pub_i__7C8480AE ([pub_id] = '1756' or ([pub_id] = '1622' or ([pub_id] = '0877' or ([pub_id] = '0736' or [pub_id] = '1389'))) or [pub_id] like '99[0-9][0-9]')</p><p>No Internal Foreign Keys</p><p>Primary Key as Foreign Key Constraint Affected Table Affected Field FK__employee__pub_id__1ED998B2 employee pub_id FK__pub_info__pub_id__173876EA pub_info pub_id FK__titles__pub_id__014935CB titles pub_id Authors authors Primary Key(s): au_id Field Type Size Default Nulls? au_id varchar 11 No au_lname varchar 40 No au_fname varchar 20 No phone char 12 ('UNKNOWN') No address varchar 40 Yes city varchar 20 Yes state char 2 Yes zip char 5 Yes contract bit No </p><p>Index Name Unique Clustered Fields UPKCL_auidind Yes Yes au_id aunmind No No au_lname, au_fname</p><p>Check Constraint Name Text CK__authors__au_id__77BFCB91 ([au_id] like '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]') CK__authors__zip__79A81403 ([zip] like '[0-9][0-9][0-9][0-9][0-9]')</p><p>No Internal Foreign Keys</p><p>Primary Key as Foreign Key Constraint Affected Table Affected Field FK__titleauth__au_id__0519C6AF titleauthor au_id roysched Primary Key(s): Field Type Size Default Nulls? title_id varchar 6 No lorange int Yes hirange int Yes royalty int Yes</p><p>Index Name Unique Clustered Fields titleidind No No title_id</p><p>No Check Constraints</p><p>Internal Foreign Key Constraint Affected Field Source Table FK__roysched__title___0DAF0CB0 title_id titles No External Foreign Keys Titles titleauthor Primary Key(s): au_id, title_id Field Type Size Default Nulls? au_id varchar 11 No title_id varchar 6 No au_ord tinyint Yes royaltyper int Yes</p><p>Index Name Unique Clustered Fields UPKCL_taind Yes Yes au_id, title_id auidind No No au_id titleidind No No title_id</p><p>No Check Constraints</p><p>Internal Foreign Key Constraint Affected Field Source Table FK__titleauth__au_id__0519C6AF au_id authors FK__titleauth__title__060DEAE8 title_id titles</p><p>No External Foreign Keys titles Primary Key(s): title_id Field Type Size Default Nulls? title_id varchar 6 No title varchar 80 No type char 12 ('UNDECIDED') No pub_id char 4 Yes price money Yes advance money Yes royalty int Yes ytd_sales int Yes notes varchar 200 Yes pubdate datetime (getdate()) No </p><p>Index Name Unique Clustered Fields UPKCL_titleidind Yes Yes title_id titleind No No title</p><p>No Check Constraints Internal Foreign Key Constraint Affected Field Source Table FK__titles__pub_id__014935CB pub_id publishers</p><p>Primary Key as Foreign Key Constraint Affected Table Affected Field FK__roysched__title___0DAF0CB0 roysched title_id FK__sales__title_id__0BC6C43E sales title_id FK__titleauth__title__060DEAE8 titleauthor title_id Sales discounts Primary Key(s): Field Type Size Default Nulls? discounttype varchar 40 No stor_id char 4 Yes lowqty smallint Yes highqty smallint Yes discount decimal No </p><p>No Indexes</p><p>No Check Constraints</p><p>Internal Foreign Key Constraint Affected Field Source Table FK__discounts__stor___0F975522 stor_id stores</p><p>No External Foreign Keys sales Primary Key(s): stor_id, ord_num, title_id Field Type Size Default Nulls? stor_id char 4 No ord_num varchar 20 No ord_date datetime No qty smallint No payterms varchar 12 No title_id varchar 6 No </p><p>Index Name Unique Clustered Fields UPKCL_sales Yes Yes stor_id, ord_num, title_id titleidind No No title_id</p><p>No Check Constraints</p><p>Internal Foreign Key Constraint Affected Field Source Table FK__sales__stor_id__0AD2A005 stor_id stores FK__sales__title_id__0BC6C43E title_id titles</p><p>No External Foreign Keys stores Primary Key(s): stor_id Field Type Size Default Nulls? stor_id char 4 No stor_name varchar 40 Yes stor_address varchar 40 Yes city varchar 20 Yes state char 2 Yes zip char 5 Yes</p><p>Index Name Unique Clustered Fields UPK_storeid Yes Yes stor_id</p><p>No Check Constraints</p><p>No Internal Foreign Keys</p><p>Primary Key as Foreign Key Constraint Affected Table Affected Field FK__discounts__stor___0F975522 discounts stor_id FK__sales__stor_id__0AD2A005 sales stor_id Workforce employee Primary Key(s): emp_id Field Type Size Default Nulls? emp_id char 9 No fname varchar 20 No minit char 1 Yes lname varchar 30 No job_id smallint (1) No job_lvl tinyint (10) Yes pub_id char 4 ('9952') No hire_date datetime (getdate()) No </p><p>Index Name Unique Clustered Fields employee_ind No Yes lname, fname, minit PK_emp_id Yes No emp_id</p><p>Check Constraint Name Text CK_emp_id ([emp_id] like '[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]' or [emp_id] like '[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]')</p><p>Internal Foreign Key Constraint Affected Field Source Table FK__employee__job_id__1BFD2C07 job_id jobs FK__employee__pub_id__1ED998B2 pub_id publishers</p><p>No External Foreign Keys jobs Primary Key(s): job_id Field Type Size Default Nulls? job_id smallint No job_desc varchar 50 ('New Position - title not No formalized yet') min_lvl tinyint No max_lvl tinyint No </p><p>Index Name Unique Clustered Fields PK__jobs__117F9D94 Yes Yes job_id</p><p>Check Constraint Name Text CK__jobs__min_lvl__1367E606 ([min_lvl] >= 10) CK__jobs__max_lvl__145C0A3F ([max_lvl] <= 250) No Internal Foreign Keys</p><p>Primary Key as Foreign Key Constraint Affected Table Affected Field FK__employee__job_id__1BFD2C07 employee job_id</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us