Questions tagged [normalization]

Normalization is the process of organizing columns into tables within a relational database in such a way as to minimize redundancy and avoid insertion, update and deletion anomalies.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 views

Database normalization for sensor data

I'm working on the backend of a quality evaluation tool. And I hit a the limit of too many columns. SQLSTATE[HY000]: General error: 1005 Can't create table xxx.xxx (errno: 185 "Too many columns&...
0
votes
3answers
35 views

How do I ensure I have split my tables without loss of data?

This is w.r.t Database Normalisation, when I have a redundant table that causes anomalies, I would want to consider splitting it in smaller tables as per the NF rules. BUT Say I split a big table into ...
0
votes
1answer
27 views

Meaning of “Dependency” in Relation to Elementary DB Normalization

In trying to figure out why the following table definitions from a textbook exercise about nurses in hospital wards is not in 2NF: Ward (WName, Location, WType) Ward-Nurse (WName(fk), NurseID, ...
-1
votes
1answer
41 views

JSON vs Record/Struct type in a DB

It seems like some databases have implement a Record/Struct type and others have implemented a Json/Jsonb type to handle nested data structures. A few examples being: BigQuery Struct CockroachDB ...
0
votes
1answer
40 views

database design - table with multiple nullable foreign keys

Context: I have 3 unrelated entities (tables) Entity1, Entity2 and Entity3 I have a table called Operation, which can have multiple targets. A target for an operation can be Entity1, Entity2 or ...
0
votes
0answers
8 views

How can a 'Request' store a 'Result' code and its associated 'Error' code and still enforce the relationship between Result and Error?

I'm an application developer creating the database structure to represent a flat file message format. I'd like to ask the collective knowledge the best/correct way to represent the following scenario:...
0
votes
2answers
16 views

Postgres normalize human name string

Is there some function to normalize name string: select normalize('R.C. Bray') 'R. C. Bray' Or the opposite direction? The simple replace('. ', '.') or replace('.', '. ') is wrong and may be ...
0
votes
1answer
23 views

More tables or More records performance wise

i am into a scenario that upon looking at the our project database contains Identical tables with the schema described below: id url region_1 region_2 region_3 region_4 date_created My ...
0
votes
0answers
19 views

Is this definition of 5NF right?

From what I've gathered from my textbook, 5NF doesn't allow lossy decomposition, so that when we join tables that are in 5NF, no spurious tuples are generated. The definition in my book states that: &...
0
votes
1answer
37 views

Most efficient table structure for multi-tenant database

I have a conventional relational database (mySQL) with several entities stored in their own table. Three examples are images, events and organisations. We are making a change to the way our site works ...
0
votes
0answers
22 views

Can a table be un-normalizable or am I misunderstanding the theory

I was considering normalizing a flat table (SQLite if its relevant) I'd been working with in a small personal project and it just didn't seem to make sense. Consider an example table like below. Each ...
0
votes
1answer
42 views

Relational-JSON overlapping with association [closed]

I have a composed class called sensor that is linked to a main class Node such that: class node is linked with another node to make a communication that produce an event class sensor can as well ...
0
votes
3answers
37 views

Is storing data that can be inferred go against data normalization?

To simplify lets say I have two tables PROJECTS and JOBS. A user creates a project and runs 1 or more jobs using a project. So it would possible look something like this: PROJECTS [PK] project_id ...
0
votes
1answer
40 views

How do foreign keys affect partial and transitive dependencies (databases)

I'm struggling to work out how foreign keys can affect partial and transitive dependencies when normalising databases. I have multiple tables, two of which are job offer and accepted job. in job offer,...
-2
votes
1answer
38 views

Table normalisation and empty values [duplicate]

Here are two ways I can optimise mapping of a text field with several other attributes to question and answer. First approach is, creating a map table with both question_id and answer_id in which ...
1
vote
1answer
26 views

Refactoring out a boolean column [closed]

I have a Pets table (cats, dogs, you name it) with over a million records. For simplicity sake, it looks like the following: Pets Field Type Null Key id int(11) NO ...
0
votes
1answer
41 views

Database Normalization Advice [closed]

I have database for multi store application. So, I have 3 type of user thats Admin, Customer, Merchant and I have 3 table for users. User table, Customer table, Merchant table. User Table; id ...
0
votes
1answer
52 views

Weak Entities + Partial Keys + 2NF [closed]

I'm a bit confused on the concept of weak entities and normalization and couldn't find any answers online. I know that generally weak entities have a partial key to uniquely identify its own records ...
-1
votes
1answer
26 views

Celebrities database with multiple parent categories and children categories? [duplicate]

I am creating a React/Laravel web application that will allow the user to search and navigate through celebrities based on their 'categories'. I have set up a Categories table using MySQL like so: *...
0
votes
1answer
21 views

Where can I get a proper dataset for performing Normalization techniques? [closed]

I'm new to databases and I just started with learning different techniques of Data Warehousing. I was given an assignment to perform Normalization techniques on a dataset of at least 1000 rows with ...
0
votes
1answer
24 views

Is it correct way having status or Summary columns in parent table or should choose another precedure?

My Parent Table is "Jobs" table, and there is child table that records Job's actions named "JobActions" as below: Jobs (JobId, JobType, CurrentStage, AssignedTo) JobActions (JobActionId, JobId, ...
1
vote
1answer
92 views

Need Help With BCNF Decomposition Problem

I'll try and keep it as quick and concise as I can: I'm currently a novice developer who's super eager to learn Database Normalization and Optimization so I can up my skill in Full-Stack development, ...
1
vote
2answers
29 views

Relationship normalization in SQL Server

I want to know should I remove PersonTypeId from Persons table or is it a good idea to have it in there?
6
votes
2answers
261 views

Alternatives to storing a record with exactly n multiple foreign keys from the same foreign table, where the relationships can't be repeated

Say there are entities called singulars, and entities called relationships. It takes exactly two singulars to make up a relationships entity. That pair of singulars can't be repeated elsewhere in ...
1
vote
0answers
54 views

Can there exist Tables with no Non-Prime Attributes? If so, are they always normalised to 3NF?

Can there exist a table with no non-prime attributes? Here is an example of a table which I believe has no non-prime attributes: I came to this conclusion because the list of attributes in the ...
1
vote
1answer
71 views

Does one of the normal forms require separation of repeating clusters of values into another table?

Should the repeating values in the "Sales" table below be separated out into a second table as part of the process of database normalization? Note that none of the values are functionally dependent on ...
1
vote
2answers
43 views

Normalization Excercise Clarification

Have a bit of confusion regarding a normalization from 1NF to BCNF. The teacher gave us this excercise to illustrate a normalisation all the way up to BCNF. I think I have found a problem with the ...
1
vote
1answer
81 views

Database Design: Normalization and NULL values

I have normalized my table from 0NF to 2NF (hopefully correct). How do I now go from 2NF to 3NF? Also, ResponseToTransactionId is a recursive foreign key that will contain NULL values a lot of the ...
1
vote
0answers
35 views

SKU and Price on product that have multiple attributes

Currently, my Inventory system is writing products data like this: T-Shirt Gildan -> blue, L, short -> stock: 140 -> price: $40 T-Shirt Gildan -> blue, XL, short -> stock: 0 -> price: $45 T-Shirt ...
0
votes
1answer
57 views

How to normalize a lookup table containing NULL? - or should I bother?

I have a table fee listing different fee descriptions and another table fee_amount holding the amount of the fee. The fee amount is different for each year, whether it's a joint fee or not and what ...
0
votes
1answer
127 views

BCNF decomposition step without functional dependencies

I am performing the BCNF decomposition for the relation R = (A, B, C, D, E), that has the set of functional dependencies AB -> C, CD -> A, C -> E, and C -> B. After checking that the ...
2
votes
0answers
44 views

How to handle / model “cost of provided spare parts per PO line item” where one spare qty is divided between multiple line items? / Postgres 11

Problem My objective is to help improve the data modeling / handling of my company’s present cost-of-goods [‘COGS’] calculation. Everything in the current Postgres 11 table structure is pretty ...
0
votes
1answer
48 views

How to normalize a database which uses tables as references to other tables?

I'm trying to create the database for my application, but I cannot manage to normalize my data on a MySQL database. I have a Types of map entity The Types must have one or more Models associated to ...
0
votes
1answer
39 views

Database design - logging of same value when recorded in multiple tables

I need to record changes to a particular value, which is read as part of multiple events that are all separately tracked, and be able to view a log of all of the values later. I think an example will ...
1
vote
0answers
30 views

Schema design for an entity with 'heterogeneous' status types

Consider a notification system which gets some event data and list of business email addresses as input (the list is basically computed by looking at which users/addresses are subscribed to which type ...
0
votes
4answers
90 views

Trouble deciding what/how many tables to use; normalisation suggests one

More of a conceptual question for the community, as I am not "thinking with databases" as much as I would like to just yet. I am using Oracle Database 18c Express Edition with SQL Developer. I have ...
0
votes
1answer
384 views

Store timeseries data in normal SQL database

I have got historic data of around 20 machine sensors with a time resolution of one second stored in csv-files which need to be imported to a SQL database prior to further data handling and analysis. ...
0
votes
0answers
11 views

What normal form is table with two self-determining attributes?

I have table with these attributes: employee_id (PK) [...other non-important attributes...] user_account_id There are 2 functional dependecies: employee_id -> user_account_id user_account_id -&...
-1
votes
1answer
20 views

Structure to represent matches between teams or individuals

Say there's a sport that can either be contested between two individuals, or two teams comprised of several individuals. So obviously we need the standard players, teams and teams_players tables. But ...
0
votes
0answers
29 views

Normalization of a Database - Is primary key = candidate key?

I'm given a database called Projects where I know that id, pid, sid is the primary key. My goal is to decompose this database such that each sub-relation is in BCNF or 3NF. P(id,pid,sid,sn,pn,mid,mn) ...
0
votes
1answer
66 views

how to professionally normalize my database - screenshots included

Hello database administrators. I got some excel spreadsheet with data of "my customers" and I'd like to create professionally designed database out of it. Can anyone tell me how this data should be ...
-2
votes
1answer
24 views

One to many relationship for constant data

I am saving a book inside a database, so that it can be properly queried. The book I'm working with has constant data. Not a character of it will be changed in the future in any way, once the book has ...
-1
votes
1answer
45 views

Removing duplicates (deduplifying) from an existing, huge, table

I have a huge table. Each row has an ID, some columns which relate to that ID specifically, a short (DNA) Sequence, and some columns which relate to that sequence particularly. If these have not yet ...
0
votes
4answers
313 views

Why is it considered that a set unnormalizes a database absolutely?

In order for a relationship to be on 1NF it needs to have all values as atomic, if there's a set it's not even in that first normal form: But intuitively I think that a table with that set would be ...
-2
votes
1answer
128 views

I need to put the data from the diagram in 3NF [closed]

This is a simple list table of a company trying to keep track of employee assignment to company projects (in other words, not a database but a flat one table file). You will design a database for ...
4
votes
0answers
90 views

Are these tables in 3NF? [closed]

Update: I updated the question to be more specific and also updated the diagram. I am currently in my last semester, I did use SQL before then I left for MongoDB but the practice project requires to ...
0
votes
0answers
28 views

SQLServer: Storing File Extension and normalization?

After much research, I've decided to store pdf/img/txt/doc/etc files on a web server instead of a database. However, the reference to that file will be stored in SQL Server. So far I have... | ...
-1
votes
1answer
37 views

3NF for table layout [closed]

Assuming a table with the following columns UserID, UserName, Console, GameID, GameTitle, GameVendor, VendorCountry, Game Genre, NumberOfPlayers Is this the correct 3NF? Users(UserID,UserName, ...
1
vote
1answer
41 views

Database Model for Various Type of Sensors

I am planning to build a database that will store sensor value for various type of sensors in a factory building. Is there any best practice on how to do this? - Option 1 : should I integrate all ...
-1
votes
1answer
112 views

Normalization of the this relation just want to know what are the functional dependencies

Consider the Customer account database of the ABC big bank, which keeps data for customers and their orders. A database of only one relation is designed, as shown below: ABC( customerNo, ...

1
2 3 4 5
12