Additional Data types on SQL DDL generation #44
Replies: 6 comments 3 replies
-
|
The last two commits (Jan 29 and a reference mode migration fix on Feb 25) dealt with this issue. I just haven't done a Marketplace push yet. I have other users who've been using it in the Pro version of the tool, so I'm comfortable with the change now. I haven't done the readme writeup for it yet. There were a surprising number of changes that were needed to make this work. NORMA did not support auto-generation on any datatype other than AutoCounterNumeric, so the notion of auto-generation in NORMA needed to be expanded. The SQL generated for this is also much different (default function instead of a sequence, etc.) So, along with adding UUID there were several other additions.
Anyway, it won't help you until I get it posted, so I'll try to get to that in the next couple of days. |
Beta Was this translation helpful? Give feedback.
-
|
Ok, cool. I will keep an eye out for the update. I appreciate all the work everyone is doing on this. It has become one of my favorite design tools so I recommend it all the time. |
Beta Was this translation helpful? Give feedback.
-
|
This has been posted now. If you have automatic updates enabled you can restart Visual Studio to update the version, which should move from 1.3047.5 to 1.3048.0. |
Beta Was this translation helpful? Give feedback.
-
|
Cool, so you've probably been in the ORM camp longer than I have. My education started when I was recruited to write what is now NORMA in the 2004 timeframe, but it was a year after that before we started the project. I might have you beat on working with object/relational mapping systems (which I always call O/RM since the original ORM predated O/RM systems by 3 decades) after working on the unreleased ObjectSpaces project for Microsoft. ObjectSpaces was a relational mapping system that predated Entity Framework by several years (around 5). In fact, the 'virtual tree grid' control used for some large sets in VS (like code coverage results) and a ton of controls in NORMA was written as a skunk works project while I was waiting for an implementable spec for the ObjectSpaces front end. AFAIK it is the only part of the project that left Redmond, and it is still in use 2 decades later and 10 versions of VS later. From an ORM modeler's perspective, going "code-first" is possibly missing the mark even more than "database-first". At least with a database there is a reasonable logical representation of the system. With code you're already at a physical representation, then marking it up to get a logical representation. But none of this is close to the conceptual model of the domain because you're trying to model concepts with a fixed structure. There is a big chunk of NORMA that isn't open source. I'm working on getting the Pro version more publicly available but don't really have the bandwidth for broad release at this point. One of the main things I've been concentrating on is a framework that not only covers the database, but also a client-side definition of the model with a strong rules engine. The client framework reads data defined in terms of the model and produces json change sets that can be incrementally applied on the server. The backend is a generated database, O/RM layer, and I/O layer that communicates with the O/RM layer and produces/consumes json from the client. Basically, my apps use one write method than can write any set of legal model changes to the database (I don't care if the request changes 1 row or 10,000), then a few lines of code to interface with the web app and call the generated code. Basically, there is zero chance you can touch any of this with a code-centric approach because you simply don't have sufficient information about your domain. I have a data-bound client layer and generated interfaces (for TypeScript), a generated model (sufficient for all reading, writing, rules and change management), generated JSON production, generated I/O layer, generated O/RM and generated database. We're also working on automatically reading/writing XML (with a schema produced from the same model, of course) into the system. Basically, everything behind the UI is generated directly off the ORM model, and it all works seamlessly together because it uses the model as the primary development artifact. There is no way you coordinate half a dozen (and growing) representations of the same data with code markup. Basically, I think in a lot of ways the ORM community and tools were heavily distracted by being able to create the perfect database. The ultimate database is obviously a great thing to have, but in reality DDL is only a fraction of the code in any real development project (well under 5% in my experience). The goal is to read and write data in a form that is easily recognized to the conceptual model. If you can accomplish that then how the data is stored becomes less and less central to the system. I want 95% generated, not 5%. Do I have an EF stack I can offer you at this point? Unfortunately, no. The first project I actually built this stack for wanted PHP, so the current implementation is built on Doctrine and PHP. A .NET Core implementation is moving up the list though. I'd like to be able to simply plug in the backend language/framework, database choice (including relational or not) and front-end binding layer (Angular, React, etc.). Right now though the stack is PHP/Doctrine for the data access with an Angular application (pick your web server). The Doctrine markup can produce the databases (and covers things NORMA doesn't, like sqlite), but the database isn't as constrained as the NORMA generators, which add a number of checks that can't be mapped in Doctrine. Another issue is that that SQL Server still doesn't do deferred constraints. This is a major problem with O/RM implementations (not just mine) because it is very easy to make object changes that are 100% correct at the end of a transaction but violate row constraints. I'm usually on Postgres, but have done Oracle also, and prototypes on sqlite and sql server. mcurland at live dot com if you're interested in talking more. |
Beta Was this translation helpful? Give feedback.
-
|
I would love to see the feature added to allow for custom supplied data types, such as ObjectID, to be set to a specific type. This would make the process much more flexible and allow us to better tailor the database to our specific needs. |
Beta Was this translation helpful? Give feedback.
-
|
I will close this discussion with the latest release fixing the issue of GUID data types (UUID). Thanks for all your work on this before I even brought it up. Will be willing to continue to provide feedback as I find things or issues. Appreciate you and anyone else that contributed to this really cool tool. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Jut a general question:
I was looking to generate a SQL database and noticed I could not select the GUID data type (UNIQUEIDENTIFIER) with any option I could find. Is there a way to do this? Anybody open to adding the feature so that ObjectID or some other datatype could be set to be a custom supplied type?
Beta Was this translation helpful? Give feedback.
All reactions