database-normalization

Dependency preserving

a 夏天 提交于 2019-12-09 17:16:34
问题 So I am looking over my database notes and material trying to refresh myself on the general concepts and terminology for upcoming interviews. I have gotten stuck at dependency however and lossless-join decompositions though. I have searched all over and see lots of mathy equations but I am looking for a plain and simple English response or example. I have a found a powerpoint from http://www.cs.kent.edu/~jin/DM09Fall/lecture6.ppt which illustrates an example that I cannot fully understand. It

Normalizing an extremely big table

本小妞迷上赌 提交于 2019-12-09 03:06:30
问题 I face the following issue. I have an extremely big table. This table is a heritage from the people who previously worked on the project. The table is in MS SQL Server. The table has the following properties: it has about 300 columns. All of them have "text" type but some of them eventually should represent other types (for example, integer or datetime). So one has to convert this text values in appropriate types before using them the table has more than 100 milliom rows. The space for the

normalization transitive dependencies

放肆的年华 提交于 2019-12-08 21:49:30
I need help with normalization. I am having trouble understanding how to complete the 3NF on my database project. Here is the 1NF Normalized Table Donut ID(PK) Donut Name Description Unit Price Donut Order ID Qty CustomerID Last Name First Name Last Name Street Address Apt City State Zip Home Phone Mobile Phone Other Phone Order Date Special Notes 2NF Donut Table DonutID (PK) Donut Name Description Unit Price Sales Order Table Sales OrderID (PK) CustomerID Last Name First Name Last Name Street Address Apt City State Zip Home Phone Mobile Phone Other Phone Order Date Special Notes Sales Order

Functional dependencies after normalization

三世轮回 提交于 2019-12-08 13:39:29
问题 I'm struggling to understand one aspect of the normalization process, I don't quite understand what to do with functional dependencies after I normalize a relation to 2NF (or 3NF). Let me describe it using an example. The exercise from my school book asks to normalize the relation to 2NF and then to 3NF. We are given a relation R=(ABCDEF) , F={AD->FE, BC->E, FEA->D, AC->DE, F->E, BD->A, F->C, ABC->AEF, B->F} Following the book, I minimized the Functional Dependencies to F = {AD->F, AC->D, BD-

Does data redundancy in different tables not follow Third Normal Form (3NF)?

眉间皱痕 提交于 2019-12-08 06:29:51
问题 I have 4 tables. Each of them contain the following attributes: Table 1 : Person (Id (Primary key), Name, Occupation, Location, SecondJob, PerHour, HoursWorked, Phone, Workphone) Table 2 : Job (Id (Foreign key that refers to Person), Title, Name, Location, Salary) Table 3 : SecondJob (Id (Foreign key that refers to Person), Title, Name) Table 4: PhoneNumber (Id (Foreign key that refers to Person), Name, Phone, Workphone) I can obtain the values of each attribute like Name, Title, Phone and

Normalization Theory Explanation needed

青春壹個敷衍的年華 提交于 2019-12-08 05:40:32
问题 I'm looking at a specific example of a relation with a composite primary key. Based on its functional dependencies, I know it is in 1NF. While normalizing it to 3NF I came across a situation I have not yet encountered. I followed the steps for all partial dependencies and transitive dependencies, but the last step of normalizing to 3NF requires you to create a relation that contains the primary key and all non-prime attributes dependent on it. In my specific case, I have the primary key, but

Does my table need more normalization?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 04:52:40
问题 I am making a simple public cashbook DB table to calculate how much my friends and I paid for having meal together. My first table was only a single table and it had a column "person" with non-atomic values, so I divided my table into two tables like above. But I'm not sure this is normalized enough. Is there any functional dependency which should be normalized but I don't know its existence? (I'm going to use MySql but you can answer me with any kind of DBMS.) 回答1: Normalization requires

normalization transitive dependencies

▼魔方 西西 提交于 2019-12-08 03:35:01
问题 I need help with normalization. I am having trouble understanding how to complete the 3NF on my database project. Here is the 1NF Normalized Table Donut ID(PK) Donut Name Description Unit Price Donut Order ID Qty CustomerID Last Name First Name Last Name Street Address Apt City State Zip Home Phone Mobile Phone Other Phone Order Date Special Notes 2NF Donut Table DonutID (PK) Donut Name Description Unit Price Sales Order Table Sales OrderID (PK) CustomerID Last Name First Name Last Name

Best practice for setting non-normalized columns in Yii2

半世苍凉 提交于 2019-12-07 19:16:37
问题 Question to all Yii2 normalization geeks out there. Where is the best place to set non-normalized columns in Yii2? Example, I have models Customer , Branch , CashRegister , and Transaction . In a perfect world, and in a perfectly normalized Database, our Transaction model would have only the cashregister_id , The CashRegister would store branch_id , and the Branch would store customer_id . However due to performance issues, we find ourselves obliged sometimes though to have a non-normalized

Modeling multiple many to many relationships between the same entities in a relational database

匆匆过客 提交于 2019-12-07 15:42:40
问题 When two tables have a many-to-many relationship or when a table has a many-to-many relationship with itself we can model that with a junction table. However the type of the relationship can expend beyond the original type, for example: Requirements: we have users. each user can have 0 or more other users as friends Solution: a users table and a junction table called "user_user". Then we discover a new requirement: some friendships are romantic or in other words two users can be connected in