Does anyone know how to use LINQPad to find meta data, in particular list all many to many relationships, in CRM Dynamics?
Kind of like the equivalent to querying information_schema in SQL to get metadata about the database schema.
Related to Entity and attributes metadata you can use Entities
EntityMapSet
AttributeMapSet
Hope it helps
Related
where can I find the table relationship for Oracle HCM tables? Does it even exist? I can't find anything related to it.
Thanks.
Please refer the below link. Don't forget to change 22b to 22c and to 22d then 23a for regular quarterly updates.
https://docs.oracle.com/en/cloud/saas/human-resources/22b/oedmh/index.html
This guide contains the information about tables within Oracle HCM Cloud and their columns, primary keys, and indexes. The guide also includes the information about views within Oracle HCM Cloud along with the columns and queries associated with each view.
I'm not so good at both Linq and SQL. But I have worked more with SQL and less with LINQ. I've gone through many articles which favors LINQ. I don't want to go the SQL way (i.e. writing stored procedures and operating data etc.)
I want to start with LINQ for every operation related with data. Here are the reasons why I want to do this:
I want to have complete control of my database via application and not by writing stored procs (as I'm not so good at writing store procedure)
I want to create my project as an easy maintainability view
Want faster development
For that, I know that:
I need to add a dbml file, drag and drop tables into that
Use dbContext class, and so on
But I want to know, is there a way:
I can avoid creating dbml file and still be able to access the database?
Do I need to use Linq to Entities for the same?
Will it be a good way to avoid using dbml file? Since for every database changes I need to drop and drop tables every time
Also I've come across many posts where linqToSql is considered deprecated and not a .net future?
I have so many doubts, but I think that's obvious when starting with a new technology?
I found this useful article which is good for beginners:
[http://weblogs.asp.net/scottgu/archive/2010/08/03/using-ef-code-first-with-an-existing-database.aspx][1]
after doing some more research I came to conclusion that:
1)i can avoid creating dbml file and still be able to access database??
ANS Yes but instead of dbml now edmx files will be created.
2)Do I need to use Linq to Entities for the same?
ANS Yes you can go with linq to entities.
3)Will it be good way avoid using dbml file? since for every database changes I need to drop and drop tables every time
ANS it is not required to drop and create again the tables. their are options where you can update selected part of your database and you are not avoiding dbmls. it will created edmx file and that will almost similar to dbmls in many ways.
4) Also I've come across many posts where linqToSql is considered deprecated and not a .net future?
ANS yes in future development it will be depreciated. it supports only sql server as backend.
I hope I'm right. Please do tell me in case any other suggestions.
LINQ is a way to query and project collection of data. For example, you can use LINQ to query and shape data from a database or from an array. LINQ by it self has nothing to with the under lying database.
You use an ORM (Object Relational Mapper) technology to project data stored in tables of a database as collections of objects. Once you have the collection of objects, you can use LINQ to query them.
Now, you have many ORM technologies to select from, such as Entity Framework, NHibernate, Linq2Sql. If you don’t like to maintain a dbml file, have a look at code first approach offered by Entity Framework.
Then there are things called LINQ data providers. They would take a LINQ query, transform it to a SQL targeting a particular database, execute the query and get the results back as a set of objects. Many of the ORMs above has built in LINQ data providers as a part of them and would work behind the scene in fetching the data.
I would advise you to look up on some patterns such Repository and Unit of work for your data layer. When used correctly, these patterns will isolate your data access code from your applications upper layers. This will help you to change your data access technology is it becomes obsolete, without affecting the rest of the application.
LINQ is an awesome technology and you should definitely try it
I have composed the above answer based on my own experience and I am sure there are many SO users with better understanding of the above technologies than myself who may wish to add their own opinion
Good luck
Hi every one,
I have a requirement to get all the views and indexes from Oracle/PostgreSQL DB
Here I have written one query like below to get all views
SELECT * FROM INFORMATION_SCHEMA.VIEWS where table_schema = 'public'
But that is postgreSQL dependent query right. Because in Oracle, information_schema was implemented differently so i thought to write jpql query but i dont know how to write.
Could anybody please help me out!
Thanks & regards,
Sridhar Kosna.
It's not possible. JPQL is only able to query mapped entities. Not database tables. You'll need to use SQL, and if you need to support multiple databases, have one DAO per database and use the appropriate DAO based on the used database.
First of all I won't to say that I'm an expert in database handling, and less so in oracle. However right now I need to get better at it :)
I'm using nHibernate as orm, to my oracle database. It works ok, and is rather simple to use. However now I have run in to a problem that I don't know how to solve.
In the Database theres a kind of tree with the tables, views, indexes and such. At the end there are also a entry called "Other Users" in which there are some users with access to what I'm guessing is other tables. Now I would like to get data from one of those tables (I can read them manually in SQL Developer, so it's not a access problem or anything). Does anyone have any idea how I shall do that?
The account that you use in SQL Developer has at least read privilges to tables in another schema (owned by another user). You can access these tables by prefixing the table name with the schema name. In Hibernate you'll have to define the non-default-schema in the mapping.
How can i fetch data from multiple tables in a database (mysql) using hibernate...
Can any one help me out in this regard... a sample example will be of great help, if possible.
Thanks.
Uday.
You could possibly use some custom sql to pull from the two tables and then map the output of that to the entity in question.
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/querysql.html#querysql-creating