Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
42 views

How does "OR if Y is a prime attribute" eliminate redundancy for 3NF?

Assuming the schema R(A,B,C,D,E) with the functional depencies AB -> ABCDE (AB is the superkey) and C -> B (B is a part of the key AB, so the schema is in 3NF for all dependencies). What does it ...
Marvin Mar's user avatar
1 vote
1 answer
54 views

Why does a database table expressing all possible combinations of values of 2 attributes violate 4NF?

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
-1 votes
2 answers
60 views

Can tables lose prime attributes during 2NF normalization?

I want to bring this table into a 2NF design: Student-ID Teacher-No Teacher StudentSkill S1 1 Ott Python S1 2 Biegler Python S1 1 Ott SQL S1 2 Biegler SQL S2 1 Hansen Python S2 2 Muller Python ...
actual_panda's user avatar
  • 1,250
0 votes
1 answer
70 views

Enterprise data model design for small business

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
1 answer
91 views

Create new tables from existing tables to normalize database [closed]

I am trying to figure out the best way to create new tables with additional columns to normalize my database. I have to add a column for the primary key made from data within the original table ...
Raymundo Escobedo's user avatar
-1 votes
2 answers
65 views

Database Normalization [Separating Tables]

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
0 votes
0 answers
86 views

attribute partially depends on a candidate key but the answer says the relation is in 3NF

The relation R(ABCD) has the following non-trivial FDs that hold: { A -> B ; B -> A ; A -> D ; D -> B } What is the highest normal form of R? Since A -> B is extraneous, I removed it ...
MInH THiỆn's user avatar
-1 votes
1 answer
50 views

Normalize a many-to-many table

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
  • 808
1 vote
1 answer
51 views

Is it possible to have a decomposed table to be the same as original one? BCNF Conversion

I have a relation R(A,C,D) where AC is the key and the FD set for the relation is F = {AC -> D, D -> C}. I need to convert this 3NF relation to BCNF. However the result of decomposition is R(A,C,...
Erbol Kulantaev's user avatar
-1 votes
1 answer
69 views

Is it really better to respect the normal forms and create an additional table for one simple field? [closed]

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
1 vote
1 answer
75 views

Normalize a table with a non-prime attribute and a multivalued dependency within the candidate key to 4NF

I will extend the 4NF example from Wikipedia with a Cost attribute. Define the relation from Wikipedia as R(Restaurant, Pizza, Area). By the original definition of R, there are multivalued ...
yournameplease's user avatar
0 votes
2 answers
136 views

Does it violate any normalization rules if I add a boolean column to a db table?

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 ...
Chipstop's user avatar
0 votes
1 answer
134 views

Pros and Cons of Constraints across Many-To-Many relationship

I have tables with relationships like the following. CREATE TABLE DocumentType ( ID uniqueidentifier primary key, ... ) GO CREATE TABLE LinkedDoc ( ID uniqueidentifier ROWGUIDCOL NOT NULL, ...
Reece Deyoung's user avatar
0 votes
1 answer
69 views

Making (3) composite primary key less redundant

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
-1 votes
1 answer
100 views

Dependency-Preserving Decomposition

Given the schema R = (A, B, C, D, E, H, I) with the functional dependency set F = {A→B, C→D, CD→E, BD→AH, H→D, AC→H}: Is the decomposition of R into (A, B, C, D, I) and (B, C, E, H) dependency ...
Alan Costa Grey's user avatar
0 votes
1 answer
184 views

Database Normalization BCNF decomposition

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
-3 votes
1 answer
39 views

Is table `Books` with two unique columns `isbn` (id of book) and `title` that depend on each other in 3NF?

Table Books has two columns, isbn (id of book) and title. They are unique and they depend on each other. Is it 3NF? 3NF requires every non-key attribute to depend on the key.
Yaroslav Nikolaenko's user avatar
0 votes
1 answer
63 views

How does this relation produce candidate keys?

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

Database normalization for 1 to many, many to many, many to 1

For both scenarios I'm using the same Color [lookup] table but storing the data differently. Here's the spec for the records to store: Car with Id 1 is available in 3 colors: Blue, Red, White. Car ...
PassingThru's user avatar
-1 votes
1 answer
293 views

Realm relationships vs embedded objects

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
-2 votes
1 answer
70 views

Are my Spring Boot entities normalised if not How can I do so?

I have a table having a oneToMany relation with another table public class UserDetails { @Id @Column(nullable = false) private String userId; @OneToMany(targetEntity = Books.class, ...
shiningStar's user avatar
-1 votes
1 answer
71 views

Database Table Normalization (3NF)

| 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
  • 13
-2 votes
1 answer
104 views

Normalization in PostgreSQL - share a primary key across tables?

I'm designing a PostgreSQL database that involves three tables: buys, sells, and transaction_pairs. In each of the buys and sells tables I have a unique identifier column id. database schema In the ...
Virgilio Gonzenbach's user avatar
-1 votes
1 answer
109 views

Is redundant data an acceptable trade-off in a normalized database structure?

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
0 answers
40 views

MongoDB Sharding by foreign key

Let's say I have two collections: users and items, where every item belongs to one user: users: { id: 1, country: "US" }, { id: 2, country: "UK" } items: { id: 123, userId: 1 }, { ...
user734796's user avatar
0 votes
2 answers
126 views

How to normalize table1 in postgres sql?

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 vote
1 answer
973 views

Joining with a json column makes the result very slow

There are 3 tables and I linked three tables with one query. But the problem is that the result returns in 7-8 seconds. One of the columns I join is JSON type and the data in it is json. For this ...
grudge's user avatar
  • 21
-1 votes
1 answer
102 views

Redundant relation: Is this a violation of database normalization?

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
-3 votes
1 answer
59 views

How to normalize three identical tables into one table?

I have three tables: cat1: id(PK) name description cat2: id(PK) name description cat1_id1(FK) cat3 id(PK) name description cat2_id(FK) cat1 has one-to-many cat2, and cat2 has one-to-many cat3. How ...
mightycode Newton's user avatar
0 votes
0 answers
44 views

EF Common file table structure

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 ...
Harun's user avatar
  • 51
0 votes
0 answers
85 views

Minimum normal form of a relation with all prime attributes

If all the attributes of a relation are prime (part of a candidate key), which normal form would it be at least? 1NF, 2NF, 3NF or BCNF. The question was already solved in slides as BCNF, but I don't ...
Dani Cruz's user avatar
-1 votes
1 answer
72 views

Database normalisation to 3NF

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
-1 votes
1 answer
426 views

Struggling with functional dependency practice questions

I'm going over some practice questions. F={ B→E, C→B, CD→E, ABE→C} I tried to make a canonical cover - Fc ={ B→E, C→B, D→E, AB→C} Then finding candidate keys - ADB, ADC Is R in BCNF? I thought it ...
Ofekino97's user avatar
-2 votes
1 answer
243 views

Normalization on Student database table [closed]

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
-1 votes
1 answer
136 views

foreign key order in psql (database normalization)

student database that must be normalized 3NF and put into PSQL I am having trouble with what order to insert into the tables in order to keep referential integrity with the FKs attributes: student ...
Sandi K.'s user avatar
0 votes
1 answer
33 views

One-To-Many relathionship task

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
0 votes
1 answer
52 views

Replacing two columns (first name, last name) with an auto-increment id

I have a time-series location data table containing the following columns (time, first_name, last_name, loc_lat, loc_long) with the first three columns as the primary key. The table has more than 1M ...
user1386058's user avatar
-1 votes
1 answer
67 views

Will MySQL allow no primary key if the table is linked with another table containing a MatchID with two Foreign Keys

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
1 answer
245 views

PHP/MySQL: Multiple comma separated values per table field vs... WHAT?

Storing multiple comma-separated values in a single table field is a notoriously bad design as it impacts performance and breaks relationships. Except I don't know how to change things. I have a ...
Puddintane's user avatar
2 votes
0 answers
163 views

PostgreSQL database: Get rid of redundant transitive relation (maybe 3NF is failed)

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
0 votes
1 answer
61 views

Normalizing data in R - dataframe construction

I'm using R to connect to a database I have stored in PGAdmin so that I can add data into the database through R. Before adding the data into the database, it has to be normalized. The dataset ...
amatof's user avatar
  • 185
-2 votes
1 answer
82 views

Is this allowed in BCNF Normalization?

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
  • 315
-1 votes
1 answer
601 views

use a Foreign key or make a new Primary key while normalizing to 2NF?

A table in First Normal Form: While converting it to Second Normal Form should I use the same Employee ID in 1 table as Primary and use it as a Foreign key in the other table like shown in the ...
Ethan Brown's user avatar
5 votes
1 answer
939 views

Storing JSON in a database violates 1NF?

Many DBMSs started allowing JSON in a database. Does this violate 1NF? One of the rules of 1NF is not storing multiple values in one column. But we are storing JSON, which can contain a key-value pair....
DRSK FUN cuts's user avatar
0 votes
1 answer
126 views

Decomposing tables where some attributes aren't in any minimal, non-trivial functional dependency

While writing a library to automatically decompose a given table, I came across some special cases where the first steps of Bernstein's synthesis for 3NF (ACM 1976) give me results I don't expect. ...
Accidental Statistician's user avatar
0 votes
0 answers
46 views

breaking transitive dependencies in third normal form (case)

Suppose we are second normal form with: R(a,b,c,d,e) FD: (a->bcde, c->de, d->e) And we remove transitive dependencies: R1(a,b,c) R2(c,d,e) R3(d,e) Is this a correct decomposition?
filtertips's user avatar
1 vote
0 answers
174 views

Data normalisation into third normal form

I have done data normalization on dummy data and would like to know if I did it correctly. If it is done correctly, I would also like to ask two things below, because it is about 3NF. 1NF: This table ...
filtertips's user avatar
-1 votes
1 answer
118 views

How to normalize relationships between tables with references to a parent table

Disclaimer that I'm not very versed in relational database design and normalization, but this is something that I've encountered and I'm not sure if this is a normalized design. Let's say there's a ...
platizin's user avatar
  • 852
0 votes
1 answer
71 views

SQL data normalisation for Calendar entry

I am working on a project that needs calendar entries to create reminders for the users. I am storing the id, title, description, date, and time of each entry in a relational database. Does it mess up ...
Jes's user avatar
  • 33
-1 votes
1 answer
506 views

Creating tables for many to many relationship.Will it effect normalization?(Laravel)

My database tables: 1.jobs table having fields id,name 2.locations table having fields id,name Jobs can have more than one location and locations can have more than one jobs.So i added a table ...
Vishnu kk's user avatar

1
2 3 4 5
30