Knowledge (XXG)

Flat-file database

Source đź“ť

206: 47: 149: 496:
While a user can write a table of contents into a text file, the text file format itself does not include a concept of a table of contents. While a user may write "friends with Kathy" in the "Notes" section for John's contact information, this is interpreted by the user rather than a built-in feature
388:
With predefined lengths, fields are limited to a maximum length. The need for longer fields may appear sometime after the format is defined. Possible workarounds include abbreviating phrases, replacing values with links (e.g. a URI pointing to the value), and splitting a file into multiple files.
364:
If the delimiter is allowed inside a field, there needs to be a way to distinguish delimiters characters or strings that are meant literally. For example, consider the sentence "If I have to, I'll do it myself.". To encode it in CSV, there needs to be a way to prevent the comma from splitting the
488:
data, primitive spreadsheets (perhaps comma-separated or tab-delimited), and text files can all be seen as flat-file databases because they lack integrated indexes, built-in references between data elements, and complex data types. Programs to manage collections of books or appointments and
497:
of the database. When a database system begins to recognize and codify relationships between records, it begins to drift away from being "flat," and when it has a detailed system for describing types and hierarchical relationships, it is now too structured to be considered "flat."
431:, involving data tabulated via hole punches in paper cards, is sometimes considered the first computerized flat-file database, as it included no cards indexing other cards, or otherwise relating the individual cards to one another, save by their group membership. 594:
Since the formal operations possible with a text file are usually more limited than desired, the text in the above example would ordinarily represent an intermediary state of the data prior to being transferred into a
534:
id name team 1 Amy Blues 2 Bob Reds 3 Chuck Blues 4 Richard Blues 5 Ethel Reds 6 Fred Blues 7 Gilly Blues 8 Hank Reds 9 Hank Blues
656: 396:. This is not needed for fixed-width formats. However, fixed-width formats can lead to unnecessarily large file sizes if fields tend to be shorter than the lengths reserved for them. 537:
This type of data representation is quite standard for a flat-file database, although there are some additional considerations that are not readily apparent from the text:
225:. Records follow a uniform format, and there are no structures for indexing or recognizing relationships between records. The file is simple. A flat file can be a 748: 801: 653: 562:
characters. This is also called indentation or "fixed-width" data formatting. Another common convention is to separate columns using one or more
818: 493:
may use single-purpose flat-file databases, storing and retrieving information from flat files unadorned with indexes or pointing systems.
245:. Relationships can be inferred from the data in the database, but the database format itself does not make those relationships explicit. 294:
A list of names, addresses, and phone numbers written by hand on a sheet of paper is a flat-file database. This can also be done with any
472:
Flat-file databases are common and ubiquitous because they are easy to write and edit, and suit myriad purposes in an uncomplicated way.
64: 381:
as needed. The fixed lengths can be predefined and known ahead of time (i.e. stated in the format's specification), or parsed from a
192: 130: 159: 446:. These programs were designed to make it easy for individuals to design and use their own databases, and were almost on par with 111: 83: 885: 958: 68: 796: 412:. It has low overhead and trivially avoids delimiter collisions, but it is brittle when edited manually and is rarely used. 741: 559: 548:. Such restrictions are usually established by convention, but not formally indicated unless the data is transferred to a 90: 834: 776: 674: 424: 392:
With delimiter-separated formats, determining the field boundaries requires finding the delimiters, which incurs some
174: 97: 880: 596: 338: 170: 57: 428: 257: 963: 953: 734: 342: 79: 679:
WTEC'94: Proceedings of the USENIX Winter 1994 Technical Conference on USENIX Winter 1994 Technical Conference
927: 922: 615: 567: 393: 357:(delimiter is the tab character), space-separated values, and vertical-bar-separated values (delimiter is 322: 230: 35: 875: 781: 435: 354: 238: 844: 549: 510: 890: 692: 581: 382: 104: 895: 712: 544:
each column in a database table such as the one above is ordinarily restricted to a specific
279:
operating systems. Another example of a flat file is a name-and-address list with the fields
905: 791: 704: 584:(the above example depicts a series of 3-tuples). Additionally, the first row specifies the 420: 248:
The term has generally implied a small database, but very large databases can also be flat.
31: 404:
Delimiters can be used alongside a notation stating the length of each field. For example,
813: 660: 447: 443: 378: 310:
program may be used to implement a flat-file database, which may then be printed or used
808: 757: 409: 299: 947: 910: 786: 377:
With fixed-width formats, each column has a fixed length, and fields are padded with
524:(the name of an athletic team supported by the person, third column); and a numeric 917: 854: 490: 17: 454:
in popularity. Examples of flat-file database software include early versions of
932: 849: 621: 505:
The following example illustrates typical elements of a flat-file database. The
451: 307: 303: 242: 46: 900: 839: 295: 226: 205: 716: 563: 545: 459: 455: 366: 346: 276: 234: 708: 633: 576:
Each row or record in the above table meets the standard definition of a
218: 462: 509:
arrangement consists of a series of columns and rows organized into a
609: 439: 311: 177:. Statements consisting only of original research should be removed. 726: 585: 577: 481: 466: 531:
Here is an example textual representation of the described data:
506: 485: 730: 627: 142: 40: 558:
In the above example, individual columns are separated using
408:
specifies the length (5 and 9) of each field. This is called
612:, a commonly used flat file, used to detail users in Unix 166: 528:, (used to uniquely identify records, first column). 265: 863: 827: 764: 71:. Unsourced material may be challenged and removed. 345:are separated by a character or string called the 271: 663:, U.S. Department of Transportation, August 2001. 588:that are associated with the values of each row. 27:Database stored as an ordinary unstructured file 691:Blodgett, John H.; Schultz, Claire K. (1969). 434:In the 1980s, configurable flat-file database 742: 513:. This specific example uses only one table. 8: 693:"Herman hollerith: data processing pioneer" 749: 735: 727: 367:strategies to prevent delimiter collision 193:Learn how and when to remove this message 131:Learn how and when to remove this message 675:"cql: Flat-file database query language" 349:. Common variants are CSV (delimiter is 326: 318: 204: 646: 256:Plain text files usually contain one 7: 69:adding citations to reliable sources 520:(a person's name, second column); 314:for improved search capabilities. 25: 636:(plain text database file format) 618:(standard Comma-Separated Values) 329:(each column has a fixed width). 317:Flat files are typically either 147: 45: 263:Examples of flat files include 56:needs additional citations for 1: 630:(classic flat-file processor) 624:(typical flat-file database) 323:comma-separated values (CSV) 209:Example of a flat file model 592:Database management system: 173:the claims made and adding 980: 597:database management system 355:tab-separated values (TSV) 339:delimiter-separated values 333:Delimiter-separated values 221:stored in a file called a 29: 654:Data Integration Glossary 429:1890 United States Census 30:Not to be confused with 928:Ordered Key-Value Store 659:March 20, 2009, at the 427:first exercised in the 819:Entity–attribute–value 709:10.1002/asi.4630200307 697:American Documentation 673:Fowler, Glenn (1994), 566:characters, such as a 476:Modern implementations 394:computational overhead 210: 959:Computer file formats 516:The columns include: 436:computer applications 208: 36:Flat file (hand tool) 438:were popular on the 410:declarative notation 400:Declarative notation 80:"Flat-file database" 65:improve this article 797:Entity–relationship 574:Relational algebra: 550:relational database 373:Fixed-width formats 319:delimiter-separated 582:relational algebra 556:Separated columns: 215:flat-file database 211: 158:possibly contains 18:Flat file database 941: 940: 886:Object–relational 881:Document-oriented 835:Multi-dimensional 480:Linear stores of 406:5apple|9pineapple 203: 202: 195: 160:original research 141: 140: 133: 115: 16:(Redirected from 971: 906:Transaction time 751: 744: 737: 728: 721: 720: 688: 682: 681: 670: 664: 651: 501:Example database 465:and the popular 425:US Census Bureau 423:'s work for the 421:Herman Hollerith 407: 360: 352: 274: 268: 198: 191: 187: 184: 178: 175:inline citations 151: 150: 143: 136: 129: 125: 122: 116: 114: 73: 49: 41: 32:Flat file system 21: 979: 978: 974: 973: 972: 970: 969: 968: 964:Database models 954:Data management 944: 943: 942: 937: 923:Key–value store 876:Column-oriented 864:Implementations 859: 823: 814:Object-oriented 760: 758:Database models 755: 725: 724: 690: 689: 685: 672: 671: 667: 661:Wayback Machine 652: 648: 643: 606: 535: 503: 478: 448:word processors 418: 405: 402: 375: 365:field. Several 358: 350: 335: 270: 264: 254: 199: 188: 182: 179: 164: 152: 148: 137: 126: 120: 117: 74: 72: 62: 50: 39: 28: 23: 22: 15: 12: 11: 5: 977: 975: 967: 966: 961: 956: 946: 945: 939: 938: 936: 935: 930: 925: 920: 918:XML data store 915: 914: 913: 908: 903: 893: 888: 883: 878: 873: 867: 865: 861: 860: 858: 857: 852: 847: 842: 837: 831: 829: 825: 824: 822: 821: 816: 811: 806: 805: 804: 794: 789: 784: 779: 774: 768: 766: 762: 761: 756: 754: 753: 746: 739: 731: 723: 722: 703:(3): 221–226. 683: 665: 645: 644: 642: 639: 638: 637: 631: 625: 619: 613: 605: 602: 601: 600: 589: 571: 553: 533: 511:tabular format 502: 499: 477: 474: 417: 414: 401: 398: 374: 371: 334: 331: 300:word processor 253: 250: 201: 200: 155: 153: 146: 139: 138: 53: 51: 44: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 976: 965: 962: 960: 957: 955: 952: 951: 949: 934: 931: 929: 926: 924: 921: 919: 916: 912: 911:Decision time 909: 907: 904: 902: 899: 898: 897: 894: 892: 889: 887: 884: 882: 879: 877: 874: 872: 869: 868: 866: 862: 856: 853: 851: 848: 846: 843: 841: 838: 836: 833: 832: 830: 826: 820: 817: 815: 812: 810: 807: 803: 800: 799: 798: 795: 793: 790: 788: 785: 783: 780: 778: 775: 773: 770: 769: 767: 765:Common models 763: 759: 752: 747: 745: 740: 738: 733: 732: 729: 718: 714: 710: 706: 702: 698: 694: 687: 684: 680: 676: 669: 666: 662: 658: 655: 650: 647: 640: 635: 632: 629: 626: 623: 620: 617: 614: 611: 608: 607: 603: 598: 593: 590: 587: 583: 579: 575: 572: 569: 565: 561: 557: 554: 551: 547: 543: 540: 539: 538: 532: 529: 527: 523: 519: 514: 512: 508: 500: 498: 494: 492: 491:address books 487: 483: 475: 473: 470: 468: 464: 461: 457: 453: 449: 445: 441: 437: 432: 430: 426: 422: 415: 413: 411: 399: 397: 395: 390: 386: 384: 380: 372: 370: 368: 362: 356: 348: 344: 340: 332: 330: 328: 324: 320: 315: 313: 309: 305: 301: 297: 292: 290: 286: 282: 278: 273: 267: 261: 259: 251: 249: 246: 244: 240: 236: 232: 228: 224: 220: 216: 207: 197: 194: 186: 176: 172: 168: 162: 161: 156:This article 154: 145: 144: 135: 132: 124: 113: 110: 106: 103: 99: 96: 92: 89: 85: 82: â€“  81: 77: 76:Find sources: 70: 66: 60: 59: 54:This article 52: 48: 43: 42: 37: 33: 19: 870: 855:XML database 828:Other models 777:Hierarchical 771: 700: 696: 686: 678: 668: 649: 591: 573: 568:tab or comma 555: 541: 536: 530: 525: 521: 517: 515: 504: 495: 479: 471: 452:spreadsheets 433: 419: 403: 391: 387: 376: 363: 336: 316: 293: 289:Phone Number 288: 284: 280: 262: 255: 247: 222: 214: 212: 189: 180: 157: 127: 118: 108: 101: 94: 87: 75: 63:Please help 58:verification 55: 933:Triplestore 850:Star schema 782:Dimensional 622:Berkeley DB 610:/etc/passwd 586:field names 542:Data types: 327:fixed-width 308:text editor 304:spreadsheet 266:/etc/passwd 243:binary file 229:file (e.g. 948:Categories 901:Valid time 792:Relational 641:References 560:whitespace 296:typewriter 272:/etc/group 260:per line. 227:plain text 183:March 2015 167:improve it 121:March 2015 91:newspapers 891:Deductive 871:Flat file 717:1936-6108 564:delimiter 546:data type 526:unique ID 460:shareware 456:FileMaker 444:Macintosh 347:delimiter 321:(such as 277:Unix-like 223:flat file 171:verifying 896:Temporal 845:Semantic 802:Enhanced 657:Archived 634:Recfiles 604:See also 458:and the 442:and the 252:Overview 241:), or a 219:database 787:Network 552:system. 463:PC-File 416:History 369:exist. 341:files, 285:Address 165:Please 105:scholar 715:  580:under 484:data, 440:IBM PC 383:header 379:spaces 343:fields 312:online 287:, and 258:record 107:  100:  93:  86:  78:  840:Array 809:Graph 578:tuple 482:NoSQL 467:dBase 325:) or 217:is a 112:JSTOR 98:books 772:Flat 713:ISSN 522:team 518:name 507:data 486:JSON 450:and 302:. A 281:Name 269:and 84:news 705:doi 628:Awk 616:CSV 361:). 353:), 337:In 306:or 298:or 275:on 239:tsv 237:or 235:txt 231:csv 169:by 67:by 34:or 950:: 711:. 701:20 699:. 695:. 677:, 469:. 385:. 291:. 283:, 233:, 213:A 750:e 743:t 736:v 719:. 707:: 599:. 570:. 359:| 351:, 196:) 190:( 185:) 181:( 163:. 134:) 128:( 123:) 119:( 109:· 102:· 95:· 88:· 61:. 38:. 20:)

Index

Flat file database
Flat file system
Flat file (hand tool)

verification
improve this article
adding citations to reliable sources
"Flat-file database"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
original research
improve it
verifying
inline citations
Learn how and when to remove this message

database
plain text
csv
txt
tsv
binary file
record
/etc/passwd
/etc/group
Unix-like

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑