I am not able to get a clear complete understanding regarding the role of transactions in databases. I know operations clubbed in a transactions will be executed together and then either committed or …
Tag: rdbms
Why does the table randomly reorganize the rows?
I have the following table DBName Server Status UpdateTime DB1 server1 NULL 5/4/2019 DB1 server1 NULL NULL DB2 server2 NULL 6/4/2019 DB2 server2 NULL 6/4/2019 DB3 server2 NULL NULL …
Will the constraints remain after Importing table from RDBMS to HIVE with sqoop?
When we use sqoop import to transfer an RDBMS table to HIVE, will the constraints of the table such as primary key remain ? i.e. will the column of the table which is the primary key remain as …
Set based query to replace loop to populate all month end dates from given date for all records
I have a table that stores patient lab test results. There can be results from multiple tests like Albumin, Potassium, Phosphorus etc. First reading for each patient from each of these categories is …
Covert a duplicate Row value into column using pivot table
Here is my stored procedure query to fetch data in first table. I have following Data in a temp table. I want Name 1, Name 2, Name 3 as column and their value against the respective item.Data in table is dynamic.There can be any number of Items and any number of Name. For every Name and Item their is a
Which is faster in sql: searching for a table, or searching for data in table? [closed]
Say there are 1,000 tables in a database, and each table has 1,000 rows. When I search for single table from these 1,000 tables, is the search time same as that required to search for data within one …
SQL one to one relationship vs. single table
Consider a data structure such as the below where the user has a small number of fixed settings. User UserSettings Is it considered correct to move the user’s settings into a separate table, thereby creating a one-to-one relationship with the users table? Does this offer any real advantage over storing it in the same row as the user (the obvious
Storing a huge amount of points(x,y,z) in a relational database
I need to store a very simple data structure on disk – the Point. It’s fields are just: Moment – 64-bit integer, representing a time with high precision. EventType – 32-bit integer, reference to another object. Value – 64-bit floating point number. Requirements: The pair of (Moment + EventType) is unique identifier of the Point, so I suspect it to
How to think in SQL?
How do I stop thinking every query in terms of cursors, procedures and functions and start using SQL as it should be? Do we make the transition to thinking in SQL just by practise or is there any …
Drop all tables command
What is the command to drop all tables in SQLite? Similarly I’d like to drop all indexes. Answer