normalization

Drowning in a Sea of Nulls

只愿长相守 提交于 2019-12-23 08:26:57
问题 An application I inherited tracks lab test results performed on material samples. Data is stored in a single table (tblSampleData) with a primary key of SampleID and 235 columns representing potential test results. The problem is that only a few tests are performed per sample, so each row contains over 200 nulls. Actually, there is a second similar table (tblSampleData2) with another 215 primarily null columns and a primary key of SampleID. The two tables have a one-to-one relationship and

Creating database table

て烟熏妆下的殇ゞ 提交于 2019-12-23 07:46:25
问题 I am creating a database table for investigations and i need to log the person who reported the incident, this could be a record from the supplier or user tables. The easiest way to do this would be to have both a suppleir and a user id column in my investigations table but that seems wrong, what's a better way to do this? Thank you. 回答1: You could have another two tables - IncidentsReportedBySupplier (IncidentID, SupplierID) and IncidentsReportedByUser (IncidentID, UserID) - which would

Normalize a table with tightly coupled data

白昼怎懂夜的黑 提交于 2019-12-23 04:52:18
问题 I currently have a table that stores the materials used to create an item Item (material1, material2, material3) Another material has recently been added. However, I want to normalize this table so that in the future, adding a new material won't need a new column to be added to the database. I extracted the materials into the following junction table ItemJuncMaterial (id, itemId, materialid) However, the catch is that the order of the materials matter. So this junction table won't allow me to

Detect repetitive pixel patterns in an image and remove them using matlab

天涯浪子 提交于 2019-12-23 02:56:17
问题 I'm using Matlab R2017a and I have a RGB image (TIFF 128x128 uint16), shown below as a png image: Actual TIFF image: http://s000.tinyupload.com/index.php?file_id=13823805859248753003 As shown above, there's a repeating pattern of really light pixels (yellow and light blue). Because I'm using pixel data, the really light pixels are skewing my graphs, so I want to "neutralize" them. I looked everywhere but I couldn't find a clean pattern recognition/removal set of commands, so I ended up

Learning database normalization, confused about 2NF

喜夏-厌秋 提交于 2019-12-22 16:29:14
问题 I was looking at this video on normalization on youtube and I have to say I am confused now, I there might be errors in the video even though it has 25 likes and only 1 dislike. Normalization Specifically regarding the 2NF section which can be found at the 5 minute mark. The author says the 'Assignment Description' column depends on the Assignment ID column...yet there are there are different Assignment Descriptions for the same Assignment ID. He then 'normalizes' this table into 2NF by

Why do standardscaler and normalizer need different data input?

女生的网名这么多〃 提交于 2019-12-22 12:19:33
问题 I was trying the following code and found that StandardScaler(or MinMaxScaler) and Normalizer from sklearn handle data very differently. This issue makes the pipeline construction more difficult. I was wondering if this design discrepancy is intentional or not. from sklearn.preprocessing import StandardScaler, Normalizer, MinMaxScaler For Normalizer , the data is read "horizontally". Normalizer(norm = 'max').fit_transform([[ 1., 1., 2., 10], [ 2., 0., 0., 100], [ 0., -1., -1., 1000]]) #array(

Database Design :: Normalization in 2 Participant Event :: Join Table or 2 Column?

冷暖自知 提交于 2019-12-22 08:23:13
问题 Edit : updating generalized question to reflect actual domain: sport of hockey. The actual event then is a games schedule, and the participants are teams. Teams are the ultimate "owners" (i.e. when team deleted so should any related scheduled games, results, players, and player stats). The problem discussed so far in this thread covers the decision to combine an event into a single row with 2 columns (team1, team2) or to break out into a join table. The consensus so far is: stay with 2 column

Normalization of Many to Many relation in sql

谁都会走 提交于 2019-12-21 22:27:07
问题 I have a product table that contains two column ProductID Desc 1 Fan 2 Table 3 Bulb I have another table that contains supplier information SupplierID Desc 1 ABC 2 XYZ 3 HJK Now One supplier can supply multiple products and one product can be supplied by multiple suppliers To achieve this I have created another table tbl_Supplier_Product SupplierID ProductID 1 1 1 2 2 1 2 2 2 3 Is it a good way to link this table to supplier and product table through primary composite key. In this table the

Does storing aggregated data go against database normalization?

我是研究僧i 提交于 2019-12-21 20:28:13
问题 On sites like SO, I'm sure it's absolutely necessary to store as much aggregated data as possible to avoid performing all those complex queries/calculations on every page load. For instance, storing a running tally of the vote count for each question/answer, or storing the number of answers for each question, or the number of times a question has been viewed so that these queries don't need to be performed as often. But does doing this go against db normalization, or any other standards/best

Is it really worth it to normalize the “Toxi” way? ( 3NF )

风格不统一 提交于 2019-12-21 04:58:20
问题 I'm in the early stages of my database design so nothing is final yet, and I'm using the "TOXI" 3-table design for my threads which have optional tags, but I can't help but feel that the joining is not really necessary and perhaps I need to just rely on a simple tags column in my posts table where I can just store a varchar of something like <tag>, <secondTag> . So to recap: is it worth the trouble of the extra left joins on the 2 tag tables instead of just having a tag column in my posts