sqlplus

从 SQL 到 MongoDB 之概念篇

别说谁变了你拦得住时间么 提交于 2020-07-28 11:50:15
翻译原文:MongoDB 官方文档: SQL to MongoDB Mapping Chart 前言 很多开发者首次接触数据库(通常是在高校课堂)的概念,或者说接触第一个数据库,通常是 SQL 数据库,而现在,NoSQL 数据库越来越流行,很多原 SQL 数据的使用者难免有转向 NoSQL 的需求。而作为 NoSQL 数据库的代表,MongoDB 在社区越来越流行,生产环境的使用也日益广泛。 对于 SQL 转战 NoSQL的开发人员来说,最难的一步其实是将原有的 SQL 的概念和知识直接复用过来,最大化的减小学习的成本。 其实,这一步 MongoDB 官方已经为大家考虑到了,那就是在: MongoDB CRUD Operations > MongoDB CRUD Operations > SQL to MongoDB Mapping Chart ,这篇文档非常好的总结了 SQL 对应 MongoDB 的术语和概念,还有可执行文件、SQL 语句/MongoDB 语句等, 可以说对于 SQL 数据库开发人员,如果理解了他们之间的对应关系,那么就一只脚就迈进了 MongoDB 的大门。 Terminology and Concepts 下表介绍了各种 SQL 术语和概念以及相应的 MongoDB 术语和概念. SQL术语/概念 MongoDB 术语/概念 database

Oracle 是什么? 怎么快速入门??

自闭症网瘾萝莉.ら 提交于 2020-07-28 02:59:12
一.什么是Oracle? Oracle Database,又名Oracle RDBMS,或简称Oracle。是甲骨文公司的一款关系数据库管理系统。到目前仍在数据库市场上占有主要份额。 功能强大、性能卓越 Oracle数据库思想的诞生是在IBM公司。 上世纪60年代-70年代--IBM的一款数据库IMS,98%+ Oracle是收费软件,且按照年收费。Oracle不针对非商用收费。 二、ORACLE安装与配置 (一)版本和下载 Oracle的版本发展8、9i, 10g,11g ,12c,18c。 Oracle分免费简化版本(XE)(Oracle Database Express)和完整版本(Oracle Database),都可以 自由下载。 完整版本Oracle的官方直接下载的参考网址: https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index-092322.html (二)软件安装 本人安装的是简化版本: 双击运行; 步骤一:向导 步骤二:许可 步骤三:安装位置(安装到自定义位置即可, 不要安装在有中文或空格的文件中 ) 步骤四:设置system账号密码(最好是 数字,避免出错 ) 这个口令是 sys和system这两个超级用户的密码 。sys相当于mysql的root。 步骤五

sqlplus 显示设置

可紊 提交于 2020-07-25 12:35:32
1、设置行的长度 set linesize n; 2、设置指定列的长度 col 指定修改的列 for a(指定多少字符) eg: col name for a20; 来源: oschina 链接: https://my.oschina.net/u/4127369/blog/4277356

Remove last character from string in sql plus

陌路散爱 提交于 2020-06-25 07:38:05
问题 I'm trying to remove the last character from a column output in sql plus. The length of the column entries is not fixed For e.g XYZA should output as XYZ I've tried using the substr() function but it doesn't seem to work. SUBSTR(ooo.CO_NAME,1,LENGTH(ooo.CO_NAME-1)) 回答1: A closing parenthesis is in the wrong place. It should be: SUBSTR(ooo.CO_NAME, 1, LENGTH(ooo.CO_NAME) - 1) 来源: https://stackoverflow.com/questions/26465848/remove-last-character-from-string-in-sql-plus

How do I add a cluster on a composite key?

只谈情不闲聊 提交于 2020-05-30 08:00:47
问题 I have created a cluster create cluster abc_clus (abc_key int) ; and then created an index based on that cluster create index abc_clus_idx on cluster abc_clus; I tried adding this cluster on these 4 tables for a complex join create table number1 ( dateofbirth date, Time timestamp(0), IDnumber int not null, class varchar(7) not null, primary key (dateofbirth, Time, class)) cluster abc_clus(class); and create table number2( tutornumber int not null, forename varchar2(20) not null, constraint

Can i have a composite index on when using a left join

社会主义新天地 提交于 2020-05-24 05:07:49
问题 My aim is to use a composite index on the student table. The Student table will be inner joined onto the xyz table. I created my index on the student table as follows: CREATE INDEX email_phonenumber_student_idx ON student(phonenumber, email); When I run my query SELECT Phonenumber, email from student left join enrolment on enrolment.studentnumber = student.studentnumber where months_between(SYSDATE, dateofbirth)/12 >= 18 and enrolment.studentnumber is null and student.phonenumber =

Can i have a composite index on when using a left join

对着背影说爱祢 提交于 2020-05-24 05:06:29
问题 My aim is to use a composite index on the student table. The Student table will be inner joined onto the xyz table. I created my index on the student table as follows: CREATE INDEX email_phonenumber_student_idx ON student(phonenumber, email); When I run my query SELECT Phonenumber, email from student left join enrolment on enrolment.studentnumber = student.studentnumber where months_between(SYSDATE, dateofbirth)/12 >= 18 and enrolment.studentnumber is null and student.phonenumber =

Use a variable with “LIKE %” (e.g. “variable%”) in PL/SQL?

别来无恙 提交于 2020-05-12 20:33:35
问题 The question is similar to using LIKE in SQL *PLUS , where a select statement contains a LIKE clause as follows: select * from sometable where somecolumn LIKE 'something%'; How could one use the same within a cursor? I tried using the following: cursor c is select * from sometable where somecolumn like 'something%'; same as above EDIT: I need to get something as a parameter, meaning, the select statement is executed within a stored procedure. EDIT 2: create procedure proc1 (search VARCHAR) is

Use a variable with “LIKE %” (e.g. “variable%”) in PL/SQL?

夙愿已清 提交于 2020-05-12 20:32:48
问题 The question is similar to using LIKE in SQL *PLUS , where a select statement contains a LIKE clause as follows: select * from sometable where somecolumn LIKE 'something%'; How could one use the same within a cursor? I tried using the following: cursor c is select * from sometable where somecolumn like 'something%'; same as above EDIT: I need to get something as a parameter, meaning, the select statement is executed within a stored procedure. EDIT 2: create procedure proc1 (search VARCHAR) is

Use a variable with “LIKE %” (e.g. “variable%”) in PL/SQL?

落花浮王杯 提交于 2020-05-12 20:32:07
问题 The question is similar to using LIKE in SQL *PLUS , where a select statement contains a LIKE clause as follows: select * from sometable where somecolumn LIKE 'something%'; How could one use the same within a cursor? I tried using the following: cursor c is select * from sometable where somecolumn like 'something%'; same as above EDIT: I need to get something as a parameter, meaning, the select statement is executed within a stored procedure. EDIT 2: create procedure proc1 (search VARCHAR) is