Data stream and data model versus data format

Consider the Comma-Separated Value (CSV) given in the following code snippet. The dataset is generated for mock-up purposes. The following CSV file contains the user's id, first_name, last_name, email, gender, ip_address, City, and Credit Card Type:

id,first_name,last_name,email,gender,ip_address,City,Credit Card Type
1,Hasty,Speechley,[email protected],Male,163.168.85.148,Namasuba,jcb
2,Wendell,Gisby,[email protected],Male,216.197.63.195,Pitalito,jcb
3,Kalle,Delooze,[email protected],Male,79.24.89.239,Rongcheng,diners-club-international
4,Renata,Colbertson,[email protected],Female,90.61.186.89,Pisaras,mastercard
5,Alexandro,Penketh,[email protected],Male,68.106.188.165,Denver,jcb
6,Stacee,Klas,[email protected],Male,134.195.11.3,Mehron,jcb
7,Ron,Mateja,[email protected],Male,190.32.1.172,As Sawdā,jcb
8,Delcina,Meeking,[email protected],Female,197.137.160.159,Kunčice pod Ondřejníkem,bankcard
9,Wain,Lakenden,[email protected],Male,221.12.205.207,Tangnan,jcb
10,Meagan,Glendzer,[email protected],Female,154.211.74.91,Ash Shaykh Zuwayd,jcb
11,Opalina,Averill,[email protected],Female,56.94.239.67,Mambago,jcb
12,Jesse,Simco,[email protected],Female,195.134.25.57,Salcedo,maestro
13,Olly,Raeside,[email protected],Male,18.61.169.146,Wangmo,maestro
14,Arie,Hogbourne,[email protected],Male,166.248.14.22,Yanghu,jcb
15,Lin,Mableson,[email protected],Female,211.178.21.41,Walton,jcb
16,Leslie,Jeanesson,[email protected],Female,230.33.86.14,Muqi,diners-club-enroute
17,Mathias,Davenell,[email protected],Male,12.144.241.73,Ungca,jcb
18,Daphna,Abramamovh,[email protected],Female,82.147.185.165,Kailahun,jcb
19,Bucky,Blomfield,[email protected],Male,107.140.105.147,Ambato Boeny,diners-club-us-ca
20,Vail,Wackly,[email protected],Male,156.230.62.14,Hankasalmi,jcb
21,Gael,Mandel,[email protected],Female,247.219.47.13,Skiáthos,china-unionpay
22,Rossy,Laing,[email protected],Male,150.8.27.209,Pizhma,china-unionpay
23,Berrie,Scholte,[email protected],Female,20.71.184.97,Gujun,bankcard
24,Freida,Sollitt,[email protected],Female,25.180.120.148,Yege,maestro
25,Gleda,O' Byrne,[email protected],Female,195.180.230.21,Shimen,switch
26,Garland,Veevers,[email protected],Female,114.152.249.90,Photharam,jcb
27,Giff,Waskett,[email protected],Male,63.203.179.23,Jimsar,jcb
28,Isidoro,Bryenton,[email protected],Male,30.101.118.54,Dugongan,jcb
29,Millie,Trunkfield,[email protected],Female,220.113.179.238,Samho-rodongjagu,diners-club-carte-blanche
30,Shayne,Mantrip,[email protected],Female,101.220.213.129,Akron,jcb
31,Min,Roggero,[email protected],Female,99.122.173.119,Calvinia,jcb
32,Chas,Maddyson,[email protected],Male,128.0.94.29,Huancheng,diners-club-international
33,Allyn,Whenman,[email protected],Female,49.60.125.164,Ramalhal,mastercard
34,Rafaelia,O'Leagham,[email protected],Female,111.58.12.10,Tijão,jcb
35,Sylvia,Sand,[email protected],Female,32.122.103.182,Fálanna,visa-electron
36,Kerk,Roberds,[email protected],Male,238.151.217.216,Pruzhany,diners-club-us-ca
37,Derek,Corbett,[email protected],Male,126.156.75.68,Václavovice,mastercard
38,Maurizia,Chasteau,[email protected],Female,165.212.42.138,Francisco Sarabia,diners-club-carte-blanche
39,Gabriele,Overal,[email protected],Male,141.112.9.226,Kendung Timur,jcb
40,Tanitansy,Hukins,[email protected],Female,181.192.169.43,Aitape,jcb
41,Flo,Allkins,[email protected],Female,146.82.152.88,Hafnarfjörður,mastercard
42,Aldis,Schulze,[email protected],Male,88.77.243.237,Pawitan,bankcard
43,Kenton,Taig,[email protected],Male,138.180.247.81,Mustvee,diners-club-enroute
44,Ware,Islep,[email protected],Male,208.116.121.128,Ban Talat Nua,diners-club-enroute
45,Albrecht,Archley,[email protected],Male,129.239.2.81,Eskilstuna,jcb
46,Nina,Brierton,[email protected],Female,149.8.146.113,Baardheere,jcb
47,Rebecka,Pavlasek,[email protected],Female,15.60.233.61,Baolong,jcb
48,Carie,Kimmel,[email protected],Female,223.159.67.155,Torzhok,visa
49,Carolina,Duplan,[email protected],Female,46.8.15.131,Beihe,jcb
50,Margarette,Anear,[email protected],Female,41.133.57.17,Daba,solo

We know that CSV means that the term between two commas is the value of an attribute. But what is this value? A common notion is that it's a content of a single relation where each line is a record that's a tuple and the ith value in the CSV corresponds to the ith attribute, shown as follows:

Figure 7.1: CSV data shown in tabular format

In the preceding example, the data format is CSV. Now, if we look at the different example:

Jack, profession, plumber, age, 35, wife, Jill 
Jill, profession, baker, age, 32, husband, Jack
Peter, profession, auto mechanic, age, 36, friend, Jack

There is no difference between the CSV file in the first snippet and second snippet. But if we generate the model from the second CSV data, we see the following diagram that shows that CSV does not always mean relational:

Figure 7.2: A model generated from the CSV snippet
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.36.71