is there any way to update my sql 2008 db from model?
i maped model from db, and added some changes like associations and change fields name in some tables, can i update now db using my model?
Over by the solution explorer there is a model tree view. In there right click the model and there should be generate database from model.
Related
I connected the database in protege through Ontop Plugin and created Mapping from Ontop Mappings / Mapping Manager
Now I am creating a graph using that mapping from Ontop Mapping but I m not able to use database table values.
However, I created a database relation mapping graph through OWLViz.
OWLViz
I want to create a graph using table data using multiple inner join queries, but I don't know how to use ontop mapping for the same
SPARQL Query
Have to try to connect your DB with the Ontop plugin in protege?
You have to set Ontop Mapping IDs for creating a graph using SPARQL Query.
I've a Sybase database where I will make a LOT of changes, and I would like to make my changes (currently using PowerDesigner 16), save it as .SQL then generate a .SQL to migrate my initial database to the new database structure.
I don't care about the data, I just want to update the structure with this script.
Any idea how to create this script?
EDIT: It has nothing to do with the given "duplicate", the other ticket is speaking on how to export the sql for SP/... In my case I only want the difference between the two sql
If you don't have one, you can create a model from your initial database, with File > Reverse Engineer > Database.
Create a copy of this model with File > Save As (as type Archived PDM), say copy.apm.
Then modify the model as you wish.
Then use Database > Apply Model Changes to Database, using the option Using an archive model (select the above copy.apm), to generate the ALTER script.
Anybody looking for a program agnostic way of generating the DDL for a database could use the ddlgen program that comes with ASE
See http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc30191.1572/html/utilityguide/CHDBBGGC.htm
So to create the DDL of database pubs2, you could do something like
ddlgen -Usa -Ppassword123 -SSERVERNAME -TDB -Npubs2 -Ooutput_file.sql
I am using SSAS (Visual Studio 2010) to create a Decision Tree model. After the model has been created I can go to the Mining Model Prediction tab to "score" another data set against the model.
However, if I close the Mining Structure (or the solution) and open it again the "scoring" data set that I have connected to the model is gone and I have to repeat all the mapping again.
Is there is a way to save not only the Mining Structure but also the scoring data set?
Thank you.
Connect to a SQL database, then make a linked server to your SSAS OLAP server, then try this...
insert into myTempResults (columns....)
select columns.... from OPENQUERY(SSAS_OLAP_LINKED_SERVER, 'your mdx query').
you probably need to use FLATTENED in the expression that joins to the mining model
also take a look here for more info..
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/92d22b85-0c8c-4db2-a931-5188f7ad90dc/push-mdx-query-result-to-sql-table-with-in-caption-of-members?forum=sqlanalysisservices
I have a SQL Server view CyclesList on the table Cycle. Cycle table contains a few columns, and CyclesList view add some more data that can be computed on database level.
And now, I have a NHibernate mapping that points to CyclesList:
<class name="Cycle" table="CyclesList">
However, I would still like to work with Cycle class, and perform Create/Update operations , but I have to use stored procedure that will access Cycle table directly. Is there a way to achieve it in NHibernate? I would appriciate a sample mapping/links to resources with samples. Thanks
You find some information in the docs under "Native-Sql -> Custom SQL for create, update and delete". Basically, you need the "sql-insert", "sql-delete" and "sql-update" elements in the mapping file.
There is also an example on Ayendes blog.
Is there way to generate mysql schema from Yii model? In model i describe fields and relations. So it is enough to generate/update db structure.
Like symfony 2 command line:
php console/app doctrine:schema:update
No, in yii a models attributes are dynamic and come from the database. Any properties defined in the model are not attributes and therefore not in the database. For this reason if you add a new column to the post table the Post model will automatically have a magic property of that column.
What I think you're after are Migrations