BPMN 2.0 -- How to represent a relational DB table in BPMN 2.0 format - bpmn

I am relatively new to BPMN 2.0 and dont carry much knowledge around the same. Can any of you help me in understanding that how to represent a relational database table in BPMN 2.0 format.
For example their is a master employee and employee salary table,how can i represent them in BPMN 2.0 format.
Regards
Manish

If you are aiming to implement the Relational model of a database, your choice is not the Business Process Model and Notation, but for instance UML. Even Camunda, a provider of BPMN-tools, uses UML for describing their internal database, see their documentation.
Disclosure: I am not affiliated with Camunda, I just use their products a lot.

Related

What is the difference between an ORM and an ORDBMS?

They seem very similar to me. I don't understand the difference Maybe a programming example for ORDBMS?
An ORM is just translation layer between objects from a programming language and relations in a relational database. It is not an RDBMS, nothing to manage a database here, just a translation / mapping layer. Read the tag info of orm.
An ORDBMS is an RDBMS with object-oriented features. This one actually manages your database. I have written more at your preceding question.
As mentioned before, those two are very different in nature.

Convert HL7 RIM to SQL Table Structure

Am I looking at this RIM thing wrong? Does anyone know where I can find the HL7 RIM model as a sql table structure? I've looked through all the files in http://www.hl7.org/implement/standards/rim.cfm and cannot find one that would easily lend itself. It seems like this should be easy?
RIM based content is typically encoded as XML documents. Rather than trying to shred it out into a normalized relational schema you may get better results by storing the whole XML document in a single database field and then query it using XQuery. All the major commercial relational databases have pretty good support for this now.
HL7 v3 RIM is the base model for all v3 standards, is not a persistence model. HL7 v3 is a family of standards, including messaging and clinical document specification for different domains.
Of course you can represent the HL7 RIM in a SQL schema, since a mapping can be done, but is not the purpose of the HL7.
If you need to create a clinical data repository, start with your requirements, design a schema, then map RIM into your schema, but don't use the RIM as your database schema.
There is no such thing and this is for purpose. By trying to convert RIM to the database you may end up significantly de-normalizing your initial structure. You may look at openEHR (and HL7 FHIR) instead.
(You may find "Unofficial Developer's Guide to HL7v3 Basics" helpful to understand the RIM. The book is available at - hl7basics.shamilpublishing.com)

Visual Representation Of Database Schema

is there some standard about how to graphically represent database schemas? Is UML a defacto standard for this?
Also, is there some free tool that can help me convert an sql file (basically bunch of CREATE TABLE queries) into some nice graph (UML or not UML)?
You are looking for ERD:
http://en.wikipedia.org/wiki/Entity-relationship_model
As for a tool, visual Paradigm UML can help you model (with both UML and ERD). The community edition allows you to create ERD diagrams.
UML? No. Entity/relationship diagrams are de riguer for databases.
MySQL Workbench does a nice job.

Is Dataset an ORM?

I am a little bit confused about Dataset compared to ORM (NHibernate or Spring.Net). From my understanding the ORM sits between the application layer and the database layer. It will generate the SQL commands for the application layer. Is this the same as what Dataset does? What is the difference between the Dataset and ORM? What are the advantages and disadvantages for these two methods? Hope the experts in here can explain something.
Thanks,
Fakhrul
There is a BIG difference between them, first of all about the programming model they represent:
The Dataset is based on a Table Model
An ORM (without specify a particular product of framework) is based and tends to a Domain Model.
There is another kind of tool which could be used in data scenario, this kind of tool is a Data Mapper (eg. iBatis.NET)
As others answers before me, I think it's important to view what Microsoft says about Dataset and better what Wikipedia says about ORM, but I think (this was for me at beginning) it's more to understand the difference between them in terms of model. Understanding that will not only clarify the choises behind but better, will do too easy to approach and understand a tool itself.
As little explanation it's possible to say:
Table Model
is a model which tends to represent tabular data in a memory structure as close as possible (and even as needed). So it's easy to find implementations which implements concepts as Table, Columns, Relations in fact the model is concetrate on the table structure, so object orientation is based on that not on data itself. This model could has its own advantages, but in some case could be heavy to manage and difficult to apply concepts on contained data. As previous answers says, implementations like Dataset, let, or better, force you to prepare (even if with a tool) needed SQL instructions to perform actions over the data.
ORM
is a model which (as mendelt says before me..) where Objects are mapped directly to database objects, principally Tables and Views (even if it's possible to map even functions and procedures too). This is done in 2 ways generally, with a mapping file which describes the mapping, or with (in case of .NET or Java) code Attributes. This model is based on Objects which represents the data, so object orientation could be done on them as in normal programs, it's clear with more attention and caution in certain cases, but generally, when you are confident with ORM it could be a really powerfull tool! Even ORM could be heavy to manage if it's not managed and designed well, or better understood weel, so it's important to understand techniques, but I can say with my experience that ORM is a really powerfull tool. In ORM, the tool principally it's responsible to generate the SQL instructions needed as operations are done in code, and in more cases ORMs has a middle language (like HQL) to perform operations on Objects.
MAPPER
A mapper is a tool which doesn't makes things like an ORM, but, maps hand written SQL instructions to an Object Model. Thi kind of tool could be a better solution when it's needed to write by hand SQL instructions but It's wanted to designe an application Object model to represent data.
In this "model" objects are mapped to instruction and described in a mapping file (generally an Xml file as iBatis.Net or iBATIS (java) does). A mapper let you define granular rules in SQL instructions. In this scenario could be easy to find some ORM concepts as for example session management.
ORM and Mappers let to apply some very interesting Design Patterns, which could be not so easy to apply in the same way to a Table Model and in this case to a Dataset.
First of all excuse me for this long answer and about my poor english, but for me, an answer like this makes me in past to understand well the difference between this models and then between implementations.
the Dataset class is definitly not an ORM; an ORM maps relational data with an object oriented representation.
It can be regarded as some kind of 'unit of work' though, since it keeps track of the rows that have to be deleted/updated/inserted.
ADO.NET DataSet =
http://msdn.microsoft.com/en-us/library/zb0sdh0b(VS.80).aspx
ORM =
http://en.wikipedia.org/wiki/Object-relational_mapping
(Example Developer Express
XPO,DataObjects.NET)
ORM is based on mapping between objects and tables. Not the case for this dataset. Dataset is itself in a way directly to the table. ORM is based on a minimum of SQL script. But enough to use the dataset you write SQL clause. Dataset in this case is not an ORM.
Look at dataset and ORM.
No, Datasets are not ORM's. They may look like orms because datasets map tables to objects just like ORM's the main difference lies in what objects they map to.
Datasets have their own table and row object types that closely resemble the structure of the database. You're rebuilding part of the database's relational model in objects. Restricting these objects into something resembling a relational database gets around some of the problems inherent in mapping a database to an object model.
An ORM maps the tables and rows from the database into your own object model. The structure of your object model can be optimized for your application instead of resembling a relational database. The ORM takes care of the difficulties in transforming a relational model into an object model.
DataSet is a DTO, a data transfer object. DataSet itself can't do anything. You can use a DataAdapter (of the provider used) to produce sql or call predefined queries, though it still isn't doing anything.

OO program and SQL database

When programming an OO program using a SQL database back-end, do objects' attributes correspond with the rows in the tables? Or more than that? I don't quite understand how objects' attributes relate to data in tables.
Thanks for your help.
It really depends which orm you are using, however, in general the idea is:
class = > table
instance => row
attribute => column
ennuikiller mentioned some things, but an object may also be store over multiple rows and tables because there may be no correlation because of how data is modelled and normalised.
It's not straightforward... some reading Object-relational impedance mismatch (Wikipedia)
Read a little about Object-relational_mapping
a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to create their own ORM tools.
For Java or .NET, the hibernate project provides relational persistence.
Hibernate is a powerful, high performance object/relational persistence and query service. Hibernate lets you develop persistent classes following object-oriented idiom - including association, inheritance, polymorphism, composition, and collections. Hibernate allows you to express queries in its own portable SQL extension (HQL), as well as in native SQL, or with an object-oriented Criteria and Example API.
Unlike many other persistence solutions, Hibernate does not hide the power of SQL from you and guarantees that your investment in relational technology and knowledge is as valid as always.
My answer is no.
The goal of OO design is to optimize for the ease of specifying program behavior.
The goal of database design is to optimise for ease of data storage/retrieval. These goals are very different and can and will lead to very different decompositions of the problem domain.
It's possible to map one to the other, but then you will encounter the impedence mismatch, as others have mentioned, which is basically the technical consequence of the different goals of the two models.
Jorg mentioned the "Vietnam of computer science" article in the comments, which is worth a read. You can skip the historical stuff on Vietnam, if you're short on time.
You need to be more specific, and possibly do a little bit of research on what is available on your selected platform. While there are ways of mapping various Object Oriented languages onto databases, there is no "one-size fits all" approach.