Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
212 views

CREATE TABLE foo ( id SERIAL PRIMARY KEY, a TEXT, b TEXT ) Column a can take a value only when column b is empty and vice versa: id | a | b ---+-------+------ 1 | NULL | 'abc' 2 | '...
Prosto_Oleg's user avatar
-1 votes
2 answers
92 views

I have a dataset for daily sales that looks like this, Product_ID Mon_Sales Tue_Sales Wed_Sales A001 30 40 50 A002 10 20 30 A003 30 60 90 I want to change the data to look like this, Product_ID ...
Kunal Rane's user avatar
-4 votes
1 answer
75 views

I am designing a system that records stock transactions for a product. Some product types record items by serial number for traceability, some products types do not serialize items. I record the ...
Thomas's user avatar
  • 79
0 votes
1 answer
93 views

I'm finding an error message when I try to normalize a Json structure that follows. I pasted the JSON structure and the python code to normalize that is giving the ERROR message GOAL: Normalize ...
lpca's user avatar
  • 15
1 vote
1 answer
84 views

Sometimes a database table is supposed to contain every possible combination of two (independent) things. I know such a table is subject to deletion anomalies of the kind that 4NF is supposed to ...
Nabav's user avatar
  • 273
0 votes
1 answer
104 views

I work at a small company that buys inventory and resells either the raw inventory or packages it up into bundles for resale. We have an in-house software and are redoing our data model for an ...
Kelsey Butler's user avatar
-1 votes
2 answers
73 views

When normalizing data from an application form, each applicant will have one spouse. The "Applicant Code" serves as the primary key. Creating a surrogate key seems unnecessary due to their ...
Violet E.'s user avatar
-1 votes
1 answer
61 views

I have an input data.frame combined containing a many-to-many relationship that I would like to normalize into 2 tables. This input table contains the mixture composition for several different samples ...
Johan's user avatar
  • 878
-1 votes
1 answer
121 views

We organize runs, and we want to save run results and the number of kilometers that runners did run in their career. We have one table with every runners data (name, age, gender, etc. including an Id)....
kokoperation's user avatar
0 votes
2 answers
215 views

Database tables: Servers Id ServerType ServerId1 1 ServerId2 2 ServerId3 3 ServerId4 4 ServerId5 5 ServerId6 1 ServerId7 2 ServerId8 3 ServerId9 4 ServerId10 5 ServerId11 1 ServerId12 2 ServerId13 3 ...
Chipstop's user avatar
0 votes
1 answer
89 views

I have a table with a composite key (3) like this: sub_product - product_id (PK FK) - product_type (PK FK) - size_id (PK FK) - quantity quantity is dependent on all 3 keys. Is reducing this to ...
StackerCen's user avatar
0 votes
1 answer
252 views

I have a relation schema M with the attributes {B, C, D, E, R} and the following set of functional dependencies: B, D, E -> R B, D, R -> E B, C, D -> R C, D -> E I want to perform a BCNF ...
Jupiter's user avatar
  • 11
0 votes
1 answer
83 views

Given relation R(a,b,c) and that there are no functional dependencies: How are candidate keys computed?
nicomp's user avatar
  • 4,741
-1 votes
1 answer
559 views

I'm used to SQL and don't understand Realm's internals too good. After checking the usual recommmendations for using Realm, I've seen that database normalization is usually discouraged, as well as ...
Daniel M.'s user avatar
  • 305
-2 votes
1 answer
79 views

| MatrikelNr [PK] | Stud.-Name | Klausur | Raum | Matrikelnr = student number, Klausur = Exam name, Raum = Room. I should get this table into 3NF, and write them as relations with primary keys ...
Begems's user avatar
  • 11
-1 votes
1 answer
151 views

In SQL I'm considering the following problem. I have a list of A_ids and a list of B_ids. the number of unique A_ids ~ 1.000s the number of unique B_ids ~ 1.000.000s The idea is that I for each A_id ...
Bjarke Kingo's user avatar
0 votes
2 answers
149 views

I need to normalize (in a technical way) table1 by splitting the column "error occured at" so that it was like in table2. Is there is any DML function that will help me solve this? So that ...
user avatar
-1 votes
1 answer
109 views

I have a table with products that I offer. For each product ever sold, an entry is created in the ProductInstance table. This refers to this instance of the product and contains information such as ...
dinnerspoon's user avatar
0 votes
0 answers
49 views

Personel Table Id Name 1 ABC 2 DEF Car Table Id Name 1 X Car 2 Y Car Image&Document Table Id Path EntityId EntityName 1 Car-1.Jpg 1 Car 2 Person1.Jpg 1 Personal 3 Car-3.Jpg 3 Car I want to create ...
Harun's user avatar
  • 51
-1 votes
1 answer
89 views

My original table which is not normalised looked like this:[1]: https://i.sstatic.net/NbKV4.png Now after following the conditions of each form, I managed to separate the table into 3 forms which look ...
Habibullah Ahmadi's user avatar
-2 votes
1 answer
313 views

I have a table that holds student information: the student's name, number, address, courses taken and the instructors and grades from the courses. I want to normalize this table. What is best practice ...
user avatar
0 votes
1 answer
41 views

I have a table Subject It has many fields, two of them are code and flag. Earlier those two fields was an idempotention key for rows in this table. But, now I need one more option system. There are ...
Александр Коромыслов's user avatar
-1 votes
1 answer
74 views

I have a database of 5 tables. Some contain the same columns as others, does tying these tables to another table which has the primary keys of other tables meet 3rd normalisation. (This is outlined ...
Thomas's user avatar
  • 1
2 votes
0 answers
213 views

I'm creating a hybrid between "X-Com Enemy Unknown" and "The Sims". I maintain game state in a database--PostgreSQL--but my question is structural, not engine-specific. As in X-...
Anthony L. Gershman's user avatar
-2 votes
1 answer
107 views

I know that in BCNF if A->B then A must be a candidate key. But what about if A is part of the candidate key but not the whole candidate key? Let me explain in an example: Exercise 1: Candidate ...
Lechius's user avatar
  • 325

1
2 3 4 5
30