IntentArchitect / Support

A repository dedicated to handling issues and support queries
3 stars 0 forks source link

Existing SQL Server Database #98

Open digitalalchemist23 opened 1 month ago

digitalalchemist23 commented 1 month ago

Ask a question

what will be the steps in creating a new application if i have an existing database? thank you

joelsteventurner commented 1 month ago

Hi @digitalalchemist23

Typically, you would model your domain in the domain designer which would set up everything for you. You would want to do database first there are several options.

If you are using Entity Framework and SQL Server (Or can get you DB Schema into a SQL Server database (if you are using Postgres for example))

Then you can use our Intent.SqlServerImporter module to reverse engineer the model. Simply install this module and import the Domain Model in the domain designer. Full documentation here.

If this is not an option, again assuming you are using our Entity Framework module, you can model out your database in the Domain Designer, using the various SQL Stereotypes like Table, Schema, Column etc. to capture any impedance between your model and DB. For example, if you have a SQL Table named 'tbl_customers' and you want your Domain Model to be called Customer simply add a Table stereotype to the Customer Entity and configure the table name to be tbl_customer

Documentation on EF modeling in the domain designer here.

We also have JSON importer which can be used to import model from JSON files which could be used and scripting infrastructure which could also be used to create a custom import if required.

Let me know if you need more assistance around this.

digitalalchemist23 commented 1 month ago

Thank you Joel, I will check the documentation. Another question: does Intent have a module for multi-tenant application?

On Sat, Oct 5, 2024 at 4:53 PM Joel Turner @.***> wrote:

Hi @digitalalchemist23 https://github.com/digitalalchemist23

Typically, you would model your domain in the domain designer which would set up everything for you. You would want to do database first there are several options.

If you are using Entity Framework and SQL Server (Or can get you DB Schema into a SQL Server database (if you are using Postgres for example))

Then you can use our Intent.SqlServerImporter module to reverse engineer the model. Simply install this module and import the Domain Model in the domain designer. Full documentation here https://github.com/IntentArchitect/Intent.Modules.NET/blob/master/Modules/Intent.Modules.SqlServerImporter/README.md .

If this is not an option, again assuming you are using our Entity Framework module, you can model out your database in the Domain Designer, using the various SQL Stereotypes like Table, Schema, Column etc. to capture any impedance between your model and DB. For example, if you have a SQL Table named 'tbl_customers' and you want your Domain Model to be called Customer simply add a Table stereotype to the Customer Entity and configure the table name to be tbl_customer

Documentation on EF modeling in the domain designer here https://github.com/IntentArchitect/Intent.Modules.NET/blob/master/Modules/Intent.Modules.EntityFrameworkCore/README.md .

We also have JSON importer which can be used to import model from JSON files which could be used and scripting infrastructure which could also be used to create a custom import if required.

Let me know if you need more assistance around this.

— Reply to this email directly, view it on GitHub https://github.com/IntentArchitect/Support/issues/98#issuecomment-2394986334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVPRAUL6NI6HMHWLLAYBLDZZ6SKLAVCNFSM6AAAAABPNESK76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUHE4DMMZTGQ . You are receiving this because you were mentioned.Message ID: @.***>

joelsteventurner commented 1 month ago

My pleasure, we do have a multi-tenancy module, specifically Intent.Modules.AspNetCore.MultiTenancy which does multi-tenancy for Asp.NET core applications using FinBuckle.

Documentation available here.

digitalalchemist23 commented 1 month ago

Awesome, thanks for the info!

On Sat, Oct 5, 2024 at 7:16 PM Joel Turner @.***> wrote:

My pleasure, we do have a multi-tenancy module, specifically Intent.Modules.AspNetCore.MultiTenancy which does multi-tenancy for Asp.NET core applications using FinBuckle.

Documentation available here https://github.com/IntentArchitect/Intent.Modules.NET/blob/master/Modules/Intent.Modules.AspNetCore.MultiTenancy/README.md .

— Reply to this email directly, view it on GitHub https://github.com/IntentArchitect/Support/issues/98#issuecomment-2395022816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVPRAWFCBQY2MP2P6WSNFLZZ7DABAVCNFSM6AAAAABPNESK76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGAZDEOBRGY . You are receiving this because you were mentioned.Message ID: @.***>

RWengDVT commented 1 month ago

@joelsteventurner do you have one for Oracle DB?

joelsteventurner commented 1 month ago

Hi @RWengDVT

We don't currently have an Oracle version, it is on our product back log as a longer term goal.

It should be possible to export the Oracle Schema and import into an SQL DB, especially if you limit the export to tables, indexes and possibly stored procedures. I see ChatGPT has several suggestions around how one could achieve this.