Build Z_COMPANY database and its table structures using SQL language

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

Build Z_COMPANY database and its table structures using SQL language.

INV_NUMBER LINE_NUMBER P_CODE
LINE_UNITS LINE_PRICE
$14.99
1001
1 13-02P2
1001
2 23109-HB
1
$9.95
1002
1 54778-27
2
$4.99
1003
1 2238OPD
$38.95
1003
2 1546-Q02
$39.95
3 13-02P2
1 54778-2T
1003
$14.99
1004
3
$4.99
1004
2 23109-HB
2
19.95
1005
1 PVC23DRT
12
$5.87
1006
1 SM-18277
$6.99
1006
2 2232/QTY
$109.92
1006
3 23109 HB
19.95
1006
4 89-WRE-O
$256.99
1007
1 13-02P2
2
$14 99
2 54778-21
1 PVC23DRT
1007
$4.99
1008
5
$5.87
1008
2 WRTT3
$119.95
$9.95
1008
3 23109-HB
Figure 1.5 LINE table
PINDATE P ONHAND PMIN P PRICE P DISCOUNT V_CODE
P CODE
11GER/31 Power painter, 16 psi, 3-nozzle
1302/P2 7 25in pwr sa blade
14-01AS 9.00-in pwr. Saw blade
1646-002 Hrd cloth, 14-n, 2x60
1558-OW1 Hrd cloth, 1/2-n, 360
2232/OTY BRD jgsw, 12-in blate
2232/aWE BED jgsaw, B-in blade
2238/OPD BLD codless dil, 12in
23109-HB Claw hammer
23114 AA Sledge hammer, 12 .
54778 27 Rattal e, 16in fne
9 WRE-O Hicut chain saw, 16 in
PVC230RT PVC pipe, 35in. 6A
SM 18277 125-in metal screw, 26
Sw-23116 26in wt serew, 60
WRVTTI Steel matting, 4v1.6", 5" mesh
P DESCRIPT
5 S109.99
15
03 Nov01
13 Dec-01
13 No01
15Jan-02
15Jan-02
30-Dec-01
24-Dec-01
20Jan 02
20 Jan-02
00 Jan 02
0.00
0.06
000
0.00
000
25595
21344
21344
23119
23119
24208
24288
32
16
16
23
$14.99
12
$17.49
139.95
$4390
5 $100 92
12
23
0.06
0.10
0.06
0.00
005
0.00
0.00
000
0.10
25595
21226
995
$14.40
20
10
21344
24200
16-Dec 01
43
$4.99
5 $256.99
07feb02
20Feb02
01-Mar02
24Feb-02
17-Jan-02
11
188
172
237
18
75
100
5 $11995
21225
21231
Figure 1.6 PRODUCT table
V CONTACT V AREACODE
V CODE
122 Bryson, inc
21226 Superloo, inc. Flushing
21231 DE Spply
21344 Oomez Bros
22567 Dome Supply Smah
23119 Randsets Ltd.
24004 Evackman Bros. Browning
24200 ORDVA, inc.
25443 BSK, Inc.
25501 Danal Supples Smythe
25505 Rubicon Sis.
V HAME
V PHOHE
V STATE
V ORDER
Smthson
615
223-3234
TN
Singh
Ortega
615
615
215-0006
FL
220-3245
TN
009-2546
KY
IN
678-1419
678-3900
220-1410
IN
Anderson
615
TN
098-1234
N
Haktord
Smh
TN
004
N
PL
090-3629
227-0000
TN
456-0092
IN
Orton
004
FL
Figure 1.7 VENDOR table
Transcribed Image Text:INV_NUMBER LINE_NUMBER P_CODE LINE_UNITS LINE_PRICE $14.99 1001 1 13-02P2 1001 2 23109-HB 1 $9.95 1002 1 54778-27 2 $4.99 1003 1 2238OPD $38.95 1003 2 1546-Q02 $39.95 3 13-02P2 1 54778-2T 1003 $14.99 1004 3 $4.99 1004 2 23109-HB 2 19.95 1005 1 PVC23DRT 12 $5.87 1006 1 SM-18277 $6.99 1006 2 2232/QTY $109.92 1006 3 23109 HB 19.95 1006 4 89-WRE-O $256.99 1007 1 13-02P2 2 $14 99 2 54778-21 1 PVC23DRT 1007 $4.99 1008 5 $5.87 1008 2 WRTT3 $119.95 $9.95 1008 3 23109-HB Figure 1.5 LINE table PINDATE P ONHAND PMIN P PRICE P DISCOUNT V_CODE P CODE 11GER/31 Power painter, 16 psi, 3-nozzle 1302/P2 7 25in pwr sa blade 14-01AS 9.00-in pwr. Saw blade 1646-002 Hrd cloth, 14-n, 2x60 1558-OW1 Hrd cloth, 1/2-n, 360 2232/OTY BRD jgsw, 12-in blate 2232/aWE BED jgsaw, B-in blade 2238/OPD BLD codless dil, 12in 23109-HB Claw hammer 23114 AA Sledge hammer, 12 . 54778 27 Rattal e, 16in fne 9 WRE-O Hicut chain saw, 16 in PVC230RT PVC pipe, 35in. 6A SM 18277 125-in metal screw, 26 Sw-23116 26in wt serew, 60 WRVTTI Steel matting, 4v1.6", 5" mesh P DESCRIPT 5 S109.99 15 03 Nov01 13 Dec-01 13 No01 15Jan-02 15Jan-02 30-Dec-01 24-Dec-01 20Jan 02 20 Jan-02 00 Jan 02 0.00 0.06 000 0.00 000 25595 21344 21344 23119 23119 24208 24288 32 16 16 23 $14.99 12 $17.49 139.95 $4390 5 $100 92 12 23 0.06 0.10 0.06 0.00 005 0.00 0.00 000 0.10 25595 21226 995 $14.40 20 10 21344 24200 16-Dec 01 43 $4.99 5 $256.99 07feb02 20Feb02 01-Mar02 24Feb-02 17-Jan-02 11 188 172 237 18 75 100 5 $11995 21225 21231 Figure 1.6 PRODUCT table V CONTACT V AREACODE V CODE 122 Bryson, inc 21226 Superloo, inc. Flushing 21231 DE Spply 21344 Oomez Bros 22567 Dome Supply Smah 23119 Randsets Ltd. 24004 Evackman Bros. Browning 24200 ORDVA, inc. 25443 BSK, Inc. 25501 Danal Supples Smythe 25505 Rubicon Sis. V HAME V PHOHE V STATE V ORDER Smthson 615 223-3234 TN Singh Ortega 615 615 215-0006 FL 220-3245 TN 009-2546 KY IN 678-1419 678-3900 220-1410 IN Anderson 615 TN 098-1234 N Haktord Smh TN 004 N PL 090-3629 227-0000 TN 456-0092 IN Orton 004 FL Figure 1.7 VENDOR table
(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
as CODE
cus UNAME
cus FNAME
cus INETIAL
cus AREACODE
cus PHONE
cus BALANCE
INVOICE
IW NHR
aus coce
Iw_ DATE
LINE
IW MMER
UNE NER
coDe
LINE UNITS
LINE PRICE
FROOUCT
CODE
P_DESCRIPT
P_INDATE
PONND
PMIN
P_PRICE
P DESCOUNT
V coce
VENDOR
V CODE
NJNANE
V_CONTACT
VAREACCCE
VPHONE
V_STATE
NORDER
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
615
044-2573
S0.00
10011 Dunne
Loono
K
713
804-1238
$0.00
1UU12 Simen
Katny
Paul
b15
345 6
10013 Olowski
615
894-2180
1536 75
10014 Orlando
Myron
616
222 1672
10015 OBrian
10016 Brown
713
615
442-331
297-1228
10.00
10 00
1221.19
Amy
James
Ceorge
A
Clette
10017 wams
615
290-2556
S768.99
121655
$0 00
10010 Faris
713
302-7185
10019 Smth
615
297-3809
Figure 1.3 CUSTOMER table
INV NUMBER CUS_CODE
1001
1002
INV DATE
10014 Wednesday, August 18, 1999
10011 Wednesday, August 18, 1999
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
1004
10011
1005
10018
1006
10014
1007
10015
1008
10011
Figure 1.4 INVOICE table
Transcribed Image Text:(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 as CODE cus UNAME cus FNAME cus INETIAL cus AREACODE cus PHONE cus BALANCE INVOICE IW NHR aus coce Iw_ DATE LINE IW MMER UNE NER coDe LINE UNITS LINE PRICE FROOUCT CODE P_DESCRIPT P_INDATE PONND PMIN P_PRICE P DESCOUNT V coce VENDOR V CODE NJNANE V_CONTACT VAREACCCE VPHONE V_STATE NORDER 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 615 044-2573 S0.00 10011 Dunne Loono K 713 804-1238 $0.00 1UU12 Simen Katny Paul b15 345 6 10013 Olowski 615 894-2180 1536 75 10014 Orlando Myron 616 222 1672 10015 OBrian 10016 Brown 713 615 442-331 297-1228 10.00 10 00 1221.19 Amy James Ceorge A Clette 10017 wams 615 290-2556 S768.99 121655 $0 00 10010 Faris 713 302-7185 10019 Smth 615 297-3809 Figure 1.3 CUSTOMER table INV NUMBER CUS_CODE 1001 1002 INV DATE 10014 Wednesday, August 18, 1999 10011 Wednesday, August 18, 1999 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 1004 10011 1005 10018 1006 10014 1007 10015 1008 10011 Figure 1.4 INVOICE table
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

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