通俗来讲,会话(Session) 是通信双方从开始通信到通信结束期间的一个上下文(Context)。这个上下文是一段位于服务器端的内存:记录了本次连接的所有相关状态和运行数据.

连接(Connection):连接是从客户端到ORACLE实例的一条物理路径。连接可以在网络上建立,或者在本机通过IPC机制建立。通常会在客户端进程与一个专用服务器或一个调度器之间建立连接。

会话(Session) 是和连接(Connection)是同时建立的,两者是对同一件事情不同层次的描述。简单讲,连接(Connection)是物理上的客户端同服务器的通信链路,会话(Session)是逻辑上的用户同服务器的通信交互。

---------------------

作者:jimsonhappy

来源:CSDN

原文:https://blog.csdn.net/jimsonhappy/article/details/54707694

版权声明:本文为博主原创文章,转载请附上博文链接!

如该流程图所示,SQLite数据库文件打开过程中需要使用到shell.c,main.c,btree.c,pager.c,os.c和os_win.c模块中的相关函数,

最后是由os_win.c模块中的winOpen()函数予以在widows平台上实现对数据库打开,读写等大多数功能。

http://huili.github.io/third/xjklc.html

SQLite层次化数据组织

基本上,具体的数据单元由堆栈中的各模块处理,如图4所示。自下而上,数据变得更加精确、详细。自上而下,数据变得更集中、模糊。具体地说,C API负责域值,VDBE负责处理记录,B-tree负责处理键值和数据,pager负责处理页,操作系统接口负责处理二进制数据和原始数据存储。 每个模块负责维护自身在数据库中对应的数据部分,然后依靠底层提供所需信息的初始数据,并从中提取需要的内容。

http://huili.github.io/B-treeImplementation/hierarchicalorganization.html

** Each open SQLite database is represented by a pointer to an instance of

** the opaque structure named "sqlite3".  It is useful to think of an sqlite3

** pointer as an object.

A Database connection is a facility in computer science that allows client software to talk to database server software, whether on the same machine or not. A connection is required to send commands and receive answers, usually in the form of a result set.

Connections are a key concept in data-centric programming. Since some DBMS engines require considerable time to connect connection pooling was invented to improve performance. No command can be performed against a database without an "open and available" connection to it.

Many databases (such as PostgreSQL) only allow one operation to be performed at a time on each connection. If a request for data (a SQL Select statement) is sent to the database and a result set is returned, the connection is open but not available for other operations until the client finishes consuming the result set. Other databases, like SQL Server 2005 (and later), do not impose this limitation. However, databases that provide multiple operations per connection usually incur far more overhead than those that permit only a single operation task at a time.

https://en.wikipedia.org/wiki/Database_connection

The connection is the physical communication channel between SQL Server and the application: the TCP socket, the named pipe, the shared memory region. The session in SQL Server corresponds to the Wikipedia definition of a session: a semi-permanent container of state for an information exchange. In other words the sessions stores settings like cache of your login information, current transaction isolation level, session level SET values etc etc.

Normally there is one session on each connection, but there could be multiple session on a single connection (Multiple Active Result Sets, MARS) and there are sessions that have no connection (SSB activated procedures, system sessions). There are also connections w/o sessions, namely connections used for non-TDS purposes, like database mirroring sys.dm_db_mirroring_connections or Service Broker connections sys.dm_broker_connections.

https://dba.stackexchange.com/questions/13698/what-is-the-difference-between-a-connection-and-a-session

最新文章

  1. 《JS设计模式笔记》 2,简单工厂模式
  2. [转]Eclipse启动Tomcat时45秒超时解决方法
  3. 给td添加滚动条
  4. Springlake-01 介绍&功能&安装
  5. Android 隐式意图和显示意图的使用场景
  6. Facebook的体系结构分析---外文转载
  7. [Effective JavaScript 笔记]第65条:不要在计算时阻塞事件队列
  8. Oracle Dataguard Standby Redo Log的两个实验
  9. webserver 发布问题
  10. USB HID 协议入门
  11. Socket programming in C on Linux | tutorial
  12. YUV像素和ycbcr
  13. iOS 获取通讯录里边的电话号码AddressBook
  14. PHP 9 大缓存技术总结
  15. Codeforces Round #216 (Div. 2) D. Valera and Fools
  16. 将已有的工程项目添加到Xcode到Git管理中
  17. jmeter 使用jmeter 录制web脚本
  18. MaxCompute 2.0复杂数据类型之array
  19. 第32章 事件 - Identity Server 4 中文文档(v1.0.0)
  20. rabbitmq 配置集群镜像

热门文章

  1. 通过DFS求解有向图(邻接表存储)中所有简单回路
  2. Java类加载机制(加载、验证、准备、解析、初始化)
  3. window 服务器的Tomcat 控制台日志保存到日志文件.
  4. 输出映射resultType
  5. CSS3动画:流彩文字效果+图片模糊效果+边框伸展效果实现
  6. Dynamics AX 2012 性能优化之 SQL Server 复制
  7. Salesforce 自定义标签在代码中的应用
  8. 使用Redis作为分布式锁的一些注意点
  9. JMeter java.net.URISyntaxException:Illegalcharacterinquery解决方案
  10. Nginx filebeat+logstash+Elasticsearch+kibana实现nginx日志图形化展示