Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
First normal form
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Design that violates 1NF=== This table of customers' credit card transactions does not conform to first normal form, as each customer corresponds to a repeating group of transactions. Such a design can be represented in a [[hierarchical database]], but not in an SQL database, since SQL does not support nested tables. {{Table alignment}} {| class="wikitable col1right" |+ Customer ! <u>CustomerID</u> !! Name !! Transactions |- | 1 || Abraham || {{Table alignment}} {| class="wikitable col1right col3right" ! <u>TransactionID</u> !! Date !! Amount |- | 12890 || 2003-10-14 || −87 |- | 12904 || 2003-10-15 || −50 |} |- | 2 || Isaac || {{Table alignment}} {| class="wikitable col1right col3right" ! <u>TransactionID</u> !! Date !! Amount |- | 12898 || 2003-10-14 || −21 |} |- | 3 || Jacob || {{Table alignment}} {| class="wikitable col1right col3right" ! <u>TransactionID</u> !! Date !! Amount |- | 12907 || 2003-10-15 || −18 |- | 14920 || 2003-11-20 || −70 |- | 15003 || 2003-11-27 || −60 |} |} The evaluation of any query relating to customers' transactions would broadly involve two stages: # unpacking one or more customers' groups of transactions, allowing the individual transactions in a group to be examined, and # deriving a query result from the results of the first stage. For example, in order to find out the monetary sum of all transactions that occurred in October 2003 for all customers, the [[database management system]] (DMBS) would have to first unpack the Transactions field of each customer, then sum the Amount of each transaction thus obtained where the Date of the transaction falls in October 2003.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)