database-normalization

Is there an answer matrix I can use to decide if I need a foreign key or not?

For example, I have a table that stores classes, and a table that stores class_attributes. class_attributes has a class_attribute_id and a class_id, while classes has a class_id. I'd guess if a dataset is "a solely child of" or "belongs solely to" or "is solely owned by", then I need a FK to identify the parent. Without class_id in the ...

Python code for determining which normal form tabular data is in

I'm looking for Python code that can take tabular data and establish which normal form(s) it is in (if any) and show any functional dependencies, etc. ...

3NF Vs 2NF, which is more strict?

Which of these is true: If a table is in 2nd normal-form then it must be in 3rd normal-form. If a table is in 3rd normal-form then it must be in 2nd normal-form. I know only one of them is correct, if it's the first it makes sense. If it's the second -doesn't make any sense to me. Maybe an example? ...

Database normalization - how deep should I link tables together?

I have three tables: Post, Attachment, and Media. Posts have Attachments, and Attachments have Media. Currently, the Post and Attachment tables are linked by foreign keys, and so are the Attachment and Media tables. My question is, for the sake of proper database design and normalization, should I setup a foreign key relationship bet...

How do you normalize one-to-one-or-the-other relationships?

I'm storing data on baseball statistics and would like to do so with three tables: players, battingStats, and pitchingStats. For the purpose of the question, each player will have batting stats or pitching stats, but not both. How would I normalize such a relationship in 3NF? ...

How to answer this interview question?

As i am in between 1-2 years experience what should i say to this interview question.... What are the types of Normalization? Should i say all the normal forms or what? ...

should this database table be normalized?

i have taken over a database that stores fitness information and we were having a debate about a certain table and whether it should stay as one table or get broken up into three tables. Today, there is one table called: workouts that has the following fields id, exercise_id, reps, weight, date, person_id So if i did 2 sets of 3 diffe...

Should we denormalize database to improve performance?

We have a requirement to store 500 measurements per second, coming from several devices. Each measurement consists of a timestamp, a quantity type, and several vector values. Right now there is 8 vector values per measurement, and we may consider this number to be constant for needs of our prototype project. We are using HNibernate. Test...

Is the set of data always normalized in one form or the other in Databases

Suppose I have a set of data, given the data and the relation schemas can I assume that the set of data is normalized in one form or the other. In my opinion raw data given, has to be normalized into some form. However a discussion with a friend has led to ask me this question here. To expound more on the question, I would say given a s...

database is normalized but the resulting keys are a problem

but the prob is there are relations ships which are so huge that after normalizing they have like a 20 primary keys( composite keys) which are really foreign keys but have to be declared as primary keys to identify the relationship uniquely. so please help? is it correct and i apologize to the expert community for not accepting answers...

Database Normalization

I'm new to database design and I have been reading quite a bit about normalization. If I had three tables: Accommodation, Train Stations and Airports. Would I have address columns in each table or an address table that is referenced by the other tables? Is there such a thing as over-normalization? Thanks ...

Trying to normalize to BCNF

I am not sure if this is in BCNF or not, but the teacher told me that INSTRUMENT is in BCNF.. Is he messing with me? The teacher keeps messing up my mind on what is right and wrong and making me unsure. He keeps saying stuff that i've already thought of as clearly and I don't even get what he is saying. INSTRUMENT(InstrumentID, Instrum...

MySQL - moving from 1st Normal Form to 2nd and 3rd Normal Forms

Hello This question directly relates to a previous topic "MySQL - move from flat table to first normal form" (http://bit.ly/9pvS0Y) - and as I am now asking a question about moving to second and third normal forms, I figured it best to start a new topic. Below is my first normal form schema which I am pretty sure is solid enough for my...

What is the best database design for thousand rows

I'm about to start a Database Design that will simply manage users under companies. Each company will have a admin area that can manage users Each company will have around 25.000 users Client believes to have around 50 companies to start My main question is Should I create tables based on Companies? like users_company_0001 users_co...

Normalizing a table: finding unique columns over series of rows (Oracle 10.x)

Hello, I have a table with the following structure: WorkerPersons ------------------------------- ID (PK) PersonID (Indicates which version of Person the record describes) SomeColumn1 (data specific to Worker) SomeColumn2 (data specific to Person) .... SomeColumnN ------------------------------- As you can see, it's a den...

What is data normalization?

Can someone please clarify data normalization? What are the different levels? When should I "de-normalize"? Can I over normalize? I have a table with millions of records, and I believe I over-normalized it, but I'm not sure. ...

Database Normailization

Convert tables into 1st, 2nd, and 3rd normal form CustomerID(FirstName,LastName,BillingAddress,PhoneNumber,EmailAddress) ...