Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
165 views

I have an unlogged postgresql table holding three columns: 'key' of type varchar (255) hosting immutable sha256hex strings, 'created_at' of type timestamp without time zone and 'json' of type text. To ...
FreeBSDEnthousiast's user avatar
0 votes
1 answer
593 views

I have two tables I need to process. One table "Delivery" contains id of delivery as PK, id of storage to deliver as FK and id of storekeeper as FK. The other table "Delivery_log" ...
Atemyn's user avatar
  • 13
0 votes
1 answer
308 views

I am working on a Data warehouse project; I have a design to follow a part of it is shown in the screenshot below: The source table is as follows: As the source table shows, the entity column is not ...
Guissous Allaeddine's user avatar
-2 votes
1 answer
64 views

Say I have a JOB and COMPANY table and a third JOB_COMPANY table that relates the two in a many-to-many cardinality. I've learnt that it's an anti-pattern for the JOB_COMPANY to have a surrogate id PK....
ijverig's user avatar
  • 2,965
0 votes
1 answer
473 views

Could someone please help me understand how to populate the fact table with Surrogate keys from dimensions using SSIS? I load my dimension tables and assign for each a surrogate key. I want to add ...
chaneb's user avatar
  • 67
-1 votes
1 answer
57 views

What's the difference between a primary key and surrogate key if both are unique keys. The primary key acts same as a surrogate key in phpmyadmin. I have heard in a video that a surrogate key is ...
ZarakKahn's user avatar
1 vote
3 answers
7k views

Is there an easy/efficient way to create surrogate keys in Snowflake? Imagine this data set is going to be selected into in a table, during the insertion a battery_id column is added, which is the ...
JPlanken's user avatar
0 votes
1 answer
164 views

I have a table in SQL Server create table student ( id int, batch varchar(10), branch varchar(10), registerNumber varchar(30) ) I want my registerNumber to be of type batch+branch+id ...
pranav fokmare's user avatar
1 vote
1 answer
4k views

As the question says, I am running the dbt snapshot command and a few of my snapshots are not working because DBT is not recognizing the surrogate key id that I created. My snapshots are all built the ...
Gus's user avatar
  • 83
1 vote
1 answer
141 views

I have a problem to select the suitable table for the fact table. I have problem with following two tables OrderData Table : OrderID CustomerID OrderStatus OrderPurchaseAt OrderAprovedAt ...
user12760080's user avatar
0 votes
1 answer
194 views

I am rebuilding a big warehouse database which originally used natural keys, and now I want to switch to surrogate keys. Therefore, I am considering to split the database into a physical layer and a ...
askolotl's user avatar
  • 1,026
2 votes
1 answer
373 views

I have a use case where the apache flink process must integrate near real-time data streams (events) from multiple sources but due to lack of uniform keys in the different systems I need to use a ...
newTricks's user avatar
0 votes
1 answer
2k views

I have a project that I am working on where we have to create a registration system for a university in Access. One of the tables requires a surrogate key for one of the fields, and I am not sure how ...
brent_mb's user avatar
  • 337
2 votes
2 answers
2k views

I know that hive cannot create surrogate keys or is rather difficult. I want to understand how companies have implemented dimensional modeling in their warehouse. One way I can think of is leaving ...
smellerbee's user avatar
  • 1,913
0 votes
5 answers
554 views

Hi I'm a beginner at Databases, for this reason I want to ask you which atributes should I use as primary key to avoid mistakes: CREATE TABLE customer( name first_lastname street ...
apk's user avatar
  • 37
0 votes
0 answers
222 views

Im working on a project, where I need to insert various "Products", BUT depending on the type (fixed amount of 3, won't change customer said) the "ID" should start with a certain number (2,3,4) While ...
dognose's user avatar
  • 21k
0 votes
2 answers
105 views

Is there a best practice how to prevent showing autoincrement primary-key's (ID's) from database in the ViewModel, to not make them visible for end-user? I know there can be other unique fields on ...
Astrophage's user avatar
  • 1,449
1 vote
1 answer
109 views

I saw this comment: [applications] with the most data-related problems were those using natural keys. Source: Surrogate vs. natural/business keys I want more supporting evidence of this, as the ...
Dennis's user avatar
  • 8,151
1 vote
1 answer
2k views

I'm creating a database to store the events of mobile apps recovered from multiple sources. Problem is that rows from the event table don't have much meaning to the user as it's mostly a succession of ...
azekirel555's user avatar
1 vote
1 answer
350 views

I have an Employee dimension that I am using SCDs and Surrogate keys to track changes over time. Employee's business system key: EmployeeID Employee Surrogate key: EmployeeSCDKey I would like to ...
user7600460's user avatar
0 votes
1 answer
724 views

Say I have an address table with the addresses of different facilities of a manufacturing company. The foreign key lets me know which company the addresses belong to, but i need a surrogate id to ...
Ash's user avatar
  • 33
0 votes
1 answer
1k views

I am reading about DW modeling and started wondering why surrogate keys are used at all? I understand that sometimes business keys are not integers nthat makes the life (as well as joiing and ...
aviad's user avatar
  • 8,278
0 votes
2 answers
131 views

Is there any way to create a custom surrogate key in Pig?. Ex: we have data like below Salary City Name 20000 newyork john 30000 sydney joseph 60000 delhi mike 30000 sydney joseph And for ...
Avinash's user avatar
  • 137
0 votes
1 answer
114 views

Consider the following designs for a node table that describes an ordered tree. The key is a composite key. ck: composite key parent: parent node next: the next node, where the next.parent = parent. (...
Wouter's user avatar
  • 3,036
4 votes
3 answers
5k views

I understand there are good reasons for using surrogate keys in data warehouse dimensions. Still, I do not understand how I can link them to my fact table's foreign keys. In the fact table I have only ...
Davide's user avatar
  • 41