查看Oracle、MySQL、PostGreSQL中的依赖关系

查看Oracle、MySQL、PostGreSQL中的依赖关系

在有些程序员开发习惯中,喜欢为了应用代码的简洁或复用,而在数据库创建一个复杂关连查询的VIEW,甚至是VIEW套VIEW嵌套使用, 这里就有个问题如果上线后如发现依赖的表字段类型或长度不足时,修复一个view依赖的table列时发现在oracle、mysql、postgresql(本篇等同pg)中有不同的表现, 尤其是使用postgresql的用户需要格外注意, 因为pg 不允许直接修改, 学术派的严谨, 子之琼浆,彼之砒霜. 喜忧参半。

Oracle

SQL> CREATE TABLE t (id integer PRIMARY KEY);
Table created.SQL> CREATE VIEW v AS SELECT * FROM t;
View created.SQL> select status from user_objects where object_name='V';
STATUS
-------
VALIDSQL> DROP TABLE T;
Table dropped.SQL> select status from user_objects where object_name='V';
STATUS
-------
INVALIDSQL> CREATE TABLE t (id integer PRIMARY KEY);
Table created.SQL> select status from user_objects where object_name='V';
STATUS
-------
INVALIDSQL> select * from v;
no rows selectedSQL> select status from user_objects where object_name='V';
STATUS
-------
VALIDSQL> alter table t add name varchar2(20);
Table altered.SQL> select status from user_objects where object_name='V';
STATUS
-------
VALIDSQL> desc vName                            Null?    Type------------------------------- -------- ----------------------------1      ID                              NOT NULL NUMBER(38)SQL> desc tName                            Null?    Type------------------------------- -------- ----------------------------1      ID                              NOT NULL NUMBER(38)2      NAME                                     VARCHAR2(20)SQL> @ddl v
PL/SQL procedure successfully completed.DBMS_METADATA.GET_DDL(OBJECT_TYPE,OBJECT_NAME,OWNER)
--------------------------------------------------------------------------------CREATE OR REPLACE FORCE NONEDITIONABLE VIEW "SYS"."V" ("ID") ASSELECT "ID" FROM t;SQL> alter table t modify id number(10);
Table altered.SQL> select * from v;
no rows selectedSQL> desc v;Name                            Null?    Type------------------------------- -------- ----------------------------1      ID                              NOT NULL NUMBER(10)SQL> alter table t rename to t100;
Table altered.SQL> select status from user_objects where object_name='V';
STATUS
-------
INVALIDSQL> select * from v;
select * from v*
ERROR at line 1:
ORA-04063: view "SYS.V" has errors

Note:
在oracle中VIEW依赖的TABLE发生DDL后会变为INVALID状态,在下次调用时自动recompile, 如果依赖的表名,列名存在可以正常查询。修改依赖列长度正常修改,在依赖表rename后VIEW无法查询.

查找依赖关系

SQL> desc dba_dependenciesName                            Null?    Type------------------------------- -------- ----------------------------1      OWNER                           NOT NULL VARCHAR2(128)2      NAME                            NOT NULL VARCHAR2(128)3      TYPE                                     VARCHAR2(19)4      REFERENCED_OWNER                         VARCHAR2(128)5      REFERENCED_NAME                          VARCHAR2(128)6      REFERENCED_TYPE                          VARCHAR2(19)7      REFERENCED_LINK_NAME                     VARCHAR2(128)8      DEPENDENCY_TYPE                          VARCHAR2(4)SQL> @dep % v % %
OWNER            DEPENDENT_NAME                 DEPENDENT_TY REF_OWNER        REF_NAME                       REF_TYPE     DEP_
---------------- ------------------------------ ------------ ---------------- ------------------------------ ------------ ----
SYS              V                              VIEW         SYS              T100                           TABLE        HARDSQL> l1  select2     owner                   dep_owner,3     name                    dep_name,4     type                    dep_type,5     referenced_owner        dep_referenced_owner,6     referenced_name         dep_referenced_name,7     referenced_type         dep_referenced_type,8     dependency_type         dep_dependency_type9  --10  --from dba_dependencies where owner like '&1' and referenced_owner like '&2'11  --from dba_dependencies where owner like '&1' and name like '&2'12  --13  from14     dba_dependencies15  where16     lower(owner) like lower('&1')17  and        lower(name) like lower('&2')18  and        lower(referenced_owner) like lower('&3')19* and        lower(referenced_name) like lower('&4')
SQL>

MySQL

MYSQL_root@localhost [anbob]> CREATE TABLE t (id integer PRIMARY KEY);
Query OK, 0 rows affected (0.05 sec)MYSQL_root@localhost [anbob]> CREATE VIEW v AS SELECT * FROM t;
Query OK, 0 rows affected (0.02 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> select * from tables where table_schema='anbob' and TABLE_TYPE='VIEW' \G
*************************** 1. row ***************************TABLE_CATALOG: defTABLE_SCHEMA: anbobTABLE_NAME: vTABLE_TYPE: VIEWENGINE: NULLVERSION: NULLROW_FORMAT: NULLTABLE_ROWS: NULLAVG_ROW_LENGTH: NULLDATA_LENGTH: NULL
MAX_DATA_LENGTH: NULLINDEX_LENGTH: NULLDATA_FREE: NULLAUTO_INCREMENT: NULLCREATE_TIME: 2022-08-17 18:03:22UPDATE_TIME: NULLCHECK_TIME: NULL
TABLE_COLLATION: NULLCHECKSUM: NULLCREATE_OPTIONS: NULLTABLE_COMMENT: VIEW
1 row in set (0.00 sec)MYSQL_root@localhost [anbob]> DROP TABLE t;
Query OK, 0 rows affected (0.04 sec)MYSQL_root@localhost [anbob]> select * from v;
ERROR 1356 (HY000): View 'anbob.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use themMYSQL_root@localhost [INFORMATION_SCHEMA]> select * from tables where table_schema='anbob' and TABLE_TYPE='VIEW' \G
*************************** 1. row ***************************TABLE_CATALOG: defTABLE_SCHEMA: anbobTABLE_NAME: vTABLE_TYPE: VIEWENGINE: NULLVERSION: NULLROW_FORMAT: NULLTABLE_ROWS: NULLAVG_ROW_LENGTH: NULLDATA_LENGTH: NULL
MAX_DATA_LENGTH: NULLINDEX_LENGTH: NULLDATA_FREE: NULLAUTO_INCREMENT: NULLCREATE_TIME: 2022-08-17 18:03:22UPDATE_TIME: NULLCHECK_TIME: NULL
TABLE_COLLATION: NULLCHECKSUM: NULLCREATE_OPTIONS: NULLTABLE_COMMENT: View 'anbob.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
1 row in set, 1 warning (0.00 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> CREATE TABLE anbob.t (id integer PRIMARY KEY);
Query OK, 0 rows affected (0.06 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> select * from tables where table_schema='anbob' and TABLE_TYPE='VIEW' \G
*************************** 1. row ***************************TABLE_CATALOG: defTABLE_SCHEMA: anbobTABLE_NAME: vTABLE_TYPE: VIEWENGINE: NULLVERSION: NULLROW_FORMAT: NULLTABLE_ROWS: NULLAVG_ROW_LENGTH: NULLDATA_LENGTH: NULL
MAX_DATA_LENGTH: NULLINDEX_LENGTH: NULLDATA_FREE: NULLAUTO_INCREMENT: NULLCREATE_TIME: 2022-08-17 18:03:22UPDATE_TIME: NULLCHECK_TIME: NULL
TABLE_COLLATION: NULLCHECKSUM: NULLCREATE_OPTIONS: NULLTABLE_COMMENT: VIEW
1 row in set (0.00 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> desc anbob.v-> ;
+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| id    | int  | NO   |     | NULL    |       |
+-------+------+------+-----+---------+-------+
1 row in set (0.00 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> alter table anbob.t add name varchar(20);
Query OK, 0 rows affected (0.09 sec)
Records: 0  Duplicates: 0  Warnings: 0MYSQL_root@localhost [INFORMATION_SCHEMA]> select * from tables where table_schema='anbob' and TABLE_TYPE='VIEW' \G
*************************** 1. row ***************************TABLE_CATALOG: defTABLE_SCHEMA: anbobTABLE_NAME: vTABLE_TYPE: VIEWENGINE: NULLVERSION: NULLROW_FORMAT: NULLTABLE_ROWS: NULLAVG_ROW_LENGTH: NULLDATA_LENGTH: NULL
MAX_DATA_LENGTH: NULLINDEX_LENGTH: NULLDATA_FREE: NULLAUTO_INCREMENT: NULLCREATE_TIME: 2022-08-17 18:03:22UPDATE_TIME: NULLCHECK_TIME: NULL
TABLE_COLLATION: NULLCHECKSUM: NULLCREATE_OPTIONS: NULLTABLE_COMMENT: VIEW
1 row in set (0.00 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> alter table anbob.t rename to t100;
ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'information_schema'MYSQL_root@localhost [INFORMATION_SCHEMA]> alter table anbob.t rename to anbob.t100;
Query OK, 0 rows affected (0.20 sec)MYSQL_root@localhost [INFORMATION_SCHEMA]> select TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE,TABLE_COMMENT from tables where table_schema='anbob' and TABLE_TYPE='VIEW'
and table_comme
*************************** 1. row ***************************TABLE_SCHEMA: anbobTABLE_NAME: vTABLE_TYPE: VIEW
TABLE_COMMENT: View 'anbob.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
1 row in set, 2 warnings (0.01 sec)

Note:
在MySQL中和oracle基本一样, 只是没有oracle的dba_object.status 是否invalid表示,而是在INFORMATION_SCHEMA.TABLE_COMMENT有invalid关键字错误。

PostgreSQL

[local]:5432 postgres@anbob=# CREATE TABLE t (id integer PRIMARY KEY);
CREATE TABLE
[local]:5432 postgres@anbob=# CREATE VIEW v AS SELECT * FROM t;
CREATE VIEW
[local]:5432 postgres@anbob=# DROP TABLE t;
ERROR:  cannot drop table t because other objects depend on it
DETAIL:  view v depends on table t
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
[local]:5432 postgres@anbob=# alter table t add name varchar(20);
ALTER TABLE
[local]:5432 postgres@anbob=# select * from v;id
----
(0 rows)[local]:5432 postgres@anbob=# \d vView "public.v"Column |  Type   | Collation | Nullable | Default
--------+---------+-----------+----------+---------id     | integer |           |          |[local]:5432 postgres@anbob=# drop view v;
DROP VIEW
[local]:5432 postgres@anbob=#  CREATE VIEW v AS SELECT * FROM t;
CREATE VIEW
[local]:5432 postgres@anbob=# \d vView "public.v"Column |         Type          | Collation | Nullable | Default
--------+-----------------------+-----------+----------+---------id     | integer               |           |          |name   | character varying(20) |           |          |[local]:5432 postgres@anbob=# alter table t alter column name type varchar(40);
ERROR:  cannot alter type of a column used by a view or rule
DETAIL:  rule _RETURN on view v depends on column "name"
[local]:5432 postgres@anbob=#[local]:5432 postgres@anbob=# create view vv as select * from v;
CREATE VIEW
[local]:5432 postgres@anbob=# alter table t alter column name type varchar(40);
ERROR:  cannot alter type of a column used by a view or rule
DETAIL:  rule _RETURN on view v depends on column "name"
[local]:5432 postgres@anbob=# drop view v;
ERROR:  cannot drop view v because other objects depend on it
DETAIL:  view vv depends on view v
HINT:  Use DROP ... CASCADE to drop the dependent objects too.[local]:5432 postgres@anbob=# explain analyze select * from vv where id=1;QUERY PLAN
-----------------------------------------------------------------------------------------------------------Index Scan using t_pkey on t  (cost=0.15..8.17 rows=1 width=28) (actual time=0.004..0.004 rows=0 loops=1)Index Cond: (id = 1)Planning Time: 0.082 msExecution Time: 0.017 ms
(4 rows)[local]:5432 postgres@anbob=# alter table t rename to t100;
ALTER TABLE
[local]:5432 postgres@anbob=# select * from v;id | name
----+------
(0 rows)

Note:
在PG中view对其使用的对象没有直接依赖关系:依赖对象实际上是视图的rewrite rule, 这增加了另一层间接性。 如果对view依赖的表或表列修改或删除时,需要删除view和重建,当然增加列并没有影响 , 报错中会提示表的直接依赖,但递归包含并没有, 可以想象如果在PG中大量使用view后期维护表时会有一些小麻烦,这也可以简单认为pg中没有失效对象,至少是view。

另外与oracle 和mysql不同的是,pg中依赖的是对象oid, 在table对象rename后,并不会影响view的使用,依赖的是OID ,而不是NAME.

[local]:5432 postgres@anbob=# alter table t100 add address text;
ALTER TABLE
[local]:5432 postgres@anbob=# alter table t100 drop column address;
ALTER TABLEpostgres=# CREATE TABLE t (id integer PRIMARY KEY);
CREATE TABLE
postgres=# insert into t values(1),(2),(3);
INSERT 0 3
postgres=# select * from t;id 
----123
(3 rows)postgres=# CREATE VIEW v AS SELECT * FROM t;
CREATE VIEW
postgres=# 
postgres=# select * from v;id 
----123
(3 rows)postgres=# alter table t rename to tt;
ALTER TABLE
postgres=# select * from v;id 
----123
(3 rows)postgres=# 
postgres=# 

检查依赖关系

[local]:5432 postgres@anbob=# \d pg_dependTable "pg_catalog.pg_depend"Column    |  Type   | Collation | Nullable | Default
-------------+---------+-----------+----------+---------classid     | oid     |           | not null |objid       | oid     |           | not null |objsubid    | integer |           | not null |refclassid  | oid     |           | not null |refobjid    | oid     |           | not null |refobjsubid | integer |           | not null |deptype     | "char"  |           | not null |

classid存储包含依赖对象的目录表的对象 ID
objid存储依赖对象的ID
objsubid如果依赖项是针对列的,则存储列号
refclassid,refobjid和refobjsubid上面的三列一样,但是描述了依赖所引用的对象
deptype描述依赖的类型

查找表上的直接视图依赖项

[local]:5432 postgres@anbob=# SELECT v.oid::regclass AS view
anbob-# FROM pg_attribute AS a   -- columns for the table
anbob-#    JOIN pg_depend AS d   -- objects that depend on the column
anbob-#       ON d.refobjsubid = a.attnum AND d.refobjid = a.attrelid
anbob-#    JOIN pg_rewrite AS r  -- rules depending on the column
anbob-#       ON r.oid = d.objid
anbob-#    JOIN pg_class AS v    -- views for the rules
anbob-#       ON v.oid = r.ev_class
anbob-# WHERE v.relkind = 'v'    -- only interested in views
anbob-#   -- dependency must be a rule depending on a relation
anbob-#   AND d.classid = 'pg_rewrite'::regclass
anbob-#   AND d.refclassid = 'pg_class'::regclass
anbob-#   AND d.deptype = 'n'    -- normal dependency
anbob-#   AND a.attrelid = 't100'::regclass;view
------vv
(2 rows)

查找对表列的直接依赖关系

[local]:5432 postgres@anbob=# SELECT v.oid::regclass AS view
anbob-# FROM pg_attribute AS a   -- columns for the table
anbob-#    JOIN pg_depend AS d   -- objects that depend on the column
anbob-#       ON d.refobjsubid = a.attnum AND d.refobjid = a.attrelid
anbob-#    JOIN pg_rewrite AS r  -- rules depending on the column
anbob-#       ON r.oid = d.objid
anbob-#    JOIN pg_class AS v    -- views for the rules
anbob-#       ON v.oid = r.ev_class
anbob-# WHERE v.relkind = 'v'    -- only interested in views
anbob-#   -- dependency must be a rule depending on a relation
anbob-#   AND d.classid = 'pg_rewrite'::regclass
anbob-#   AND d.refclassid = 'pg_class'::regclass
anbob-#   AND d.deptype = 'n'    -- normal dependency
anbob-#   AND a.attrelid = 't100'::regclass
anbob-#   AND a.attname = 'name';view
------v
(1 row)

递归查找所有依赖视图

[local]:5432 postgres@anbob=#  WITH RECURSIVE views AS (-- get the directly depending viewsSELECT v.oid::regclass AS view,v.relkind = 'm' AS is_materialized,1 AS levelFROM pg_depend AS dJOIN pg_rewrite AS rON r.oid = d.objidJOIN pg_class AS vON v.oid = r.ev_classWHERE v.relkind IN ('v', 'm')AND d.classid = 'pg_rewrite'::regclassAND d.refclassid = 'pg_class'::regclassAND d.deptype = 'n'AND d.refobjid = 't100'::regclass
UNION-- add the views that depend on theseSELECT v.oid::regclass,v.relkind = 'm',views.level + 1FROM viewsJOIN pg_depend AS dON d.refobjid = views.viewJOIN pg_rewrite AS r  ON r.oid = d.objidJOIN pg_class AS vON v.oid = r.ev_classWHERE v.relkind IN ('v', 'm')AND d.classid = 'pg_rewrite'::regclassAND d.refclassid = 'pg_class'::regclassAND d.deptype = 'n'AND v.oid <> views.view  -- avoid loop
)
SELECT format('CREATE%s VIEW %s AS%s',CASE WHEN is_materializedTHEN ' MATERIALIZED'ELSE ''END,view,pg_get_viewdef(view))
FROM views
GROUP BY view, is_materialized
ORDER BY max(level);format
----------------------------------CREATE VIEW v AS SELECT t100.id,+t100.name                   +FROM t100;CREATE VIEW vv AS SELECT v.id,  +v.name                      +FROM v;
(2 rows)

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux kernel 与 设备树

Linux kernel 与 设备树 1 介绍1.1 概述1.2 发展历程1.3 各版本发布时间及特色1.4 Linux 单内核1.5 Linux 内核网址1.6 NXP 官方镜像与 野火 鲁班猫镜像的区别 2 Linux 内核组成2.1 进程管理2.2 内存管理2.3 文件系统2.4 设备管理2.5 网络功能 3 Linux 内核编译3.1 编译 Kernel…

小程序发布必须进行软件测试吗?测试内容有哪些?

在如今移动互联网时代&#xff0c;小程序已成为许多企业广泛采用的一种营销手段&#xff0c;然而&#xff0c;发布小程序之前进行充分的软件测试是至关重要的&#xff0c;因为它不仅可以确保小程序的质量&#xff0c;还可以避免潜在的风险和损失。 在进行小程序发布前进行软件…

可逆质子陶瓷电化学电池(R-PCEC)作为新型能量存储与转换装置开发应用价值大

可逆质子陶瓷电化学电池&#xff08;R-PCEC&#xff09;作为新型能量存储与转换装置开发应用价值大 可逆质子陶瓷电化学电池&#xff08;R-PCEC&#xff09;&#xff0c;同时具有燃料电池与电解槽功能&#xff0c;能够实现电能、化学能相互转化&#xff0c;是最具有发展前景的能…

mongodb(笔记向,有点乱哈)

基于分布式文件存储的数据库&#xff0c;c语言&#xff0c;介于关系与非关系数据库之间的产品。非关系数据库中功能最丰富&#xff0c;最像关系数据库的&#xff0c;存储比较复杂的数据类型。 语法有点类似于面向对象的查询语言&#xff0c;几乎可以实现类似数据库单表查询的绝…

「51媒体」政企活动媒体宣发如何做?

传媒如春雨&#xff0c;润物细无声&#xff0c;大家好&#xff0c;我是51媒体网胡老师。 媒体宣传加速季&#xff0c;100万补贴享不停&#xff0c;一手媒体资源&#xff0c;全国100城线下落地执行。详情请联系胡老师。 政企活动媒体宣发是一个系统性的过程&#xff0c;需要明确…

vue3如何实现一进入vue页面就全屏?

import { onUnmounted } from vue;onMounted(() > {fullscreenElement.value?.requestFullscreen() .then(() > { console.log(全屏成功); }) .catch(err > { console.error(全屏失败&#xff1a;, err); }); });

餐饮冷库安全守护神:可燃气体报警器检定的科学性与有效性

随着餐饮业的快速发展&#xff0c;冷库成为储存食材、保证食品质量的重要场所。 然而&#xff0c;由于冷库环境的特殊性&#xff0c;如密封性强、温度低、湿度大等&#xff0c;一旦冷库内发生可燃气体泄露&#xff0c;后果将不堪设想。因此&#xff0c;在餐饮冷库中安装并合理…

SpringBoot集成道历(实现道历日期查询)

官网地址&#xff1a;官网地址https://6tail.cn/calendar/api.html 1、导入依赖 <dependency><groupId>cn.6tail</groupId><artifactId>lunar</artifactId><version>1.3.9</version></dependency><dependency><group…

大模型微调(finetune)方法

lora adapter prefix-tuning p-tuning prompt-tuning 大模型微调后灾难行遗忘 1、主流解决大模型微调后灾难行遗忘的方法是在微调过程中加入通用的指令数据。 2、自我蒸馏方法主要是通过模型本身对任务数据进行生成引导&#xff0c;构建自我蒸馏数据集&#xff0c;改变任务数…

MQTT遗嘱信息(2)

接前一篇文章&#xff1a;MQTT遗嘱信息&#xff08;1&#xff09; 本文内容参考&#xff1a; 什么是MQTT遗嘱消息&#xff1f;如何配置和处理遗嘱消息&#xff1f;_mqtt last will-CSDN博客 MQTT 协议学习&#xff1a;Retained&#xff08;保留消息&#xff09; 与 LWT&#x…

shark云原生-日志管理体系-filebeat

文章目录 1. deploy 文件1.1 RBAC1.2. DaemonSet1.2.1. Elasticsearch 连接信息1.2.2. Volume 1.3. ConfigMap1.3.1. 日志收集路径1.3.2. 日志事件输出目标 2. 在控制平面节点上运行Filebeat3. 查看输出3.1. 关于处理器 processors 4. 日志收集配置4.1. 手动指定日志收集路径4.…

前端生成循环数组的值

生成循环数组的值可以通过以下方式实现&#xff1a; // 定义一个函数&#xff0c;输入是数组和循环的次数 function generateCircularArray(arr, n) {// 循环n次for (let i 0; i < n; i) {// 每次都从数组尾部取一个元素&#xff0c;移除它&#xff0c;然后添加到数组头部…

基于SpringBoot前后端分离旅游出行管理系统设计和实现(源码+LW+调试文档+讲解等)

&#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN作者、博客专家、全栈领域优质创作者&#xff0c;博客之星、平台优质作者、专注于Java、小程序技术领域和毕业项目实战✌&#x1f497; &#x1f31f;文末获取源码数据库&#x1f31f;感兴趣的可以先收藏起来&#xff0c;还…

Qt 无预处理步骤的可用性探讨

在多平台GUI开发中&#xff0c;Qt库广受推崇。然而&#xff0c;对于某些开发者而言&#xff0c;Qt的预处理工具 moc&#xff08;Meta-Object Compiler&#xff09;可能成为进入Qt世界的一道门槛。本文将探讨Qt在不使用预处理工具的情况下的可用性&#xff0c;并分享社区中的一些…

聚观早报 | iPhone 16核心硬件曝光;三星Galaxy全球新品发布会

聚观早报每日整理最值得关注的行业重点事件&#xff0c;帮助大家及时了解最新行业动态&#xff0c;每日读报&#xff0c;就读聚观365资讯简报。 整理丨Cutie 6月28日消息 iPhone 16核心硬件曝光 三星Galaxy全球新品发布会 苹果正多方下注布局AI商店 黄仁勋2024年薪酬3400…

力扣第213题“打家劫舍 II”

在本篇文章中&#xff0c;我们将详细解读力扣第213题“打家劫舍 II”。通过学习本篇文章&#xff0c;读者将掌握如何使用动态规划来解决这一问题&#xff0c;并了解相关的复杂度分析和模拟面试问答。每种方法都将配以详细的解释&#xff0c;以便于理解。 问题描述 力扣第213题…

Zynq7000系列FPGA中的DMA控制器简介(一)

DMA控制器&#xff08;DMAC&#xff09;使用64位AXI主接口来执行与系统存储器和PL外围设备之间的DMA数据传输&#xff0c;操作频率同CPU_2x的时钟速率。传输由DMA指令执行引擎控制。DMA引擎运行在一个小指令集上&#xff0c;该指令集提供了一种灵活的指定DMA传输的方法。这种方…

深入理解Java中的类与对象:封装、继承与多态

深入理解Java中的类与对象&#xff1a;封装、继承与多态 大家好&#xff0c;我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编&#xff0c;也是冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01; 在Java编程中&#xff0c;类与对象是核心概念。类是对…

【电路笔记】-MOSFET放大器

MOSFET放大器 文章目录 MOSFET放大器1、概述2、电路图3、电气特性3.1 ** I D = F ( V G S ) I_D=F(V_{GS}) ID​=F(VGS​)**特性3.2 I D = F ( V D S ) I_D=F(V_{DS}) ID​=F(VDS​)特性4、MOSFET放大器5、输入和输出电压6、电压增益7、总结1、概述 在前面的文章中,我们已经…

表单自定义校验获取的value为undefined(element ui)

<el-form :model"form" :rules"rules"><el-form-item label"年龄" prop"age"><el-input v-model.number"form.age"></el-input></el-form-item> </el-form> export default {data() {…