Skip to content

Commit 3a54b31

Browse files
committed
Misc fixes to table comments
Adding *_filename, *_charset, *_last_updated columns for images on stores (logo) and products (image). Renamed stores.image_mime_type -> stores.logo_mime_type for consistency Updated insert script for this table to match
1 parent 8a58ea3 commit 3a54b31

File tree

2 files changed

+61
-37
lines changed

2 files changed

+61
-37
lines changed

customer_orders/co_ddl.sql

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ create table stores (
3434
latitude number,
3535
longitude number,
3636
logo blob,
37-
image_mime_type varchar2(100 char),
37+
logo_mime_type varchar2(512 char),
38+
logo_filename varchar2(512 char),
39+
logo_charset varchar2(512 char),
40+
logo_last_updated date,
3841
constraint store_at_least_one_address_c
3942
check (
4043
coalesce ( web_address, physical_address ) is not null
@@ -52,7 +55,7 @@ comment on column stores.store_name
5255
is 'What the store is called';
5356

5457
comment on column stores.web_address
55-
is 'The URI of a virtual store';
58+
is 'The URL of a virtual store';
5659

5760
comment on column stores.physical_address
5861
is 'The postal address of this location';
@@ -66,20 +69,32 @@ comment on column stores.longitude
6669
comment on column stores.logo
6770
is 'An image used by this store';
6871

69-
comment on column stores.image_mime_type
72+
comment on column stores.logo_mime_type
7073
is 'The mime-type of the store logo';
74+
75+
comment on column stores.logo_last_updated
76+
is 'The date the image was last changed';
77+
78+
comment on column stores.logo_filename
79+
is 'The name of the file loaded in the image column';
80+
81+
comment on column stores.logo_charset
82+
is 'The character set used to encode the image';
7183

7284
create table products (
73-
product_id integer
74-
generated by default on null as identity
75-
constraint products_pk primary key,
76-
product_name varchar2(255 char) not null,
77-
unit_price number(10,2),
78-
product_details blob
79-
constraint products_json_c
80-
check ( product_details is json ),
81-
product_image blob,
82-
image_mime_type varchar2(100 char)
85+
product_id integer
86+
generated by default on null as identity
87+
constraint products_pk primary key,
88+
product_name varchar2(255 char) not null,
89+
unit_price number(10,2),
90+
product_details blob
91+
constraint products_json_c
92+
check ( product_details is json ),
93+
product_image blob,
94+
image_mime_type varchar2(512 char),
95+
image_filename varchar2(512 char),
96+
image_charset varchar2(512 char),
97+
image_last_updated date
8398
)
8499
;
85100

@@ -101,6 +116,15 @@ comment on column products.product_image
101116
comment on column products.image_mime_type
102117
is 'The mime-type of the product image';
103118

119+
comment on column products.image_last_updated
120+
is 'The date the image was last changed';
121+
122+
comment on column products.image_filename
123+
is 'The name of the file loaded in the image column';
124+
125+
comment on column products.image_charset
126+
is 'The character set used to encode the image';
127+
104128
comment on column products.product_name
105129
is 'What a product is called';
106130

@@ -269,7 +293,7 @@ comment on column store_orders.order_status
269293
is 'The current state of this order';
270294

271295
comment on column store_orders.total
272-
is 'The primary key of the customer';
296+
is 'Indicates what type of total is displayed, including Store, Status, or Grand Totals';
273297

274298
comment on column store_orders.store_name
275299
is 'What the store is called';

customer_orders/stores.sql

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
PRO INSERTING into STORES
22
set define off
33
begin
4-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (1,'Online','https://www.example.com',null,null,null, EMPTY_BLOB(),null);
5-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (2,'San Francisco',null,'Redwood Shores
4+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (1,'Online','https://www.example.com',null,null,null, EMPTY_BLOB(),null);
5+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (2,'San Francisco',null,'Redwood Shores
66
500 Oracle Parkway
77
Redwood Shores, CA 94065',37.529395,-122.267237, EMPTY_BLOB(),null);
8-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (3,'Seattle',null,'1501 Fourth Avenue
8+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (3,'Seattle',null,'1501 Fourth Avenue
99
Suite 1800
1010
Seattle, WA 98101',47.6053,-122.33221, EMPTY_BLOB(),null);
11-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (4,'New York City',null,'205 Lexington Ave
11+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (4,'New York City',null,'205 Lexington Ave
1212
7th Floor
1313
New York, NY 10016',40.745216,-73.980518, EMPTY_BLOB(),null);
14-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (5,'Chicago',null,'233 South Wacker Dr.
14+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (5,'Chicago',null,'233 South Wacker Dr.
1515
45th Floor
1616
Chicago, IL 60606',41.878751,-87.636675, EMPTY_BLOB(),null);
17-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (6,'London',null,'One South Place
17+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (6,'London',null,'One South Place
1818
London
1919
EC2M 2RB',51.519281,-0.087296, EMPTY_BLOB(),null);
20-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (7,'Bucharest',null,'Floreasca Park
20+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (7,'Bucharest',null,'Floreasca Park
2121
43 Soseaua Pipera, corp B.
2222
Sector 2
2323
Bucharest , 014254
2424
RO',44.43225,26.10626, EMPTY_BLOB(),null);
25-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (8,'Berlin',null,'Behrenstraße 42 (Humboldt Carré)
25+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (8,'Berlin',null,'Behrenstraße 42 (Humboldt Carré)
2626
10117 Berlin',52.5161,13.3873, EMPTY_BLOB(),null);
27-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (9,'Utrecht',null,'Hertogswetering 163-167, 3543 AS Utrecht, Netherlands',52.103263,5.061644, EMPTY_BLOB(),null);
28-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (10,'Madrid',null,'C/ José Echegaray 6B
27+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (9,'Utrecht',null,'Hertogswetering 163-167, 3543 AS Utrecht, Netherlands',52.103263,5.061644, EMPTY_BLOB(),null);
28+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (10,'Madrid',null,'C/ José Echegaray 6B
2929
Las Rozas
3030
28230 Madrid',40.4929,-3.8737, EMPTY_BLOB(),null);
31-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (11,'Johannesburg',null,'Woodmead North Office Park
31+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (11,'Johannesburg',null,'Woodmead North Office Park
3232
54 Maxwell Drive
3333
Jukskeiview, Sandton, 2196',-26.044222,28.094662, EMPTY_BLOB(),null);
34-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (12,'Lagos',null,'1391 Tiamiyu Savage St, Victoria Island, Lagos, Nigeria',6.42806,3.42199, EMPTY_BLOB(),null);
35-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (13,'Bengaluru',null,'193, Bannerghatta Main Rd, Industrial Area, Stage 2, BTM Layout, Bengaluru, Karnataka 560076, India',12.8939,77.5978, EMPTY_BLOB(),null);
36-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (14,'Mumbai',null,'First International Financial Center
34+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (12,'Lagos',null,'1391 Tiamiyu Savage St, Victoria Island, Lagos, Nigeria',6.42806,3.42199, EMPTY_BLOB(),null);
35+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (13,'Bengaluru',null,'193, Bannerghatta Main Rd, Industrial Area, Stage 2, BTM Layout, Bengaluru, Karnataka 560076, India',12.8939,77.5978, EMPTY_BLOB(),null);
36+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (14,'Mumbai',null,'First International Financial Center
3737
Unit No. 501, Level 5
3838
No. C54 & 55, G Block
3939
Bandra Kurla Complex
4040
CTS No. 4207, Kolekalyan Village
4141
Mumbai - 400 051
4242
India',19.069405,72.870143, EMPTY_BLOB(),null);
43-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (15,'New Dehli',null,'F-01/02, First Floor
43+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (15,'New Dehli',null,'F-01/02, First Floor
4444
Salcon Rasvillas
4545
D-1, District Centre,
4646
Saket, New Delhi - 110017
4747
India',28.527693,77.220135, EMPTY_BLOB(),null);
48-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (16,'Sydney',null,'Riverside Corporate Park
48+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (16,'Sydney',null,'Riverside Corporate Park
4949
4 Julius Avenue
5050
North Ryde
5151
NSW 2113',-33.797279,151.143826, EMPTY_BLOB(),null);
52-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (17,'Perth',null,'Level 9
52+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (17,'Perth',null,'Level 9
5353
225 St Georges Terrace
5454
Perth WA 6000',-31.953715,115.851645, EMPTY_BLOB(),null);
55-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (18,'São Paulo',null,'Rua Dr. Jose Aureo Bustamante,
55+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (18,'São Paulo',null,'Rua Dr. Jose Aureo Bustamante,
5656
455 - Vila Cordeiro,
5757
CEP 04710-090 São Paulo',-23.5475,-46.63611, EMPTY_BLOB(),null);
58-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (19,'Buenos Aires',null,'Juana Manso 1069, Buenos Aires, Argentina',-34.61016,-58.362867, EMPTY_BLOB(),null);
59-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (20,'Mexico City',null,'Montes Urales # 470 P3
58+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (19,'Buenos Aires',null,'Juana Manso 1069, Buenos Aires, Argentina',-34.61016,-58.362867, EMPTY_BLOB(),null);
59+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (20,'Mexico City',null,'Montes Urales # 470 P3
6060
Col. Lomas de Chapultepec
6161
Delegación Miguel Hidalgo - C.P. 11000',19.428489,-99.205745, EMPTY_BLOB(),null);
62-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (21,'Bejing',null,'China, Beijing Shi, Haidian Qu, Dongbeiwang W Rd, 8, 100085',40.0572,116.290061, EMPTY_BLOB(),null);
63-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (22,'Tokyo',null,'2 Chome-5-? Kitaaoyama, Minato City, Tokyo 107-0061, Japan',35.671534,139.718584, EMPTY_BLOB(),null);
64-
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,IMAGE_MIME_TYPE) values (23,'Tel Aviv',null,'B, Aharon Bart St 18, Petah Tikva, 4951400, Israel',32.100664,34.862138, EMPTY_BLOB(),null);
62+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (21,'Bejing',null,'China, Beijing Shi, Haidian Qu, Dongbeiwang W Rd, 8, 100085',40.0572,116.290061, EMPTY_BLOB(),null);
63+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (22,'Tokyo',null,'2 Chome-5-? Kitaaoyama, Minato City, Tokyo 107-0061, Japan',35.671534,139.718584, EMPTY_BLOB(),null);
64+
insert into stores (STORE_ID,STORE_NAME,WEB_ADDRESS,PHYSICAL_ADDRESS,LATITUDE,LONGITUDE,LOGO,LOGO_MIME_TYPE) values (23,'Tel Aviv',null,'B, Aharon Bart St 18, Petah Tikva, 4951400, Israel',32.100664,34.862138, EMPTY_BLOB(),null);
6565
end;
6666
/

0 commit comments

Comments
 (0)