@manhnguyenv

Welcome to my blog!

MySql + Sql Server

January 30, 2018 23:06

SQL Hints: http://sqlhints.com

Red-Gate: https://www.red-gate.com/simple-talk/sql/

SQL Blog: http://sqlblog.com/

SQL Server Central: http://www.sqlservercentral.com/

MySQL Tutorial: http://www.mysqltutorial.org/

Recursive sum in tree structure
https://stackoverflow.com/questions/24394601/recursive-sum-in-tree-structure

Finding a string value in a SQL Server table
https://www.mssqltips.com/sqlservertip/1654/finding-a-string-value-in-a-sql-server-table/

Concatenating Row Values in Transact-SQL
https://www.red-gate.com/simple-talk/sql/t-sql-programming/concatenating-row-values-in-transact-sql/

Exploring Your SQL Server Databases with T-SQL
https://www.red-gate.com/simple-talk/sql/database-administration/exploring-your-sql-server-databases-with-t-sql/

Questions About CUBE, ROLLUP and GROUPING SETs That You Were Too Shy to Ask
https://www.red-gate.com/simple-talk/sql/t-sql-programming/questions-about-cube-rollup-and-grouping-sets-that-you-were-too-shy-to-ask/

Hierarchy Data SQL Server
https://docs.microsoft.com/en-us/sql/relational-databases/hierarchical-data-sql-server

Hierarchy SQL Server
https://stackoverflow.com/questions/764497/flatten-adjacency-list-hierarchy-to-a-list-of-all-paths

What are the options for storing hierarchical data in a relational database?
https://stackoverflow.com/questions/4048151/what-are-the-options-for-storing-hierarchical-data-in-a-relational-database

Focusing on the SQL-standard, hierarchical and temporal data, and open source software
http://troels.arvin.dk/db/rdbms/links/#hierarchical

HIERARCHICAL DATA IN SQL
https://blog.duncanworthy.me/sql/hierarchical-data-in-sql/
https://blog.duncanworthy.me/sql/hierarchical-data-pt1-adjacency-list/
https://blog.duncanworthy.me/sql/hierarchical-data-pt2-adjacency-recursive-queries/
https://blog.duncanworthy.me/sql/hierarchical-data-pt3-displaying-the-tree/

Modeling an Adjacency List Hierarchy with SQL Server 2017 Graph Database
http://sqlblog.com/blogs/john_paul_cook/archive/2017/06/20/modeling-an-adjacency-list-hierarchy-with-sql-server-2017-graph-database.aspx

The Performance of Traversing a SQL Hierarchy
https://www.red-gate.com/simple-talk/sql/performance/the-performance-of-traversing-a-sql-hierarchy/

Hierarchies on Steroids
http://www.sqlservercentral.com/articles/Hierarchy/94040/

Managing Hierarchical Data in MySQL
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

  • Joe Celko's Trees and Hierarchies in SQL for Smarties, Second Edition (The Morgan Kaufmann Series in Data Management Systems) 2nd Edition
  • Murach's MySQL, 2nd Edition 2nd Edition

Managing Hierarchical Data in MySQL Using the Adjacency List Model
http://www.mysqltutorial.org/mysql-adjacency-list-tree/

How to create a MySQL hierarchical recursive query
https://stackoverflow.com/questions/20215744/how-to-create-a-mysql-hierarchical-recursive-query

How to do the Recursive SELECT query in MySQL?
https://stackoverflow.com/questions/16513418/how-to-do-the-recursive-select-query-in-mysql

Recursive self joins
https://dba.stackexchange.com/questions/46127/recursive-self-joins

Hierarchical queries in MySQL
https://explainextended.com/2009/03/17/hierarchical-queries-in-mysql/

https://blogs.msdn.microsoft.com/mvpawardprogram/2012/06/25/hierarchies-convert-adjacency-list-to-nested-sets/
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/swinging-from-tree-to-tree-using-ctes-part-1-adjacency-to-nested-sets.aspx

HierarchyID Aggregate Functions in T-SQL
https://stackoverflow.com/questions/8901427/hierarchyid-aggregate-functions-in-t-sql

Entity Framework with MySql Stored Procedure

January 26, 2018 17:01

Entity Framework Code First and MySQL Stored Procedure

EF code-first approach expects that there is no logic in the database. That means no stored procedures and no database views. Because of that code-first approach doesn't provide any mechanism to generate such constructs automatically for you. How could it do that if it means generating logic?

You must create them yourselves in custom database initializer by manual executing creation scripts. I don't think that this custom SQL constructs can be handled by SQL migrations.

https://dev.mysql.com/

https://msdn.microsoft.com/en-us/library/dn468673(v=vs.113).aspx

https://dzone.com/articles/how-to-use-stored-procedure-with-entity-framework

http://www.entityframeworktutorial.net/stored-procedure-in-entity-framework.aspx

http://www.entityframeworktutorial.net/EntityFramework4.3/execute-stored-procedure-using-dbcontext.aspx

http://www.dotnetodyssey.com/2015/03/12/calling-stored-procedure-from-entity-framework-6-code-first/

https://sunali.com/2012/10/10/querying-mysql-using-entity-framework-and-mysql-stored-procedures/

https://dotnetthoughts.net/how-to-execute-a-stored-procedure-with-entity-framework-code-first/

https://www.mikesdotnetting.com/article/299/entity-framework-code-first-and-stored-procedures

https://www.red-gate.com/simple-talk/dotnet/net-framework/using-entity-framework-with-an-existing-database-data-access/

Categories

Recent posts