存储过程+FastDfs+quartz+分页查询

面试题

  1. 存储过程与存储函数与java代码的联系用法?

视图就是封装了一条复杂查询的语句。

语法1.:CREATE VIEW 视图名称 AS 子查询

范例:建立一个视图,此视图包括了20部门的全部员工信息

create view empvd20 as select * from emp t where t.deptno = 20

视图创建完毕就可以使用视图来查询,查询出来的都是20部门的员工

 

存储过程(Stored Procedure)是在大型数据库系统中,一组为了完成特定功能的SQL 语句集,经编译后存储在数据库中,用户通过指定存储过程的名字并给出参数(如果该存储过程带有参数)来执行它。存储过程是数据库中的一个重要对象,任何一个设计良好的数据库应用程序都应该用到存储过程。

 

一般来讲,过程和函数的区别在于函数可以有一个返回值;而过程没有返回值。

但过程和函数都可以通过out指定一个或多个输出参数。我们可以利用out参数,在过程和函数中实现返回多个值。

 

  1. FastDFS的方法的参数有什么?

method:'POST',
  
url:'../upload/uploadFile',
  
data:formData,
  
headers: {'Content-Type':undefined}, // ‘Content-Type’: undefined,这样浏览器会帮我们把 Content-Type 设置为 multipart/form-data
   
transformRequest: angular.identity// transformRequest: angular.identity ,anjularjs transformRequest function 将序列化我们的formdata object.

  1. 定时任务Quartz?

cron表达式用于配置cronTrigger的实例。cron表达式实际上是由七个子表达式组成。这些表达式之间用空格分隔。

1.Seconds (秒)
2.Minutes(分)
3.Hours(小时)
4.Day-of-Month  (天)
5.Month(月)
6.Day-of-Week (周)
7.Year(年)

例:"0 0 12 ? * WED” 意思是:每个星期三的中午12点执行。

个别子表达式可以包含范围或者列表。例如:上面例子中的WED可以换成"MON-FRI","MON,WED,FRI",甚至"MON-WED,SAT"。

子表达式范围:
1.Seconds (0~59)
2.Minutes (0~59)
3.Hours (0~23)
4.Day-of-Month (1~31,但是要注意有些月份没有31天)
5.Month (0~11,或者"JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV,DEC")
6.Day-of-Week (1~7,1=SUN 或者"SUN, MON, TUE, WED, THU, FRI, SAT”)
7.Year (1970~2099)

  1. MQ有几个参数?

生产者、消费者、服务者、监控者。

5.weblogic 与JBOOS与tomcate。

 

6.表名username,字段名:uname,步长:5

写出该表中姓张的所有信息,展示第8页的信息。

用mysql与oracle来写出对应的sql语句。

mysql: select * from uname where username like '张&';

oracle:

如下解释:

        oracle中Rownum表示行号,实际上此是一个伪劣,此列可以在每张表中出现。

范例:查询emp 表中带有rownum列:

        select rownum, t.* from emp t

我们可以根据rownum来取结果集的前几行,比如前5行:

        select rownum, t .* from emp t where rownum <6;

但是我们不能取到中间几行,因为rownum不支持大于号,只支持小于号,如果想实现我们需求怎么办?

答案是使用子查询,也正是oracle分页的做法。

select * from (select rownum r ,emp.* from emp) b

                    where b.r>5 and b.r <11;

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
封装通用的Spring3+Struts2+MyBatis3的CRUD+条件分页查询,Spring+Quartz调度,FunctionCharts图像化工具 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <bean id="temperMonitorTimerJob" class="cn.sup.cd.listener.TemperatureMonitorTaskJob"></bean> <!-- 政策调度--> <bean id="temperMonitorTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <!-- 调用的类 --> <property name="targetObject"> <ref bean="temperMonitorTimerJob"/> </property> <!-- 调用类中的方法 --> <property name="targetMethod"> <value>temperatureMonitorTimer</value> </property> </bean> <!-- BOOK定义触发时间 几秒后执行monitor.start.time 每隔monitor.interval.time执行--> <bean id="getPolicyTime" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="temperMonitorTask"/> </property> <!-- cron表达式 --> <property name="cronExpression"> <value>${monitor.start.time}/${monitor.interval.time} * * * * ?</value> </property> </bean> <!-- 总管理类 如果将lazy-init='false'那么容器启动就会执行调度程序 --> <bean id="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="getPolicyTime"/> </list> </property> </bean> </beans>
好的,我可以为您提供一些基本的步骤。首先,您需要安装 Nginx 和 FastDFS 的依赖库和工具。然后按照以下步骤操作: 1. 下载并安装 FastDFS 您可以从官网下载 FastDFS 的源码包,然后解压到本地。进入解压后的目录,执行以下命令: ``` ./make.sh ./make.sh install ``` 这将编译并安装 FastDFS。安装完成后,需要修改配置文件 tracker.conf 和 storage.conf,配置 FastDFS 的基本参数。 2. 下载并安装 Nginx 您可以从 Nginx 官网下载 Nginx 的源码包,然后解压到本地。进入解压后的目录,执行以下命令: ``` ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/path/to/fastdfs-nginx-module/src make make install ``` 这将编译并安装 Nginx。安装完成后,需要修改配置文件 nginx.conf,启用 FastDFS 模块并配置基本参数。 3. 启动 FastDFS 和 Nginx 启动 FastDFS 和 Nginx 只需要执行以下命令: ``` /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf /usr/bin/fdfs_storaged /etc/fdfs/storage.conf /usr/local/nginx/sbin/nginx ``` 这将启动 FastDFS 的 Tracker 和 Storage,以及 Nginx。至此,您已经成功搭建了 Nginx+FastDFS 环境。 请注意,这只是一个基本的搭建步骤,具体的配置和调优还需要您根据自己的需求进行调整。另外,为了保证安全性和稳定性,建议您在生产环境中使用 HTTPS 协议,并且配置合适的防火墙和安全策略。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值