当前位置:首页 » 操作系统 » uml数据库

uml数据库

发布时间: 2023-03-07 13:53:27

⑴ UML是什么,包括哪些内容

解释:
1、 UML -----The Unified Modeling Language is a standard language for writing software blueprints.The UML may be used to visualize, specify, construct, and document the artifacts of a software-intensive system.
2、 Stereotype-----A stereotype is an extension of the vocabulary of the UML, allowing you to create new kinds of building blocks similar to existing ones but specific to your problem.
3、 Tagged value-------A taffed value is a property of a stereotype, allowing you to create new information in an element bearing that stereotype.
4、 Component--------A component is a replaceable part of a system that conforms to and provides the realization of a set of interfaces.
5、 Message-----A message is the specification of a communication among objects that conveys information with the expectation that activity will ensure
6、 Note-----A note is a graphical symbol for rendering constraints or comments attached to an element or a collection of elements.
7、 Constraints------A constraint is a textual specification of the semantics of a UML element, allowing you to add new rules or to midify existing ones.
8、 Interaction-----An interaction is a behavior that comprises a set of messages exchanged among objects in a set of roles within a context to accomplish a purpose.
9、 Action----An action is an executable computation that results in a change in state of the model or the return of a value.

简答
1, UML中描述软件体系结构的五种视图及其内容?architecture view
@The use case view of a system encompasses the use cases that describe the behavior of the system as seen by its end users,analysts,and testers.
@The design view of a system encompasses the classes,interfaces,and collaorations that from the vocabulary of the problem and its solution.
@The interaction view of a system shows the flow of control among its various parts,including possible concurrency and synchronization mechanisems.
@The implementation view of a system encompasses the artifacts that are used to assemble and release the physical system.
@The deployment view of a system encompasses the nodes that form the system`s hardware topology on which the system executes.
2, 建模的四项基本原则?principles of modeling
*The choice of what models to create has a profound influence on how a problem is attached and how a solution is shaped.
*Every model may be expressed at different levels of precision.
*The best models are connected to reality.
*No single model or view is sufficient.Every nontrivial system is best approached through a small set of nearly independent models with multipe viewpoints.
3,如何建模系统的接缝?modeling the seams in a system
To model the seams in a system:
!!Within the collection of classes and components in your system,draw a line around those that tend to be tightly coupled relative to other sets of classes and components.
!!Refine your grouping by considering the impact of change,
. Classes or components that tend to change together should be grouped together as collaborations.
!!Consider the operations and the signals that cross these boundaries, from instances of one set of classes or components to instances of other sets of classes and components.
!!Package logically related sets of these poerations and signals as interfaces.
!!For each such collabotation in your system,identify the interfaces it requires from(imports) and those it provides to others(exports).You model the importing of interfaces by dependency relationships,and you model the exporting of interfaces by realization relationships.
!!For each such interface in your system,document its dynamics by using pre-and postcongitions for each operation, and use cases and state machines for the interfaces as a whole.
4.如何建模系统的需求?modeling the requirements of a system
To model the requirements of a system:
//Establish the context of the system by identifying the actors that surround it;
//For each actor,consider the behavior that each expects or requires the system to privide;
//Name common behaviors as use cases.
//Factor common behavior into new use cases that are used by others;factor variant behavior into new use cases that extend more main line flows.
//Model these use cases,actors,and their relationships in a use case diagram;
//Adorn these use cases with notes or constraints that assert nonfunctional;you may have to attach some of these to the whole system.
5如何利用制品图建模物理数据库?modeling a physical database by artifact diagrams
1. For simple CRUD(create, read, update,delete) operations,implement them with standard SQL or ODBC calls;
2. For more-complex behavior(such as business rules), map them to triggers or stored proceres.
Guidelines:
&Identify the classes in your model that represent your logical database schema.
&Select a strategy for mapping these classes to tables.You will also want to consider the physical distribution or your databases.Your mapping strategy will be affected by the location in which you want yout data to live on your deployed system.
&To visualize,specify,construct,and document your mapping,create an artifact diagram that contains artifacts stereotyped as tables.
&Where possible,use tools to help you transform your logical design into a physical design.
6如何对注释建模?modeling comments
*Put your comments as text in a note and place it adjacent to the element to which it refers. You can show a more explicit relationship by connecting a note to its elements using a dependency relationship.
*Remember that you can hide or make visible the elements of your model as you see fit.This means that you don`t have to which it is attached are visible.Rather,expose your comments in your diagram only insofar as you need to communicate that information in that context.
*If your comment is lengthy or involes something richer than plain text,consider putting your comment in an external document and linking or embedding that document in a note attached to your model.
*As your model evolves,keep those comments that record significant decisions that cannot be inferred from the model itself,and-unless they are of historic interest-discardthe others.
7,如何建模逻辑数据库模式?modeling a logical database schema
The UML`s class diagrams are a superset of entity-relationship(E-R) diagrams, a common modeling tool for logical database design.
To model a schema:
$Identify those classes in your model whose state must transcend the lifetime of their applications.
$Create a class diagram that contains these classes.You can difine your own set of stereotypes and tagged values to address database-specific details.
$Expand the structural details of these classes.In general,this means spencifying the details of their attributes and focusing on the associations and their multiplicities that relate these classes.
$Watch for common patterns that complicate physical database design,such as cyclic association and one-to-one associations.Where necessary,create intermediate abstractions to simplify your logical structure.
$Consider also the behavior of these classes by expanding operations that are important for data access and data integrity.In general,to provide a better sepatration of concerns,business rules concerned with the manipulation of sets of these objects should be encapsulated in a layer above these persistent classes.
$Where possible,use tools to help you transform your logical design into a physical design.
8,给出顺序图的步骤?modeling flows of control by time ordering
To model a flow of control by time dodering:
+Set the context for the interaction,whether it is a system, subsystems,operations,or class,or one scenario of a use case or collabotation;
+Set the stage for the interantion by identifying which objects play a role in the interaction.Lay then out on the sequence diagram from left to right,placing the more important objects to the left and their neighboring objects to the right;
+Set the lifeline for each object.In most cases,objects will persist through the entire interaction. For those objects that are created and destroyed ring the interaction ,set their lifelines,as appropritate,and explicitly indicate their birth and death with appropriately stereotyped messages;
+Starting with the message that initiates this interaction, lay out each subsequent message from top to bottom between the lifelines,showing each message`s properties, as necessary to explain the semantics of the interaction;
+If you need to visualize the nesting of messages or the points in time when actual computation is taking place, adorn each object`s lifeline with its focus of control;
+If you need to specify this flow of control more formally, attach pre-and postconditions to each message.
9,如何利用制品图建模可执行程序的发布?modeling an executable release
To model an executable release:
#Identify the set of artifacts you`d like to model.Typically,this will involve some or all the artifacts that live on one node,or the distribution of these sets of artifacts across all the nodes in the system.
#Consider the stereotype of each artifact in this set.For most systems you`ll find a small number of different kinds of artifacts.You can use the UNL`s extensibility mechanisms to provide visual cues for these stereotypes.
#For each artifact in this set, consider its relationship to its neighbors.Most often,this will involve interfaces that are exported by certain artifacts and then imported by others.If you want to expose the seams in your system,model these interfaces explicity.If you want your model at a higher level of abstraction, elide these relationships by showing only dependencies among the artifacts.

⑵ 怎么根据数据库来画uml类图

可以把uml类图来表示数据库表,持久类属性当字段使用,类方法可以不使用,表示出数据关系就可以了,应该分为持久类和操作类,操作类和你使用的开发框架有关,重点是类方法,uml当设计辅助和文档是合适的,开发用它不实用,这是个人体会,不一定对。

⑶ UML在数据库中是什么意思

uml(统一建模语言),是一种建模的图形化工具,并不是只有数据库有,它是独立的建模工具,网上可以搜一下,看看详细的解释。

⑷ 使用uml进行数据建模时,用什么来建模数据表中的主键

最近在进行UML学习过程中,突然忘记了大学时关于数据库理论中概念模型、逻辑模型、物理模型之间的区别。随机复习上网并复习,并在此记录一下,数据库建模是对现实世界进行分析、抽象、并从中找出内在联系,进而确定数据库的结构。

1、概念模型:就是从现实世界到信息世界的第一层抽象,确定领域实体属性关系等,使用E-R图表示,E-R图主要是由实体、属性和联系三个要素构成的。

2、逻辑模型:是将概念模型转化为具体的数据模型的过程,即按照概念结构设计阶段建立的基本E-R图,按选定的管理系统软件支持的数据模型(层次、网状、关系、面向对象),转换成相应的逻辑模型。这种转换要符合关系数据模型的原则。目前最流行就是关系模型(也就是对应的关系数据库)

E-R图向关系模型的转换是要解决如何将实体和实体间的联系转换为关系,并确定这些关系的属性和码。这种转换一般按下面的原则进行:

(1)一个实体转换为一个关系,实体的属性就是关系的属性,实体的码就是关系的码。

(2)一个联系也转换为一个关系,联系的属性及联系所连接的实体的码都转换为关系的属性,但是关系的码会根据联系的类型变化,如果是:

1:1联系,两端实体的码都成为关系的候选码。

1:n联系,n端实体的码成为关系的码。

m:n联系,两端实体码的组合成为关系的码。

3、物理模型就是根据逻辑模型对应到具体的数据模型的机器实现。物理模型是对真实数据库的描述。如关系数据库中的一些对象为表、视图、字段、数据类型、长度、主键、外键、索引、约束、是否可为空、默认值。

⑸ XML和UML的区别是什么

XML和UML两者并没什么可比性。

XML:可扩展标记语言(ExtensibleMarkupLanguage,XML),用于标记电子文件使其具有结构性的标记语言,可以用来标记数据、定义数据类型,是一种允许用户对自己的标记语言进行定义的源语言。

UML:UnifiedModelingLanguage(UML)又称统一建模语言或标准建模语言,是始于1997年一个OMG标准,它是一个支持模型化和软件系统开发的图形化语言,为软件开发的所有阶段提供模型化和可视化支持,包括由需求分析到规格,到构造和配置。

简单的说,XML是描述数据的,可以看做是数据库的文字表达;

UML是软件开发建模用的,是编写代码前的项目总体设计和规划。

热点内容
cf北京服务器ip 发布:2025-08-21 16:51:13 浏览:725
数据库字段值为空的数据 发布:2025-08-21 16:45:14 浏览:572
php项目视频 发布:2025-08-21 16:34:33 浏览:194
叉叉脚本激活码 发布:2025-08-21 16:34:32 浏览:250
清理ie缓存快捷键 发布:2025-08-21 16:07:30 浏览:443
算法规避 发布:2025-08-21 15:56:48 浏览:895
ip服务器是机器吗 发布:2025-08-21 15:40:34 浏览:770
wpf读数据库存储的时间 发布:2025-08-21 15:30:59 浏览:441
存储过程是先编译好的吗 发布:2025-08-21 15:25:07 浏览:889
java高并发编程详解 发布:2025-08-21 15:11:27 浏览:550