Oracle数据库设计省市区小区数据库建表

Posted 剑小新

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle数据库设计省市区小区数据库建表相关的知识,希望对你有一定的参考价值。



CREATE TABLE "SF_JECF_BASE"."SF_PROVINCE" (
"id" VARCHAR2(64 BYTE) NOT NULL ,
"provinceid" VARCHAR2(64 BYTE) NOT NULL,
"province" VARCHAR2(100 BYTE) NOT NULL
)

insert into "SF_JECF_BASE"."SF_PROVINCE" values(10,‘320000‘,‘江苏省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(11,‘330000‘,‘浙江省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(12,‘340000‘,‘安徽省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(13,‘350000‘,‘福建省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(14,‘360000‘,‘江西省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(15,‘370000‘,‘山东省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(16,‘410000‘,‘河南省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(17,‘420000‘,‘湖北省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(18,‘430000‘,‘湖南省‘);
insert into "SF_JECF_BASE"."SF_PROVINCE" values(19,‘440000‘,‘广东省‘);



CREATE TABLE "SF_JECF_BASE"."SF_CITIES" " (
"id" VARCHAR2(64 BYTE) NOT NULL ,
"cityid" VARCHAR2(64 BYTE) NOT NULL,
"city" VARCHAR2(100 BYTE) NOT NULL,
"provinceid" VARCHAR2(64 BYTE) NOT NULL
)


insert into "SF_JECF_BASE"."SF_CITIES" values(77,‘320100‘,‘南京市‘,‘320000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(78,‘320200‘,‘无锡市‘,‘320000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(79,‘320300‘,‘徐州市‘,‘320000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(90,‘330100‘,‘杭州市‘,‘330000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(91,‘330200‘,‘宁波市‘,‘330000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(100,‘331100‘,‘丽水市‘,‘330000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(101,‘340100‘,‘合肥市‘,‘340000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(102,‘340200‘,‘芜湖市‘,‘340000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(103,‘340300‘,‘蚌埠市‘,‘340000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(104,‘340400‘,‘淮南市‘,‘340000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(118,‘350100‘,‘福州市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(119,‘350200‘,‘厦门市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(120,‘350300‘,‘莆田市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(121,‘350400‘,‘三明市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(122,‘350500‘,‘泉州市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(125,‘350800‘,‘龙岩市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(126,‘350900‘,‘宁德市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(120,‘350300‘,‘莆田市‘,‘350000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(127,‘360100‘,‘南昌市‘,‘360000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(128,‘360200‘,‘景德镇市‘,‘360000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(129,‘360300‘,‘萍乡市‘,‘360000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(130,‘360400‘,‘九江市‘,‘360000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(138,‘370100‘,‘济南市‘,‘370000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(139,‘370200‘,‘青岛市‘,‘370000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(140,‘370300‘,‘淄博市‘,‘370000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(155,‘410100‘,‘郑州市‘,‘410000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(156,‘410200‘,‘开封市‘,‘410000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(157,‘410300‘,‘洛阳市‘,‘410000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(158,‘410400‘,‘平顶山市‘,‘410000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(159,‘410500‘,‘安阳市‘,‘410000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(172,‘420100‘,‘武汉市‘,‘420000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(173,‘420200‘,‘黄石市‘,‘420000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(174,‘420300‘,‘十堰市‘,‘420000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(175,‘420500‘,‘宜昌市‘,‘420000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(186,‘430100‘,‘长沙市‘,‘430000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(187,‘430200‘,‘株洲市‘,‘430000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(188,‘430300‘,‘湘潭市‘,‘430000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(200,‘440100‘,‘广州市‘,‘440000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(201,‘440200‘,‘韶关市‘,‘440000‘);
insert into "SF_JECF_BASE"."SF_CITIES" values(202,‘440300‘,‘深圳市‘,‘440000‘);


区域
CREATE TABLE "SF_JECF_BASE"."SF_AREAS" (
"id" VARCHAR2(64 BYTE) NOT NULL ,
"areaid" VARCHAR2(64 BYTE) NOT NULL,
"area" VARCHAR2(100 BYTE) NOT NULL,
"cityid" VARCHAR2(64 BYTE) NOT NULL
)

insert into "SF_JECF_BASE"."SF_AREAS" values(1,‘350110‘,‘鼓楼区‘,‘350100‘);
insert into "SF_JECF_BASE"."SF_AREAS" values(2,‘350120‘,‘台江区‘,‘350100‘);
insert into "SF_JECF_BASE"."SF_AREAS" values(3,‘350130‘,‘晋安区‘,‘350100‘);
insert into "SF_JECF_BASE"."SF_AREAS" values(4,‘350140‘,‘仓山区‘,‘350100‘);
insert into "SF_JECF_BASE"."SF_AREAS" values(5,‘350150‘,‘马尾区‘,‘350100‘);

小区community

CREATE TABLE "SF_JECF_BASE"."SF_COMMUNITYS" (
"id" VARCHAR2(64 BYTE) NOT NULL ,
"communityid" VARCHAR2(64 BYTE) NOT NULL,
"community" VARCHAR2(100 BYTE) NOT NULL,
"areaid" VARCHAR2(64 BYTE) NOT NULL
)

insert into "SF_JECF_BASE"."SF_COMMUNITYS" values(1,‘350111‘,‘闽运公寓‘,‘350110‘);
insert into "SF_JECF_BASE"."SF_COMMUNITYS" values(2,‘350112‘,‘安泰中心‘,‘350110‘);
insert into "SF_JECF_BASE"."SF_COMMUNITYS" values(3,‘350113‘,‘欣泰花园‘,‘350110‘);
insert into "SF_JECF_BASE"."SF_COMMUNITYS" values(4,‘350114‘,‘开元新村‘,‘350110‘);
insert into "SF_JECF_BASE"."SF_COMMUNITYS" values(5,‘350115‘,‘阳光水岸‘,‘350110‘);

 


















以上是关于Oracle数据库设计省市区小区数据库建表的主要内容,如果未能解决你的问题,请参考以下文章

Oracle数据库-建库建表空间,建用户

ORACLE和MYSQL的简单区别

JS 省市县小区联动

Oracal数据库安装配置教程

(转载)数据库表设计-水电费缴费系统(oracle)

mysql 如何在用户下建表,在数据库实例中可以建表,但是我在自己建的用户下却看不到。我以前使用oracle。