(Q2) Use Z_COMPANY database to work the following problems. The database’s relational  schema is shown in Figure 1.2. Figures 1.3 through 1.7 show the table contents for the  database’s CUSTOMER, INVOICE, LINE, PRODUCT, and VENDOR tables, respectively. (2.a) Build Z_COMPANY database and its table structures. Use the data listings as your guide to  define the data characteristics. For example, the PROD_CODE is always composed of eight  characters, so it may be defined as CHAR(8), also ensure you create primary keys, foreign keys  and RI constraints shown in the relational schema in Figure 1.2. (2.b) Enter the data into the table structures you defined in 2.a, to match the data in Figures 1.3  through 1.7. Note: $ is for demonstration, tables data do not have to include $.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

(Q2) Use Z_COMPANY database to work the following problems. The database’s relational 
schema is shown in Figure 1.2. Figures 1.3 through 1.7 show the table contents for the 
database’s CUSTOMER, INVOICE, LINE, PRODUCT, and VENDOR tables, respectively.
(2.a) Build Z_COMPANY database and its table structures. Use the data listings as your guide to 
define the data characteristics. For example, the PROD_CODE is always composed of eight 
characters, so it may be defined as CHAR(8), also ensure you create primary keys, foreign keys 
and RI constraints shown in the relational schema in Figure 1.2.
(2.b) Enter the data into the table structures you defined in 2.a, to match the data in Figures 1.3 
through 1.7. Note: $ is for demonstration, tables data do not have to include $.

 

CUSTOMER
us CODE
Cus_LNAME
Cus_FNAME
Cus_INITIAL
CuS_AREACODE
CUS_PHONE
|Cus_BALANCE
INVOICE
INV NMER
CUs_CODE
|JINV_DATE
LINE
INV_NUMBER
LINE NUMBER
P_CODE
LINE_UNITS
LINE_PRICE
PRODUCT
P_CODE
P_DESCRIPT
P_INDATE
P_ONHAND
P_MIN
P_PRICE
P_DISCOUNT
v_CODE
VENDOR
V CODE
V_NAME
V_CONTACT
V_AREACODE
V_PHONE
V_STATE
V_ORDER
Figure 1.2 Z_COMPANY database's relational schema
CUS_CODE CUS_LNAME CUS_FNAME CUS_INITIAL CUS_AREACODE CUS_PHONE CUS_BALANCE
10010 Ramas
Alfred
A
615
844-2573
$0.00
10011 Dunno
Lcona
K
713
804-1238
$0.00
1U012 Smith
Kathy
Paul
615
894-2285
$345.86
10013 Olowski
615
894-2180
$536.75
10011 Orlando
Myron
Amy
James
615
222 1672
$0.00
442-3361
297-1228
10015 O'Brlan
713
$0.00
10016 Brown
615
$221.19
10017 Williams
George
615
290-2556
$768.93
A Ie
Olette
10018 Farriss
713
382-7185
$216.55
10019 Smith
K
615
297-3809
$0.00
Figure 1.3 CUSTOMER table
Transcribed Image Text:CUSTOMER us CODE Cus_LNAME Cus_FNAME Cus_INITIAL CuS_AREACODE CUS_PHONE |Cus_BALANCE INVOICE INV NMER CUs_CODE |JINV_DATE LINE INV_NUMBER LINE NUMBER P_CODE LINE_UNITS LINE_PRICE PRODUCT P_CODE P_DESCRIPT P_INDATE P_ONHAND P_MIN P_PRICE P_DISCOUNT v_CODE VENDOR V CODE V_NAME V_CONTACT V_AREACODE V_PHONE V_STATE V_ORDER Figure 1.2 Z_COMPANY database's relational schema CUS_CODE CUS_LNAME CUS_FNAME CUS_INITIAL CUS_AREACODE CUS_PHONE CUS_BALANCE 10010 Ramas Alfred A 615 844-2573 $0.00 10011 Dunno Lcona K 713 804-1238 $0.00 1U012 Smith Kathy Paul 615 894-2285 $345.86 10013 Olowski 615 894-2180 $536.75 10011 Orlando Myron Amy James 615 222 1672 $0.00 442-3361 297-1228 10015 O'Brlan 713 $0.00 10016 Brown 615 $221.19 10017 Williams George 615 290-2556 $768.93 A Ie Olette 10018 Farriss 713 382-7185 $216.55 10019 Smith K 615 297-3809 $0.00 Figure 1.3 CUSTOMER table
V HURMDER LIHE HUMBER
P CODE
LINE UNITS
LINE PRICE
113-00P2
14 99
2 2310-HE
1 54778-21
1 221GPD
1001
INV_NUMBER CUS CODE
1001
INV DATE
Wednesday, August 18, 1999
1002
1499
1003
130.95
10014
1003
21545-002
$39.95
1003
313.02P2
$14 99
1002
10011 Wednesday, August 18, 1999
1004
14770-21
10012 Wednesday, August 18, 1999
Thursday, August 19, 1999
Thursday, August 19, 1999
Thursday, August 19, 1999
Thursday, August 19, 1999
Thursday, August 19, 1999
1003
2 231
1 PVC2ORT
12
1004
10011
100
2 2232GTY
3 231 08-HE
$100.92
1006
1000
1000
1005
10018
19.95
1006
10014
113-92P2
2 4770-27
1 PVC2ORT
1007
S1499
1007
10015
toer
490
1008
10011
2 onTS
1008
3 231 0-HE
9.95
Figure 1.4 INVOICE table
Figure 1.5 UNE table
PINMTE P CNAND P MN P PRICE P DISCOUNT V CODE
P CODE
110ERSI Power parter, 15 psi , 3-nezzle
13-00P2 75n pat a biade
14OM3 900-n par saw biade
156-002 Hd clath, 14-n, 250
1588-OWI Hd clath, 12-n, 350
2230/OTY BIO jg, 1Dn blade
223/OWE BID jsa 6n blade
2236/OPD BID cordless del, 10n
23109H8 Ciwhanner
23114 AA Sedpe hammer, 12 lb.
S076-27 Rtal e, 18in fe
89WRE-O Heut chan , 16 in
PVCZIORT PVC ppe,35 84
SM 18277 15in neal screw, 25
SW23116 25 wd. scren, 50
WROTT Seel mateg, PiB¥16°, 5' nesh
PDESCRPT
V NAME V CONTACT V ANEACOOR VWONE
V.COD:
122 brysn, he ntru
2128 Seton,. P
STATE V ORDER
03-Nov01
00
130ec-01
32
15 $1499
21344
415
221-324 IN
13Nov01
18
O 00
21344
H04
215-0996 AL
8 $39 95
5 099
5 S109 2
5 199 87
15J2
15
0 00
23119
23119
15Ja02
23
00
21344 Oora brun. Orlugu
2667 Done Sey n
30-Dec-01
O 05
415
N
24Dec01
O 06
401
12
005
20119 andur L Andaraan
20-Jan-02
29
10 996
5 $1440
20
0 10
21225
O 05
O 00
24004 bruchnu. rownng
2400 OROVA, Hd
ZA0 DAK, he
201 Dund Sk anyte
2596 RAcon 9 onton
415
Z-1410 IN
IN
15Dec-01
43
$499
21344
616
612 IN
11
O 06
Snth
20Feb-02
198
00
75 6
237
100
18
5 S11996
01-Ma-02
172
O 00
21225
415
24Feb-02
O 00
2121
904
468.000 A
17Ja00
O 10
Figure 1.6 PRODUCT table
Flgure 1.7 VENDOR table
Transcribed Image Text:V HURMDER LIHE HUMBER P CODE LINE UNITS LINE PRICE 113-00P2 14 99 2 2310-HE 1 54778-21 1 221GPD 1001 INV_NUMBER CUS CODE 1001 INV DATE Wednesday, August 18, 1999 1002 1499 1003 130.95 10014 1003 21545-002 $39.95 1003 313.02P2 $14 99 1002 10011 Wednesday, August 18, 1999 1004 14770-21 10012 Wednesday, August 18, 1999 Thursday, August 19, 1999 Thursday, August 19, 1999 Thursday, August 19, 1999 Thursday, August 19, 1999 Thursday, August 19, 1999 1003 2 231 1 PVC2ORT 12 1004 10011 100 2 2232GTY 3 231 08-HE $100.92 1006 1000 1000 1005 10018 19.95 1006 10014 113-92P2 2 4770-27 1 PVC2ORT 1007 S1499 1007 10015 toer 490 1008 10011 2 onTS 1008 3 231 0-HE 9.95 Figure 1.4 INVOICE table Figure 1.5 UNE table PINMTE P CNAND P MN P PRICE P DISCOUNT V CODE P CODE 110ERSI Power parter, 15 psi , 3-nezzle 13-00P2 75n pat a biade 14OM3 900-n par saw biade 156-002 Hd clath, 14-n, 250 1588-OWI Hd clath, 12-n, 350 2230/OTY BIO jg, 1Dn blade 223/OWE BID jsa 6n blade 2236/OPD BID cordless del, 10n 23109H8 Ciwhanner 23114 AA Sedpe hammer, 12 lb. S076-27 Rtal e, 18in fe 89WRE-O Heut chan , 16 in PVCZIORT PVC ppe,35 84 SM 18277 15in neal screw, 25 SW23116 25 wd. scren, 50 WROTT Seel mateg, PiB¥16°, 5' nesh PDESCRPT V NAME V CONTACT V ANEACOOR VWONE V.COD: 122 brysn, he ntru 2128 Seton,. P STATE V ORDER 03-Nov01 00 130ec-01 32 15 $1499 21344 415 221-324 IN 13Nov01 18 O 00 21344 H04 215-0996 AL 8 $39 95 5 099 5 S109 2 5 199 87 15J2 15 0 00 23119 23119 15Ja02 23 00 21344 Oora brun. Orlugu 2667 Done Sey n 30-Dec-01 O 05 415 N 24Dec01 O 06 401 12 005 20119 andur L Andaraan 20-Jan-02 29 10 996 5 $1440 20 0 10 21225 O 05 O 00 24004 bruchnu. rownng 2400 OROVA, Hd ZA0 DAK, he 201 Dund Sk anyte 2596 RAcon 9 onton 415 Z-1410 IN IN 15Dec-01 43 $499 21344 616 612 IN 11 O 06 Snth 20Feb-02 198 00 75 6 237 100 18 5 S11996 01-Ma-02 172 O 00 21225 415 24Feb-02 O 00 2121 904 468.000 A 17Ja00 O 10 Figure 1.6 PRODUCT table Flgure 1.7 VENDOR table
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY