normalization

Is it ok to use character values for primary keys?

Is there a performance gain or best practice when it comes to using unique, numeric ID fields in a database table compared to using character-based ones? For instance, if I had two tables: athlete id ... 17, name ... Rickey Henderson, teamid ... 28 team teamid ... 28, teamname ... Oakland The athlete table, with thousands of playe...

SQL Joins vs Single Table : Performance Difference?

I am trying to stick to the practice of keeping the database normalized, but that leads to the need to run multiple join queries. Is there a performance degradation if many queries use joins vs having a call to a single table that might contain redundant data? ...

Algorithm to filter/normalise bad signal

Working on a tracking application using GPS. It is all fine, but sometimes because of the closed areas or bad weather I get inaccurate points. When you plot them, it just doesn't look right, with lots of hops/jumps. What algorithm should I run to filter out the bad signals It looks like an application of a blurring algorithm to me, but...

How far to take normalization in database design?

If I have a Tables: Projects(projectID, CreatedByID) Employees(empID,depID) Departments(depID,OfficeID) Offices(officeID) ("CreatedByID" is a foreign key for employees) And I have a query that I need to run for almost every request of a web application that grabs all projects in an office. Is it bad practice to just add a redundant "...

Good examples for teaching database design

Does anyone have any good scenarios for teaching relational databases and SQL? All the examples I can find are either trivial or have improbable domain constraints (like full name being unique). I'm especially trying to find some good examples for normalisation: tables that don't immediately fit 3NF and BCNF. At the moment I'm using a...

Too many columns in single table - is it good normal form?

A normalized table should have less number columns and can have reference fields as much as possible. Is it right approach? Is there any relationship between number of columns and a good normalization process? ...

Is there ever a time where using a database 1:1 relationship makes sense?

I was thinking the other day on normalization, and it occurred to me, I cannot think of a time where there should be a 1:1 relationship in a database. Name:SSN? I'd have them in the same table PersonID:AddressID? Again, same table. I can come up with a zillion examples of 1:many or many:many (with appropriate intermediate tables), bu...

Recieving Disparate Content In Java

The Problem: I need to receive different types of content from a number of different sources normalize them and then make them persistent through JDO. Naive Solution?: Create and listen on a specific port for each data type. OR Do a bunch of complicated parsing A Seemingly Ideal Solution: Have custom URL types Ie. FOO://myhost.tl...

CSS Specificity and normalising your stylesheets after a tight deadline

I have just finished building a heavyweight long sales page, with a lot of elements and varying styles on the page.The CSS has ended up being over specific with its selectors, and there are numerous rounded boxes, background images etc. In short, the CSS is a bit of a mess. (only myself to blame!) Can anyone suggest a method of going th...

What is a good KISS description of Boyce-Codd normal form?

What is a KISS (Keep it Simple, Stupid) way to remember what Boyce-Codd normal form is and how to take a unnormalized table and BCNF it? Wikipedia's info: not terribly helpful for me. ...

Ship management database structure discussion (should denormalize?)

My software went in production some days ago and now I want to argue a bit about the database structure. The software collects data about ships, currently 174 details for each ship, each detail can be a text value, a long text value, a number (of a specified length, with or without a specified number of decimals), a date, a date with ti...

Is it really better to use normalized tables?

I heard my team leader say that in some past projects they had to do away with normalization to make the queries faster. I think it may have something to do with table unions. Is having more lean tables really less efficient than having few fat tables? ...

Database schema normalization checker?

I'm interested in learning about tools that operate like this: Given a database schema and some data, suggest whether the schema is likely structured in any particular normal form, and then tell how the schema might be factored to produce further normalization. Basically, a static analysis tool for database schema design. Like other s...

First normal form and temporal data

The first normal form says that row ordering should not matter. Does this mean that a table with date as part of the key is not 1NF? e.g. Consider a table of ticker prices where date/time is part of the PK. In this case, you get the last price by ordering the data by date and selecting the top 1 row. Does this mean that for to fulfill 1N...

Polymorphism in SQL database tables?

I currently have multiple tables in my database which consist of the same 'basic fields' like: name character varying(100), description text, url character varying(255) But I have multiple specializations of that basic table, which is for example that tv_series has the fields season, episode, airing, while the movies table has release_...

How to design DB for question-answer (MySql)

I need to design a DB for a forum. I am separating the root post from it's sub-posts for various reasons. I need the text the user enters to be optimally search-able, also from performance point of view. My question, should I separate each table (root-posts and sub-posts) into two tables: root-posts_meta (hold data such as id,creatio...

String normalisation

I'm writing some code which needs to do string normalisation, I want to turn a given string into a camel-case representation (well, to the best guess at least). Example: "the quick brown fox" => "TheQuickBrownFox" "the_quick_brown_fox" => "TheQuickBrownFox" "123The_quIck bROWN FOX" => "TheQuickBrownFox" "the_quick brown fox 123" => "The...

Context free grammar conversion

hi..can anyone let me know if there is any software to convert Chomsky normal form to Backus–Naur Form and vice versa? ...

OCR: limits of small character bitmaps and normalization

Hi, I want to use a neural network to determine which character is shown in a bitmap. I take these bitmaps from digital screenshots and I got them in b/w. I wonder, what dimensions these character bitmaps should have. Right now I'm using the top and bottom of the line, and the left+1 and right+1 bound of each charakter. I use these boun...

3rd Normal Form

For the given relation, determine the current normal form, and list the reason why it is in that normal form. Then, using ONLY the information given, transform the relation into third normal form. Note that by default all attributes are depended on the composite primary key. Order( CID, VesselID, VoyID, VoyDest, EID, ContID, CDESC...