Web-based DBMS Technology 线上数据库

Example Online Databases • https://www.planespotters.net/ • https://www.comics.org/ • https://www.quandl.com/ • https://www.enigma.com/ • https://www.sportradar.com/

Basics of WWW • The Web is a very large client-server system — Connected through routers and switches — Communicating with TCP/IP protocol — With no centralised control • Servers publish pages at URLs • Clients request pages by specifying the URLs • Pages are transferred on the Web using HTTP protocol • Each HTTP interaction is independent — No concept of a state or session WWW基本原理 网络是大客户端服务器系统 通过路由器和交换机连接 使用 TCP/IP 协议通信 - 没有集中控制 - 服务器在 URL 上发布网页 - 客户端通过指定 URL 请求网页 - 使用 HTTP 协议在网络上传输网页 - 每次 HTTP 交互都是独立的 - 没有状态或会话的概念

1990’s Client-Server DBMS Architecture • Example: A high street travel agency • Application/business code on client machine – “fat client” • Proprietary software – expensive to maintain & update 1990客户端五五七DBMS架构客户机上发代码程序 专有软件 维护更新成本高From 1995: Three-Tier Architecture三层架构 • Example: A web-based bookstore. e.g., amazon.co.uk • All application/business code off client, onto server 所有代码程序从客户端移到服务器

Characteristics of Three-Tier Architecture • Advantages: — Platform independence – web browsers for every PC — Cheap graphical user interface – potential for innovation — Simplicity – easier to upgrade & scale • Disadvantages: — Costly to maintain server – poor development tools — Less secure (hackers, etc.) — Less reliable (packet loss) — Stateless – no built-in support for transactions — Scaling limitations – size of data and No. of users

优点: - 平台独立性 - 每台 PC 都有网络浏览器 - 廉价的图形用户界面 - 创新潜力 - 简化 - 升级和扩展更容易 - 缺点: - 维护服务器成本高 - 开发工具差 - 安全性较差(黑客等) - 可靠性较低(数据包丢失) - 无状态 没有内置的事务支持 - 扩展限制 数据大小和用户数量

University Architecture

Static and Dynamic Content • HTML content stored entirely in files is static • Most Web content is dynamic — needs to vary with time and users — e.g., Amazon.co.uk • Dynamic HTML pages need to be generated for every transfer/access • Dynamic content may come from — user inputs — statements / procedures — database tables • Linking databases to web involves creating HTML pages on the fly using database query results • We learn some techniques to generate dynamic HTML pages静态内容和动态内容 - 完全存储在文件中的 HTML 内容是静态的 - 大多数网络内容是动态的 - 需要随时间和用户而变化  例如 Amazon.co.uk - 每次传输/访问都需要生成动态 HTML 页面 - 动态内容可能来自 - 用户输入 语句/程序 数据库表 - 将数据库链接到网络需要使用数据库查询结果即时创建 HTML 页面

Web Server Software Old Technologies • Existing Java programs that connect to DBMS can be extended to generate dynamic HTML using CGI • CGI = Common Gateway Interface • CGI is generic and can be used with — Java, C and other programming languages — Unix scripts and other scripting languages • Low-level DB access exploits DB interface libraries such as JDBC • When using CGI with Java — User input is obtained from HTML forms — CGI script is invoked when user submits the form (see the html form in the example) — CGI passes user input from the html form to the Java class ◦ as a list of attribute value pairs separated by ‘&’网络服务器软件 旧技术 - 连接 DBMS 的现有 Java 程序可通过 CGI 扩展到生成动态 HTML - CGI = 通用网关接口 - CGI 是通用的,可用于 - Java、 C 和其他编程语言 Unix 脚本和其他脚本语言 - 底层 DB 访问利用 DB 接口库(如 JDBC) - 在 Java 中使用 CGI 时 - 用户输入从 HTML 表单中获取  用户提交表单时调用 CGI 脚本(见示例中的 html 表单) CGI 将用户输入从 html 表单传递到 Java 类 ◦,作为以"&"分隔的属性值对列表。

Example – CGI scripting • This example contains — An HTML form to obtain user name as input — A CGI script for invoking a java class — A Java class ◦ For processing the user input and ◦ Printing a ‘Hello World’ message • Example only illustrates how cgi facilitates linking — HTML forms and Java classes — Java class does not really connect to a database — Try adding code for connecting to a database本示例包含 - 一个 HTML 表单,用于获取用户名作为输入 一个 CGI 脚本,用于调用一个 Java 类 一个 Java 类 ◦ 用于处理用户输入和 ◦ 打印一条 "Hello World "消息 - 示例仅说明了 cgi 如何促进链接 - HTML 表单和 Java 类 Java 类并不真正连接到数据库 尝试添加连接到数据库的代码

Example – HTML Form

Java Code

CGI Script • Only two lines in ‘helloworld.cgi’ file

• Each CGI program runs as a separate process – resource-intensive • Difficult to mix content and functionality — As in the example you need to create the output HTML file in the Java class — Not easy at times • Warning: each server is configured differently for running CGI scripts — Speak to the sys admin每个 CGI 程序都作为单独的进程运行 资源密集型 - 难以混合内容和功能 -需要在 Java 类中创建输出 HTML 文件 有时并不容易 -每个服务器对运行 CGI 脚本的配置不同 需要咨询系统管理员

Web Server Software New Technologies • There are many new technologies that allow access to DBMSs • Naturally there are advantages and disadvantages associated with each of them • Examples — Microsoft IIS, ASP – JScript/VBScript, Ajax — Sun Microsystems Java – JSP, servlets — Mozilla Firefox – JavaScript — ... • In this course we introduce you to: — PHP code embedded in HTML to access MySQL databases — Ruby code to access SQLite databases — Python code to access MongoDB databases网络服务器软件新技术 - 有许多新技术可以访问数据库管理系统 - 每种技术都有其优缺点 - 示例 - Microsoft IIS、ASP - JScript/VBScript、Ajax - Sun Microsystems Java - JSP、servlets - Mozilla Firefox - JavaScript - ... - 重点 - 嵌入 HTML 的 PHP 代码访问 MySQL 数据库 Ruby 代码访问 SQLite 数据库 Python 代码访问 MongoDB 数据

PHP & MySQL • Stands for PHP: Hypertext Preprocessor — Recursive acronym • Is a scripting language — Interpreted, not compiled — Public domain software • Embedded directly into HTML pages — Pages are published with “.php” extension • Server executes the embedded PHP code every time that page is requested • Home Page: www.php.net • PHP+MySQL is a very popular combination for producing dynamic web pages PHP 的缩写: 超文本预处理器 递归首字母缩写 - 是一种脚本语言 - 解译,而非编译 - 公有软件  直接嵌入 HTML 页面 页面以".php "扩展名发布  - 每次请求该页面时,服务器都会执行嵌入的 PHP 代码 - 主页:www.php.net - PHP+MySQL 是制作动态网页非常流行的组合方式

Web Database Architecture with PHP and MySQL 1. Browser issues an HTTP request for a particular web page 2. Web server receives the request, retrieves the file and passes it to the PHP engine for processing 3. PHP engine connects to the MySQL server and sends the query 4. MySQL server receives the query, processes it, and sends the results back to the PHP engine 5. PHP engine receives the results, prepares the HTML page and send it to the web server 6. Web server sends the HTML page to the browser and browser displays the page to the user使用 PHP 和 MySQL 的网络数据库架构 1. 浏览器对特定网页发出 HTTP 请求 2. 网络服务器接收请求,检索文件并将其传递给 PHP 引擎进行处理 3. PHP 引擎连接到 MySQL 服务器并发送查询 4. 4. MySQL 服务器接收查询,进行处理,并将结果发送回 PHP 引擎 5. PHP 引擎接收结果,准备 HTML 页面并将其发送至网络服务器 6. 网络服务器将 HTML 页面发送到浏览器,浏览器将页面显示给用户

PHP+MySQL Programming Model • Web site made from “.php” files on web server • “.php” files contain HTML with embedded PHP code • PHP code is enclosed in

• Basic steps followed in any PHP script used to access a database: — Check and filter data coming from the user — Set up a connection to MySQL server — Selecting the appropriate database — Query the database — Retrieve the results — Present the results back to the user — Close the database connectionPHP+MySQL 编程模型 - 网站由网站服务器上的".php "文件组成 - ".php "文件包含嵌入了 PHP 代码的 HTML - PHP 代码被括入 <?php ... ?> - 任何用于访问数据库的 PHP 脚本都遵循以下基本步骤: - 检查和过滤来自用户的数据 建立与 MySQL 服务器的连接 选择适当的数据库 查询数据库 检索结果 将结果返回给用户 关闭数据库连接

Sample PHP Code

Recap: Building Web database Applications • Apply appropriate software engineering life cycle — Requirements analysis — Design — Implementation — Testing • Security of data is very important in Web Database applications • Use MySQL privilege system to control access to data • User identification and personalization is necessary with web database applications构建网络数据库应用程序--应用适当的软件工程生命周期--需求分析 设计 实施 测试--数据安全在网络数据库应用程序中非常重要--使用 MySQL 权限系统控制数据访问--网络数据库应用程序需要用户识别和个性化

Summary • Organizations increasingly want data to be available over the internet • Web databases require new technologies to extend simple HTTP protocol used on the web • PHP is a scripting language embedded in html code to develop web database applications • Security is one of the main issues in web database applications • Useful Links — www.w3.org – World Wide Web Consortium — www.wdvl.com – Web Developer’s Virtual Library — www.php.net – PHP home page — www.mysql.com – MySQL home page

各组织越来越希望通过互联网提供数据 - 网络数据库需要新技术来扩展网络上使用的简单 HTTP 协议 - PHP 是一种嵌入 html 代码的脚本语言,用于开发网络数据库应用程序 - 安全性是网络数据库应用程序的主要问题之一 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/453222.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Anaconda的使用及spyder相关设置

Anaconda Anaconda是一个Python发行版&#xff0c;主要用于数据科学和机器学习领域。Anaconda集成了许多常用的数据科学工具和库&#xff0c;如NumPy、Pandas、Scikit-learn等&#xff0c;同时还包含了一个强大的包管理器conda和一个集成开发环境Spyder。Anaconda的目标是提供一…

电脑回收站图标更改

小猫图标 效果图 1.下载压缩包 https://www.123pan.com/s/9QRqVv-u3lY.html 解压后得到两个文件 coo.dll&#xff08;满&#xff09; ooo.dll&#xff08;空&#xff09;把这两个文件放到C盘的图片文件夹中 2.更改图标 wini打开设置&#xff0c;选择个性化&#xff0c…

Python学习笔记1:Pycharm首次安装环境搭建汉化

Pycharm首次安装环境搭建汉化笔记 1.下载网址 首先下载专业版的pycharm&#xff0c;这里建议下载专业版是因为功能更全面&#xff0c;社区版的往往没有远程调控等实践功能。 网址贴在下方&#xff1a; https://www.jetbrains.com/pycharm/download/?sectionwindows •Profe…

Vue3组件详情

Vue3组件详情 一、父组件向子组件传值 ref、props二、子组件向父组件传值 emit三、子组件向父组件传值 v-model四、setup语法糖1、基本用法2、data和methods3、计算属性 computed4、监听器 watch、watchEffect5、自定义指令 directive6、import导入的内容可以直接使用7、声明pr…

【Docker】使用Docker部署IT运维管理平台CAT

作者怀揣着一个美好的愿景&#xff0c;旨在提升管理效率、推动开源项目的蓬勃发展。 来一杯咖啡与茶&#xff0c;为 IT 运维从业者减轻管理负担&#xff0c;提升管理效率&#xff0c;从繁重无序的工作中解压出来&#xff0c;利用剩余时间多喝一杯休息一下。 这是一个专为 IT 运…

英伟达推出免训练,可生成连贯图片的文生图模型ConsiStory,生成角色一致性解决新方案

目前&#xff0c;多数文生图模型皆使用的是随机采样模式&#xff0c;使得每次生成的图像效果皆不同&#xff0c;在生成连贯的图像方面非常差。 例如&#xff0c;想通过AI生成一套图像连环画&#xff0c;即便使用同类的提示词也很难实现。虽然DALLE 3和Midjourney可以对图像实现…

k8s+zabbix

一&#xff0c;环境&#xff1a; 1&#xff09;&#xff0c;k8s部署&#xff0c;master和node节点都部署成功 二&#xff0c;部署&#xff1a; 1&#xff09;&#xff0c;安装python3&#xff08;资源中有&#xff09; wget https://www.python.org/ftp/python/3.7.4/Python-…

【Python】新手入门学习:详细介绍组合/聚合复用原则(CARP)及其作用、代码示例

【Python】新手入门学习&#xff1a;详细介绍组合/聚合复用原则&#xff08;CARP&#xff09;及其作用、代码示例 &#x1f308; 个人主页&#xff1a;高斯小哥 &#x1f525; 高质量专栏&#xff1a;Matplotlib之旅&#xff1a;零基础精通数据可视化、Python基础【高质量合集…

为什么选择VR全景进行企业宣传,如何将VR全景运用在企业展示

引言&#xff1a; 随着科技的不断发展&#xff0c;VR全景技术逐渐成为企业宣传的热门选择。那么&#xff0c;为什么越来越多的企业选择使用VR全景技术进行宣传呢&#xff1f; 一&#xff0e;为什么选择VR全景技术进行企业宣传 1. 提升用户体验 VR全景技术可以为用户营造身临…

c++函数SetConsoleTextAttribute

前言 正文 1.作用&#xff1a; 2.函数格式(重点)&#xff1a; 3.参数(重点)&#xff1a; 前言 实用(真的) 正文 1.作用&#xff1a; 更改cmd的背景色与字体颜色 2.函数格式(重点)&#xff1a; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),10进制参数); …

怎么查看电脑是不是固态硬盘?简单几个步骤判断

随着科技的发展&#xff0c;固态硬盘&#xff08;Solid State Drive&#xff0c;简称SSD&#xff09;已成为现代电脑的标配。相较于传统的机械硬盘&#xff0c;固态硬盘在读写速度、稳定性和耐用性等方面都有显著优势。但是&#xff0c;对于不熟悉电脑硬件的用户来说&#xff0…

Java学习-Collection集合框架2

1.Set集合的特点 特点体验: 1.1 hashSet的底层实现-哈希表 以及特点 普通二叉树和二分查找树 二分查找树的缺点: 红黑树是什么? HashSet集合去重复的机制:(HashSet比较地址只要地址不同,就不算重复) 此时就需要重写Hashcode和equals方法了: 1.2linkedHashSet特点及底层原理 1.…

Apache SeaTunnel MongoDB CDC 使用指南

随着数据驱动决策的重要性日益凸显&#xff0c;实时数据处理成为企业竞争力的关键。SeaTunnel MongoDB CDC(Change Data Capture) 源连接器的推出&#xff0c;为开发者提供了一个高效、灵活的工具&#xff0c;以实现对 MongoDB 数据库变更的实时捕获和处理。 本文将深入探讨该连…

支付模块-01微信支付和支付宝支付接口调研

支付接口调研 一般情况下&#xff0c;一个网站要支持在线支付功能通常接入第三方支付平台&#xff0c;比如&#xff1a;微信支付、支付宝、其它的聚合支付平台 微信支付方式 支付方式描述应用场景付款码支付指用户展示微信钱包内的付款码给商户系统扫描后直接完成支付适用于线…

【嵌入式——QT】QPainter基本绘图

【嵌入式——QT】QPainter基本绘图 QPainter与QPaintDevicepaintEvent事件和绘图区QPainter主要属性QPen主要功能QBrush主要功能QPainter绘制基本图形方法图示代码示例 QPainter与QPaintDevice QPainter是用来进行绘图操作的类&#xff0c;QPaintDevice是一个可以使用QPainter…

力扣hot100题解(python版69-73题)

69、有效的括号 给定一个只包括 (&#xff0c;)&#xff0c;{&#xff0c;}&#xff0c;[&#xff0c;] 的字符串 s &#xff0c;判断字符串是否有效。 有效字符串需满足&#xff1a; 左括号必须用相同类型的右括号闭合。左括号必须以正确的顺序闭合。每个右括号都有一个对应…

YOLOv9改进策略:注意力机制 | EMA:基于跨空间学习的高效多尺度注意力,效果优于ECA、CBAM、CA

&#x1f4a1;&#x1f4a1;&#x1f4a1;本文改进内容&#xff1a;加入EMA注意力&#xff0c;一种基于跨空间学习的高效多尺度注意力&#xff0c;效果优于ECA、CBAM、CA等经典注意力。 yolov9-c-EMA summary: 970 layers, 51011154 parameters, 51011122 gradients, 238.9 GF…

链动2+1模式与用户留存复购策略:结合消费增值模式的创新应用

大家好&#xff0c;我是吴军&#xff0c;来自一家软件开发公司的产品经理岗位。 今天&#xff0c;我想和大家深入探讨链动21模式&#xff0c;特别是它如何有效应对用户留存和复购的挑战。 尽管有些人认为链动模式已经过时&#xff0c;但我认为它的潜力远未被充分挖掘。链动不仅…

SpringBoot3整合mybatis

SpringBoot3整合mybatis 一、添加mybatis的依赖二、通过XML配置三、通过yum或properties文件配置四、常用注解1.Mapper2.MapperScan 一、添加mybatis的依赖 <!--mybatis--> <dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>…

源聚达科技:抖音今年开店有没有什么新政策

随着电商行业的蓬勃发展&#xff0c;抖音平台作为新兴的社交电商平台&#xff0c;近年来推出了多项新政策以吸引商家入驻&#xff0c;提升用户体验。今年&#xff0c;抖音在开店政策上又有了新的调整和优化&#xff0c;这些变化对于商家来说无疑是重要的风向标。 最新的政策中&…
最新文章