New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CREATE TABLE with TABLESPACE #967
Comments
Is this for SQL Server or Oracle? |
Only oracle has tablespace?My db is oracle |
It's not supported yet. I'll leave this open as a reminder for a new feature for Oracle. You may use the following workaround in the meantime: Execute.Sql("ALTER DATABASE DEFAULT TABLESPACE ZL9BASEITEM");
Create.Table("TEST_XML")
.WithColumn("input").AsString(2000).Nullable()
.WithColumn("data").AsXml().Nullable(); I found this on this web-site: https://www.techonthenet.com/oracle/tablespaces/set_default.php It's correct, that Oracle interprets the schema part of a fully qualified table name as user name. I guess that it would be nice to have an oracle extension that would allow writing something like: Create.Table("TEST_XML")
.InTableSpace("ZL9BASEITEM")
.WithColumn("input").AsString(2000).Nullable()
.WithColumn("data").AsXml().Nullable(); This would be an Oracle-only extension. |
Your guess perfect.My now solution is excute sql |
Discussed in FluentMigrator gitter channel today with @hayer Notes:
|
Oracle docs for CREATE TABLESPACE. Oracle also, from version 12.2, has a concept of tablespace sets for sharding; I think these can be ignored in this iteration. PostgreSQL docs for CREATE TABLESPACE. MySQL docs for CREATE TABLESPACE. How should the difference between |
I think it's just syntactic differences. I can try to explain what I mean next week when I have off Wednesday through Friday. |
Reopening it to increase visibility for this feature. EDIT: @CQJonnyLin you can unsubscribe if you're not interested in this issue anymore. |
Still interested. @jzabroski, did you have an idea for how to make the table-parts more extensible? |
Yes. I think we need a new primitive FM element for TableSpace, apart from Table. You can use the Table Generator syntax as a guideline for creating a TableSpace. I think this is the hardest part and most amount of work. Plugging the TableSpace then into the Table becomes a lot easier: you can either support doing it by name, or by a reference to the generator. @fubar-coder might have opinions here on what would be best. He wants to move to fully code generating a lot of these fluent extensions in the future. So, the way I would break down a project plan would be: Milestone 1: Creating tablespaces, deleting tablespaces, auto-reversing them
Phase 2: Referencing a
|
|
Added tags to make it clearer in generating release notes which databases a feature targets. Effectively, this is a baby step to cleaning up / defining outcome for #1032 Separately, I found this issue on Firebird Tracker, with a funny comment I had to share:
Snowflake has the concept of micro-partitions to facilitate eliminating static partitions. However, they also have the This sort of "data plane extensibility" architecture seems to be the future, for many reasons. Because of how Snowflake "joins clusters together", the need for static partitioning goes away: it's replaced by creating data marts for individual customers. Queries across customers are simply joins on all the customer clusters. At least, I think that is how it works - need to play around with it to make sure my understanding is correct. @hayer @fubar-coder if the above is true of Snowflake and Snowflake is truly "next gen datawarehouse" architecture, then I think we can add the TableSpace concept but ideally as part of a separate assembly. The broad point here is that in 10-20 years, every database will be in the cloud, and we literally won't know about filegroups/table-spaces in any meaningful sense we're discussing them here. |
In 10-20 years, yes completely agree. In the mean time... 😉 |
Yes, I thought about it over the weekend. This feature will enable me to do some testing for a client who wanted to answer the question of what database technologies they should be using. Right now it is very painful to manage this stuff by hand. I'd love to be able to quantify a few things for them. I suspect the winner will be Azure SQL Hyperscale or Snowflake based on reading, but without my own numbers, hard to say. Plus, if you think about it, FluentMigrator is the most powerful tool for abstracting SQL DDL. There is nothing like it. It would be the ideal tool for writing database benchmarks and defining best practices. However, without tablespaces, we really are nowhere near being able to abstract SQL scenarios used by Hyperscalers. |
Can you tell me how to create table with tablespace.I thy create table with inschema,but schema is user.
Create.Table("TEST_XML").InSchema("ZL9BASEITEM") .WithColumn("input").AsString(2000).Nullable() .WithColumn("data").AsXml().Nullable();
I want to create table name is TEST_XML with tablespace name is ZL9BASEITEM.
The text was updated successfully, but these errors were encountered: