-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeleteOut.txt
154 lines (129 loc) · 5.92 KB
/
deleteOut.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
running test # 7 ****************
Database testdb created
Welcome to Minirel
Using Nested Loops Join Method
>>> create soaps (soapid = int, name = char(28), network = char(4), rating = real);
Creating relation soaps
>>> load soaps("../data/soaps.data");
Number of records inserted: 9
>>> create stars (starid = int, real_name = char(20), plays = char(12), soapid = int);
Creating relation stars
>>> load stars("../data/stars.data");
Number of records inserted: 29
>>> print stars;
Relation name: stars
starid real_name plays soapid
------ -------------------- ------------ ------
0 Hayes, Kathryn Kim 6
1 DeFreitas, Scott Andy 6
2 Grahn, Nancy Julia 4
3 Linder, Kate Esther 5
4 Cooper, Jeanne Katherine 5
5 Ehlers, Beth Harley 2
6 Novak, John Keith 4
7 Elliot, Patricia Renee 3
8 Hutchinson, Fiona Gabrielle 5
9 Carey, Phil Asa 5
10 Walker, Nicholas Max 3
11 Ross, Charlotte Eve 0
12 Anthony, Eugene Stan 8
13 Douglas, Jerry John 5
14 Holbrook, Anna Sharlene 7
15 Hammer, Jay Fletcher 2
16 Sloan, Tina Lillian 2
17 DuClos, Danielle Lisa 3
18 Tuck, Jessica Megan 3
19 Ashford, Matthew Jack 0
20 Novak, John Keith 4
21 Larson, Jill Opal 8
22 McKinnon, Mary Denise 7
23 Barr, Julia Brooke 8
24 Borlenghi, Matt Brian 8
25 Hughes, Finola Anna 1
26 Rogers, Tristan Robert 1
27 Richardson, Cheryl Jenny 1
28 Evans, Mary Beth Kayla 0
Number of records: 29
>>> delete stars where stars.plays = "Lisa";
>>> delete stars where stars.real_name = "Anthony, Eugene";
>>> print stars;
Relation name: stars
starid real_name plays soapid
------ -------------------- ------------ ------
0 Hayes, Kathryn Kim 6
1 DeFreitas, Scott Andy 6
2 Grahn, Nancy Julia 4
3 Linder, Kate Esther 5
4 Cooper, Jeanne Katherine 5
5 Ehlers, Beth Harley 2
6 Novak, John Keith 4
7 Elliot, Patricia Renee 3
8 Hutchinson, Fiona Gabrielle 5
9 Carey, Phil Asa 5
10 Walker, Nicholas Max 3
11 Ross, Charlotte Eve 0
13 Douglas, Jerry John 5
14 Holbrook, Anna Sharlene 7
15 Hammer, Jay Fletcher 2
16 Sloan, Tina Lillian 2
18 Tuck, Jessica Megan 3
19 Ashford, Matthew Jack 0
20 Novak, John Keith 4
21 Larson, Jill Opal 8
22 McKinnon, Mary Denise 7
23 Barr, Julia Brooke 8
24 Borlenghi, Matt Brian 8
25 Hughes, Finola Anna 1
26 Rogers, Tristan Robert 1
27 Richardson, Cheryl Jenny 1
28 Evans, Mary Beth Kayla 0
Number of records: 27
>>> delete stars where stars.soapid = 1;
>>> print stars;
Relation name: stars
starid real_name plays soapid
------ -------------------- ------------ ------
0 Hayes, Kathryn Kim 6
1 DeFreitas, Scott Andy 6
2 Grahn, Nancy Julia 4
3 Linder, Kate Esther 5
4 Cooper, Jeanne Katherine 5
5 Ehlers, Beth Harley 2
6 Novak, John Keith 4
7 Elliot, Patricia Renee 3
8 Hutchinson, Fiona Gabrielle 5
9 Carey, Phil Asa 5
10 Walker, Nicholas Max 3
11 Ross, Charlotte Eve 0
13 Douglas, Jerry John 5
14 Holbrook, Anna Sharlene 7
15 Hammer, Jay Fletcher 2
16 Sloan, Tina Lillian 2
18 Tuck, Jessica Megan 3
19 Ashford, Matthew Jack 0
20 Novak, John Keith 4
21 Larson, Jill Opal 8
22 McKinnon, Mary Denise 7
23 Barr, Julia Brooke 8
24 Borlenghi, Matt Brian 8
26 Rogers, Tristan Robert 1
27 Richardson, Cheryl Jenny 1
28 Evans, Mary Beth Kayla 0
Number of records: 26
>>> delete stars;
>>> print stars;
Relation name: stars
starid real_name plays soapid
------ -------------------- ------------ ------
Number of records: 0
>>> delete soaps where soaps.network < "NBC";
>>> print soaps;
Relation name: soaps
soapid name network rating
------ -------------------- ------- ------
0 Days of Our Lives NBC 7.02
4 Santa Barbara NBC 6.44
7 Another World NBC 1.97
Number of records: 3
>>> Enter y if you want to delete testdb/*
Executing rm -r testdb