database-normalization

Normalization: What does “repeating groups” mean?

别等时光非礼了梦想. 提交于 2019-11-26 12:22:28
I have read different tutorials and seen different examples of normalization, specially the notion of "repeating groups" in the first normal form. From them I have have gathered that repeating groups are "kind-of" multi-valued attributes (e.g. here and here ). But we already make separate tables for each multi-valued attribute by including foreign keys from the parent table during the process of mapping an ERM (Entity relationship Model) to a RDM (Relational Data Model)? Reference: this Secondly, are those "repeating groups" essentially laid out horizontally in the same row, or can the same

Native JSON support in MYSQL 5.7 : what are the pros and cons of JSON data type in MYSQL?

 ̄綄美尐妖づ 提交于 2019-11-26 12:21:00
问题 In MySQL 5.7 a new data type for storing JSON data in MySQL tables has been added. It will obviously be a great change in MySQL. They listed some benefits Document Validation - Only valid JSON documents can be stored in a JSON column, so you get automatic validation of your data. Efficient Access - More importantly, when you store a JSON document in a JSON column, it is not stored as a plain text value. Instead, it is stored in an optimized binary format that allows for quicker access to

What is atomicity in dbms

对着背影说爱祢 提交于 2019-11-26 10:36:15
I read something like below in 1NF form of DBMS. There was a sentence as follows: "Every column should be atomic." Can anyone please explain it to me thoroughly with an example? "Every column should be atomic." Chris Date says, " Please note very carefully that it is not just simple things like the integer 3 that are legitimate values. On the contrary, values can be arbitrarily complex; for example, a value might be a geometric point, or a polygon, or an X ray, or an XML document, or a fingerprint, or an array, or a stack, or a list, or a relation (and so on)."[1] He also says, "A relvar is in

Same data from different entities in Database - Best Practice - Phone numbers example

我是研究僧i 提交于 2019-11-26 10:34:28
Given a database system which deals with Staff, Customers and Suppliers, all of which have multiple possible phone numbers, how would you go about storing these numbers in a nice normalised way? I have a had a little think about and the logical way isn't jumping out at me. In most cases . . . "Staff" always describes people. Some customers are people. Some customers are businesses (organizations). "Suppliers" are usually (always?) organizations. Staff can also be customers. Suppliers can also be customers. There are serious problems with having separate tables of staff phone numbers, supplier

Normalization in plain English

给你一囗甜甜゛ 提交于 2019-11-26 09:19:25
问题 I understand the concept of database normalization, but always have a hard time explaining it in plain English - especially for a job interview. I have read the wikipedia post, but still find it hard to explain the concept to non-developers. \"Design a database in a way not to get duplicated data\" is the first thing that comes to mind. Does anyone has a nice way to explain the concept of database normalization in plain English? And what are some nice examples to show the differences between

Difference between 3NF and BCNF in simple terms (must be able to explain to an 8-year old)

坚强是说给别人听的谎言 提交于 2019-11-26 06:52:58
问题 I have read the quote : data depends on the key [1NF], the whole key [2NF] and nothing but the key [3NF] . However, I am having trouble understanding 3.5NF or BCNF as it\'s called. Here is what I understand : BCNF is stricter than 3NF left side of any FD in the table must be a superkey (or at least a candidate key) So why is it then, that some 3NF tables are not in BCNF? I mean, the 3NF quote explicitly says \"nothing but the key\" meaning that all attributes depend solely on the primary key.

Normal forms - 2nd vs 3rd - is the difference just composite keys? non trivial dependency?

放肆的年华 提交于 2019-11-26 06:49:45
问题 I\'ve viewed This post but I don\'t really understand the terms used (non-trivial function dependency, superkey) From what I\'ve read 2nd normal form seems to relate to composite keys whereas 3rd normal form relates to primary keys. I\'m not sure if this is correct though. So 2nd normal form - there\'s a composite key and all fields in the table must relate to both of the composite key fields. If something doesn\'t relate then it should be refactored into another table. 3rd normal form -

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

血红的双手。 提交于 2019-11-26 04:59:40
问题 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), but never a 1:1. Am I missing something obvious? 回答1: A 1:1 relationship typically indicates that you have partitioned a larger entity for some reason. Often it is

What to do with null values when modeling and normalizing?

。_饼干妹妹 提交于 2019-11-26 03:44:50
问题 I\'m new in SQL(still learning) and I have to create a database for a venue. A client book for a room for an event. The problem is that the clients don\'t always provide their name, their email, and their phone number. Most of the time it\'s either name and email or name and phone. It\'s rarely all 3 but it happens. I need to store each of these in their respective attribute (name, email, phone). But the way they give me their info, I have a lot of null values. What can I do with these nulls?

What is atomicity in dbms

不打扰是莪最后的温柔 提交于 2019-11-26 03:30:48
问题 I read something like below in 1NF form of DBMS. There was a sentence as follows: \"Every column should be atomic.\" Can anyone please explain it to me thoroughly with an example? 回答1: "Every column should be atomic." Chris Date says, " Please note very carefully that it is not just simple things like the integer 3 that are legitimate values. On the contrary, values can be arbitrarily complex; for example, a value might be a geometric point, or a polygon, or an X ray, or an XML document, or a