Is column order in a table relevant for version control? [closed] - sql

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
A version control system compares the scripted definition of a table to the checked in state. So I guess many cvs will see column reordering of a table as a change.
Since tsql does not support to add a new column in the middle of a table and because in a relational DB the ordering should not matter, what are good practices for version control of table definitions if the column-order could change.
Sometimes you could need to redo a drop column in the middle of a table.

You should be storing scripts to setup your database in source control, not trying to have something reverse-engineer those scripts from the state of the database. Column-order then becomes a non-issue.
Specifically, I've seen two schemes that work well. In the first, each database schema update script is given a sequential number, and the database tracks which sequence number is the last applied. In the second, each database schema update script is given a UUID, and the database tracks all UUIDs that have been applied.
I would checkout the book Refactoring Databases for more details and examples of how to manage database changes.

Related

Dropping SQL tables [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I started to learn mySQL and a thought came to mind, I always see memes about databases and dropping tables, and how much of a problem such an even event can cause. My question is why would someone working in a software development environment ever decide to drop a table or even an entire scheme for that matter?
There can be various reasons, the main ones that come to mind:
As part of a roll back, you migrated something to the production environment which had bugs or shouldn't have been deployed yet. In order to get back to the previous state you'd need to drop the new table.
As part of clean up: legacy parts of the database which you no longer need, old table partitions with already archived data, user schemas of people no longer working for the company.

How to make choice between NoSQL and SQL? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
My question is that I want to learn nodejs/express, and make a super simple web project. It would be a database with tables : users, video_games, categories.
The web site will just show list of games (just an example).
In this typical case, what would be more efficient : Mysql or MongoDB (SQL or NoSql) ?
In this particular case were you want to show only list ( you don't want to actual store videos, doc, texy, etc..) SQL database will be a good choice.
Another reason to use SQL database is that your data is relational ( I am assuming that the data i.e video_games, category...etc are linked to users) were SQL database suits more.
You should go to nosql database only when there is to relationship between your data ( well this is not the only case, but for beginners were your aim is to simply pick the right database this suffice)

Databases: What is a HANA delta table? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is a delta table in SAP HANA databases?
From initial googling, I understood that these tables are some kind of intermediate tables to help data go from one state to another. But when exactly are they used? How are they different from "normal" tables in HANA databases?
Delta tables are a SAP-HANA specific technique to speed up write operations in the database.
Tables in SAP HANA usually use the column store, which is read-optimized. When writing data to a column-store table, this data is first stored in the delta-space for that table; this delta-space is periodically merged into the column store.
See e.g. https://cookbook.experiencesaphana.com/bw/operating-bw-on-hana/hana-database-administration/system-configuration/delta-merge/column-store/ for more details.
"Delta" is commonly used to mean "difference". A delta table would show only the differences between two tables, the records that were added/deleted/changed during the new process. It's a way to test new code to see what changes it caused.

powershell multi valued variables or sql table [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
i'm wanting to write data into memory only for a temp time. the format is essentially the same as an sql table with say 5 columns and 1,000 rows, give or take. simply i want to store this data and run queries against it to make calculations, sorting it, querying it to then produce chart reports and excel data.
I looked at custom psobjects and then sql and i can't see why i'd use custom psobjects over sql, what do you think?
I also couldn't see that adding multiple rows as such, using psobjects was as straight forward as adding another row in sql.
thanks
steve
I guess it depends on what you're more comfortable with, but if you're going to do it in Powershell then using PS custom objects seems like a logical choice since the cmdlets were designed to work with those.

Need a query to get a list of used and unused tables [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I gave a list of tables from our schema in a text file to my boss asking him that we need NOT back up all these tables. Now he is asking me to write a query to return the rest of the tables which REQUIRE BACK UP.
He gave me the hint that I will have to use USER_TABS and DIFF in my query.
Can anybody please help?
I am using ORACLE database.
What criteria defines a table that is "unused" and what criteria defines a table that "needs backup"? And what do you mean by "backup"?
If you're talking about backups, you'd normally be talking about physical backups in which case you back up the entire database (either a full backup or an incremental backup depending on how you've structured your backup strategy). You would not and could not include or exclude tables from a physical backup. You could potentially move the tables to a read-only tablespace which lets Oracle know that they don't need to be backed up again. But it doesn't sound like that's what you're after.