You are on page 1of 5

Question No 1

1. Publishers
Field Field Length Datatype Description
1 ID 4 int Auto number
2 Pub_id 4 char Publisher ID
3 Pub_name 40 varchar Name of the Publisher
4 City 20 varchar City of the Publisher
5 State 2 char State of the Publisher
6 country 30 varchar Country in which Publisher Live
7 Logo 16 Image Logo of Publisher
8 pr_info 16 Text This is sample text data for Ramona Publishers, publisher 1756 in
the pubs database. Ramona Publishers is located in Dallas, Texas.
1 emp_id 9 char Employee ID
2 fname 20 varchar First Name of Employee
3 lname 20 Varchar Last Name of Employee
4 job_id 2 Smallint Job ID
5 job_lvl 1 tinyint Job_lvl
6 pub_id 4 char Publisher ID
7 hire_date 8 DateTime Hire Date of Employee

1
1 Authors
Field Field Length Datatype Description
1 ID 4 int Auto Number
2 au_id 11 varchar Author ID Unique
3 au_lname 40 varchar Last Name of the Author
4 au_fname 20 Varchar First Name of the Author
5 address 40 Varchar Address of the Author
6 city 20 Varchar City Of Author
7 state 2 Varchar State of Author ( e.g. CA for California )
8 zip 5 Char Zip Code of the country
9 contract 1 Bit 1 if Author has any Contract 0 for no
10 au_ord 1 Tinyint No of author orders
11 royaltyper 4 int Royalty Amount per order

2 Order
Field Field Length Datatype Description
1 ID 4 int Auto Number
2 ord_num 4 Char Order Number
3 Payterms 10 Char Payment terms

2
3 Time
Field Field Length Datatype Description
1 ID 4 int Auto Number
2 TimeDay 4 int Day of month
4 TimeMonth 4 Int Month
5 TimeYear 4 Int Year

4 Fact
Field Field Length Datatype Description
1 ID 4 int Auto Number
2 PublisherID 4 int The Key Publisher ID
3 AuthorID 4 Int The Key Author ID
4 TitleID 4 Int The Key Title ID
5 OrderID 4 Int The Key Order ID
6 Qty 4 Int Total qty
7 SaleAmount 8 Money Amount of Sale
8 ord_dateID 4 int The Key OrderDate ID

3
5 Stores
Field Field Length Datatype Description
1 stor_id 4 The Key Store ID

char
2 stor_name 40 varchar The Name of the store
3 stor_address 40 varchar The Address of the Store
4 City 20 varchar The City of Store
5 State 2 char The State ( e.g. CA for California )
6 Zip 5 char The Zip code of the country
7 discounttype 40 varchar Discount Type for customers ( e.g. Initial Customer for new etc )
8 lowqty 2 smallint From Qty where Discount starts
9 highqty 2 smallint To Qty
10 discount 5 decimal Discount Amount

6 Titles
Field Field Length Datatype Description
1 title_id 4 varchar The key title ID
2 title 80 varchar Title Desc
3 type 12 char The Type of title ( e.g. Business etc )
4 pub_id 4 char The Key Pub ID
5 price 8 Money The Amount of book
6 advance 8 Money The amount of money in advance
7 royalty 4 int Royalty money
8 ytd_sales 4 int Year to date sale
9 notes 200 varchar Notes
10 pubdate 8 Datetime Publishing Date
11 royalty 10 char The Royalty to be given

4
Question No 2

Dimensions:
1) Product: PRODID, PRODCT_DESP, PROD_LINE, PROD_GRP

2) Customer: CUST_ID, LOCATION, ....

3) Retailer: RID

4) Time: TIME KEY, DAY, MONTH, QUARTER, YEAR

Facts:
Sales: CID, PID, RETAILER_ID, TIME KEY, PCOST (ACTUAL),PCOST (BUDGET),SCOST (ACTUAL),SCOST (BUDGT),
UNIT_SALES

You might also like