結構化資料是什麼? 數據分析前,重新認識你的資料!

If you can’t measure ityou can’t manage it. – 彼得.杜拉克.

如果你無法衡量,就無法管理;如果你無法管理,就無法進步。因此做數據分析的第一步是要了解資料與蒐集資料了,此篇文章將會帶你們了解結構化資料、半結構化資料與非結構化資料。

 

快速導覽
一、結構化資料 Sturctured Data
二、半結構化資料 Semi-Structured Data
三、非結構化資料 Unstructured Data
四、結語

 

一. 結構化資料 Sturctured Data

假設有一間飲料店,點餐POS機已經與後台的資料庫做連線,而資料庫已經預先定義了每一筆資料要有訂單編號、品項、單價、購買數量與總金額的欄位,接著一筆一筆的訂單就會進到資料庫了,如下面這張表。

所以簡單來說,結構化資料就是如下圖已經整理好的資料表格,隨時可以拿來做數據分析。結構化資料是指儲存在關聯式資料庫(MySQL, Oracle等…)的資料,需要先定義欄位,才能夠儲存資料。

有一些人也會使用Excel 表格來蒐集資料,並事先定義每一個欄位能夠輸入什麼資料,這樣也屬於結構化資料。

結構化資料的優點是查詢資料快速,使用的存儲空間少;缺點是拓展新的欄位比較麻煩,在資料交換上的規定也比較嚴格。

 

我們可以一句話來定義結構化資料,先有結構,再有資料

訂單編號 品項 單價 購買數量 總金額
A001 紅茶 30 5 150
A001 綠茶 30 2 60
A001 奶茶 60 3 180
A002 紅茶 30 1 30
A002 綠茶 30 3 90
A002 奶茶 60 2 120
A003 紅茶 30 4 120

 


二. 半結構化資料 Semi-Structured Data

半結構化資料如CSV、JSON與XML,皆便於資料交換,其特性同時具備欄位概念與欄位可拓展性,因此半結構化資料除了可以透過欄位來查詢到資料外,還能根據使用者的需求來增減欄位。

台灣的政府資料開放平台就經常提供CSV、JSON與XML的資料。從以上的範例拿出兩列來舉例,假設要在第一筆訂單加入糖度欄位,第二筆訂單加入冰塊的欄位,使用半結構化資料就相當的方便,不需要在兩筆都補上糖度與冰塊的欄位,如以下XML與JSON的範例。

我們可以一句話來定義結構化資料,先有資料,再有結構

XML範例

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <row>
    <order>A001</order>
    <item>紅茶</item>
    <sugar_level>25%</sugar_level>  <!-- 只增加糖度欄位 -->
    <unit_price>30</unit_price>
    <quantity>5</quantity>
    <total_amount>150</total_amount>
  </row>
  <row>
    <order>A002</order>
    <item>綠茶</item>
    <ice_level>25%</ice_level>  <!-- 只增加冰塊欄位 -->
    <unit_price>30</unit_price>
    <quantity>3</quantity>
    <total_amount>90</total_amount>
  </row>
</root>

JSON範例

{
  "table": {
    "row": [
      {
        "order": "A001",
        "item": "紅茶",
        "sugar_level": "25%",  <-- 只增加糖度欄位
        "unit_price": "30",
        "quantity": "5",
        "total_amount": "150"
      },
      {
        "order": "A002",
        "item": "綠茶",
        "ice_level": "25%",  <-- 只增加冰塊欄位
        "unit_price": "30",
        "quantity": "3",
        "total_amount": "90"
      }
    ]
  }
}


三. 非結構化資料 Unstructured Data

非結構化資料指的是未經整理過的資料,也就是資料的本質。常見的文字、圖片、音樂、影片、PDF、網頁等…,都屬於非結構化資料。

要有結構化資料才能做數據分析,最近很夯的網頁爬蟲程式就是將網頁上的非結構化資料爬取下來,並整理成結構化資料,以進行後續的數據分析應用。如以下範例,從批踢踢上將發文日期、作者、主題與回復人數爬取下來,並整理成結構化資料。

非結構化資料

 


四. 結語

從以上的介紹大家可以了解到非結構化資料就是資料的本質,再根據需求從非結構化資料擷取出結構化資料,以進行後續的數據分析應用,而半結構化資料大多是用於資料交換。

結構化資料

Facebook Comments

185 Replies to “結構化資料是什麼? 數據分析前,重新認識你的資料!

  1. Thanks for the good writeup. It if truth
    be told was once a enjoyment account it. Glance complex to more delivered agreeable from you!
    However, how could we be in contact?

  2. Hello there! I simply wish to give you a huge thumbs up for your excellent information you have
    right here on this post. I’ll be returning to your website for more soon.

  3. When someone writes an paragraph he/she keeps the plan of a user in his/her brain that how a user
    can understand it. Therefore that’s why this post is amazing.

    Thanks!

  4. you are actually a good webmaster. The web site loading velocity is amazing.
    It sort of feels that you’re doing any distinctive trick.
    Also, The contents are masterwork. you have performed
    a wonderful process on this topic!

  5. I do agree with all of the concepts you’ve presented for your post.
    They are really convincing and can definitely work.

    Nonetheless, the posts are very short for novices.
    May you please lengthen them a little from next time? Thank you for the post.

  6. With havin so much content and articles do you ever run into
    any issues of plagorism or copyright violation? My blog has a lot of unique content I’ve either written myself or outsourced but it appears a lot of it is popping it up all
    over the web without my agreement. Do you know any solutions to help protect against content from being stolen? I’d truly appreciate it.

  7. I’m not positive the place you’re getting your information, however great topic.
    I must spend some time studying more or working out more.
    Thanks for fantastic information I used to be in search of this info for my mission.

  8. Thank you, I’ve just been looking for info about this
    subject for a long time and yours is the best
    I have discovered so far. However, what concerning the conclusion?
    Are you positive in regards to the source?

  9. Good day! This is my first visit to your blog!
    We are a team of volunteers and starting a new project in a community
    in the same niche. Your blog provided us useful information to
    work on. You have done a wonderful job!

  10. naturally like your website but you have to take a look at the
    spelling on several of your posts. A number of them are rife with spelling issues and I
    in finding it very troublesome to inform the truth nevertheless I’ll certainly
    come back again.

  11. I am genuinely delighted to glance at this website posts which includes lots of valuable data, thanks
    for providing such statistics.

  12. Hey would you mind letting me know which hosting company you’re working with?

    I’ve loaded your blog in 3 different internet browsers and I must say this blog loads
    a lot faster then most. Can you recommend a good hosting provider at a honest
    price? Kudos, I appreciate it!

  13. Sweet blog! I found it while surfing around on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Many thanks

  14. I know this if off topic but I’m looking into starting my own weblog and was
    curious what all is needed to get setup? I’m assuming having a blog like
    yours would cost a pretty penny? I’m not very web savvy so I’m not 100% positive.

    Any tips or advice would be greatly appreciated. Thank you

  15. Thanks for a marvelous posting! I actually
    enjoyed reading it, you could be a great author. I will make certain to bookmark your blog and may come
    back at some point. I want to encourage continue your great posts, have a nice afternoon!

  16. May I simply just say what a relief to find an individual who truly understands what they’re discussing on the internet.
    You definitely know how to bring an issue to light and make
    it important. A lot more people should check this out and understand this side of the story.
    It’s surprising you are not more popular since you certainly have the gift.

  17. After exploring a number of the blog posts on your web page, I really
    appreciate your way of blogging. I saved it to my bookmark
    site list and will be checking back soon. Please visit my website as well and let me know what
    you think.

  18. You actually make it seem so easy with your presentation but I find this topic to be really
    something that I think I would never understand.

    It seems too complex and very broad for me. I am looking forward for your next post, I will try to get the hang of
    it!

  19. My brother recommended I might like this web site.

    He was entirely right. This post actually made my day. You cann’t imagine just how much time I
    had spent for this info! Thanks! 31muvXS cheap flights

  20. I’d like to thank you for the efforts you have put in penning this website.
    I am hoping to view the same high-grade content by you later on as
    well. In truth, your creative writing abilities has inspired me to get my own, personal blog now 😉 cheap flights 2CSYEon

  21. If some one wants expert view on the topic of
    blogging and site-building then i recommend him/her to
    visit this weblog, Keep up the pleasant job. cheap flights 3gqLYTc

  22. I think the admin of this website is in fact working hard in favor of his site, because here every stuff is quality based
    stuff. cheap flights 3aN8IMa

  23. Outstanding post but I was wondering if you could write a litte more on this subject?
    I’d be very thankful if you could elaborate a little
    bit more. Many thanks!

  24. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
    You clearly know what youre talking about, why waste your
    intelligence on just posting videos to your weblog when you could be giving us something informative
    to read?

  25. Howdy, I believe your blog could be having internet browser compatibility problems.
    Whenever I look at your site in Safari, it looks
    fine however, when opening in Internet Explorer, it’s got some overlapping issues.
    I simply wanted to give you a quick heads up! Apart from that, great website!
    32hvAj4 cheap flights

  26. Hmm is anyone else having problems with the images on this blog loading?
    I’m trying to find out if its a problem on my end or if it’s the blog.
    Any responses would be greatly appreciated.

  27. I must thank you for the efforts you have put in writing this website.
    I am hoping to check out the same high-grade
    blog posts from you in the future as well. In fact, your creative writing abilities
    has motivated me to get my own site now 😉

  28. whoah this blog is excellent i love reading
    your articles. Keep up the good work! You understand,
    lots of persons are hunting around for this information, you could aid them greatly.

  29. It’s really a nice and helpful piece of info. I’m happy that you simply
    shared this useful info with us. Please keep us informed like this.
    Thank you for sharing.

  30. Way cool! Some very valid points! I appreciate you penning
    this write-up plus the rest of the website is extremely
    good.

    My web site … eat stop eat weight loss success stories (Mickie)

  31. Good day! Do you know if they make any plugins to assist with Search
    Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very
    good results. If you know of any please share.
    Appreciate it!

  32. whoah this blog is excellent i love studying your posts.
    Stay up the great work! You know, many individuals are
    searching around for this information, you can aid
    them greatly.

  33. Does your site have a contact page? I’m having trouble locating
    it but, I’d like to send you an e-mail. I’ve got some suggestions for
    your blog you might be interested in hearing. Either way, great website and
    I look forward to seeing it expand over time.

  34. I blog often and I truly appreciate your information. The article has
    truly peaked my interest. I am going to book mark your blog
    and keep checking for new details about once per week.

    I subscribed to your Feed as well.

  35. Closed and sealed dispensing systems often close up the flavor and aroma while the coffee has made.
    This is because of the drip coffeemaker simply
    dripping the lake to the center of the basket.
    Also, various product lines are around to allow customers to choose a more affordable
    coffee brewer with basic features or to select a more specialized strategy to brew your coffee.

  36. Be prudent to notwithstanding not exploitation this
    ride so as to abstain espial.Cash is meager in the freshman few hours of GTA 5, and this page describes How to Neaten Money in GTA 5, including
    utterly guiltless , and perpendicular up GTA
    5 cheats.

  37. I seriously love your blog.. Great colors & theme. Did you develop this site yourself?
    Please reply back as I’m wanting to create my own personal blog and would
    like to find out where you got this from or just what the theme is named.
    Thanks!

  38. Terrific article! That is the type of info that should be shared across the web.

    Shame on Google for not positioning this publish higher!
    Come on over and talk over with my web site . Thanks =)

  39. We love playing games over the Christmas holidays as my husband and I take time off work, and Pensilly does sound like a fantastic game for the whole family Henka Sonnie Leitman

  40. Magnificent items from you, man. I have have in mind your stuff prior to and you’re just
    too fantastic. I really like what you’ve acquired right here, really like what you are stating and the way in which through which you assert it.
    You are making it enjoyable and you continue to take care of to keep it sensible.
    I cant wait to read far more from you. This is really a tremendous website.

  41. Pretty portion of content. I just stumbled upon your website and in accession capital to say that I acquire actually enjoyed account
    your blog posts. Any way I’ll be subscribing to your
    feeds or even I fulfillment you get right of entry
    to consistently quickly.

  42. My brother suggested I may like this blog. He used to be totally right.
    This submit actually made my day. You can not consider just how much time I had spent for this information! Thanks!

  43. Hey! Someone in my Myspace group shared this site with us so I came to check it out.
    I’m definitely loving the information. I’m bookmarking and will
    be tweeting this to my followers! Outstanding blog and superb
    design and style.

  44. Hi there, I think your website may be having web browser compatibility
    problems. Whenever I look at your web site in Safari, it looks fine however, if opening in I.E., it’s got some
    overlapping issues. I just wanted to give you
    a quick heads up! Aside from that, excellent blog!

  45. Hi there just wanted to give you a quick heads up.
    The text in your post seem to be running off the screen in Safari.
    I’m not sure if this is a format issue or something to do with web browser
    compatibility but I thought I’d post to let you know.

    The design look great though! Hope you get
    the problem resolved soon. Thanks

  46. I was curious if you ever thought of changing the
    layout of your website? Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so
    people could connect with it better. Youve got an awful lot of text
    for only having 1 or 2 images. Maybe you could space it
    out better?

  47. Excellent goods from you, man. I have keep in mind your
    stuff prior to and you’re simply too fantastic. I actually
    like what you’ve got here, certainly like what you’re stating and the way in which wherein you are saying it.

    You make it enjoyable and you still care for to stay it smart.

    I can not wait to read much more from you. That is actually a great site.

  48. You could definitely see your enthusiasm within the article you write.
    The sector hopes for even more passionate writers like you who are not afraid to
    say how they believe. Always go after your heart.

  49. I do not even know how I stopped up right here, but I believed this submit used
    to be good. I do not recognize who you’re however
    definitely you’re going to a famous blogger for
    those who are not already. Cheers!

  50. Write more, thats all I have to say. Literally,
    it seems as though you relied on the video to make your point.

    You definitely know what youre talking about, why throw
    away your intelligence on just posting videos to your weblog when you could be giving us something enlightening
    to read?

  51. Sweet blog! I found it while surfing around on Yahoo News.

    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!

    Thank you

  52. Hello, I do believe your site could be having browser compatibility issues.

    When I look at your site in Safari, it looks fine however, when opening in Internet Explorer, it has some overlapping
    issues. I just wanted to give you a quick heads up!
    Aside from that, great website!

  53. I just could not depart your web site before suggesting that I extremely enjoyed the
    usual information a person supply on your visitors?

    Is gonna be again often in order to check up on new posts

  54. Hey There. I found your blog using msn. This is a really well written article.

    I’ll make sure to bookmark it and come back to read more of your useful information. Thanks for the
    post. I’ll definitely return.

  55. I don’t know if it’s just me or if perhaps everyone else encountering problems with your website.
    It looks like some of the written text within your posts are
    running off the screen. Can someone else
    please provide feedback and let me know if this is happening
    to them too? This may be a issue with my browser because I’ve
    had this happen previously. Kudos

  56. Just want to say your article is as astounding.

    The clearness in your post is just cool and i could assume you’re an expert on this subject.
    Fine with your permission allow me to grab your RSS
    feed to keep up to date with forthcoming post.
    Thanks a million and please carry on the gratifying work.

  57. I have been surfing on-line greater than 3 hours these days, yet I by no means discovered any interesting article
    like yours. It’s beautiful price sufficient for me. In my view, if all site owners and bloggers made
    just right content as you did, the internet will be a lot more helpful than ever before.
    ps4 games allenferguson ps4 games

  58. I know this if off topic but I’m looking into starting my own blog and was curious what all is needed to get setup?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very web savvy so I’m not 100% sure.

    Any recommendations or advice would be greatly appreciated.

    Thank you ps4 games 185413490784 ps4 games

  59. I think this is one of the most vital information for me.
    And i’m glad reading your article. But wanna remark
    on few general things, The web site style is ideal, the articles is really great : D.
    Good job, cheers games ps4 185413490784 games ps4

  60. What’s Taking place i’m new to this, I stumbled upon this I have found It absolutely helpful
    and it has aided me out loads. I hope to give a
    contribution & assist other users like its helped me. Great job.

  61. Hello every one, here every person is sharing these kinds
    of know-how, thus it’s pleasant to read this webpage, and I used to pay a quick visit this
    blog everyday.

  62. Great blog! Do you have any helpful hints for aspiring writers?
    I’m planning to start my own website soon but I’m a little lost
    on everything. Would you suggest starting with a free platform like WordPress
    or go for a paid option? There are so many choices out there that I’m totally overwhelmed ..
    Any suggestions? Thanks a lot!

  63. Thanks , I have just been searching for information about this subject for ages and yours is the greatest I’ve came upon till now.
    But, what about the bottom line? Are you sure
    concerning the source?

  64. Its like you read my mind! You appear to know so much about this, like you wrote
    the book in it or something. I think that you could do with a
    few pics to drive the message home a bit, but other than that, this is magnificent blog.
    A great read. I will certainly be back.

  65. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is
    added I get three emails with the same comment. Is there any way
    you can remove me from that service? Thanks a lot!

  66. Hi i am kavin, its my first occasion to commenting anywhere, when i read this paragraph
    i thought i could also create comment due to
    this brilliant piece of writing.

  67. I like the valuable information you provide in your articles.

    I will bookmark your weblog and check again here regularly.
    I am quite sure I’ll learn many new stuff right here!

    Good luck for the next!

  68. Good post. I learn something totally new and challenging on websites I stumbleupon everyday.
    It will always be useful to read articles from other authors and use a little something from other sites.

  69. Hmm it seems like your site ate my first comment (it was super long) so I guess I’ll just sum it up
    what I wrote and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m still new to the whole thing.

    Do you have any tips and hints for novice blog writers?
    I’d definitely appreciate it.

  70. Thank you a bunch for sharing this with all people you really know what you are speaking about!
    Bookmarked. Please additionally consult with my web site =).
    We can have a hyperlink change agreement between us

  71. Have you ever considered writing an e-book or guest authoring
    on other sites? I have a blog based on the same subjects you discuss and would love to have you share
    some stories/information. I know my visitors would appreciate your work.
    If you are even remotely interested, feel
    free to shoot me an email.

  72. Hi there! Do you know if they make any plugins to assist with Search
    Engine Optimization? I’m trying to get my blog to rank for some
    targeted keywords but I’m not seeing very good success.
    If you know of any please share. Kudos!

  73. Create websites will valuable information that who else will give away.
    As mentioned earlier, the BLS says how the rub market is projected to boost its amount of practitioners by 19% approximately
    2018. However, if you work with tall clients or clients
    of varying height and size, you could appreciate a massage
    table that’s over a standard.

  74. I used to be suggested this website by way of my cousin. I am
    now not certain whether or not this submit is written by means of him as nobody else know such distinctive
    approximately my trouble. You are wonderful! Thank you!

  75. It’s actually a great and helpful piece of info.
    I’m happy that you just shared this helpful information with us.
    Please stay us up to date like this. Thank you for sharing.

  76. I was suggested this website by my cousin. I’m not sure whether this post is written by him as
    no one else know such detailed about my problem.
    You are wonderful! Thanks!

  77. This design is steller! You certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved
    to start my own blog (well, almost…HaHa!) Great job. I really loved what you
    had to say, and more than that, how you presented it. Too cool!

  78. I’m really enjoying the theme/design of your weblog. Do you ever run into any internet browser compatibility problems?
    A small number of my blog visitors have complained about my website not working correctly in Explorer but
    looks great in Firefox. Do you have any recommendations to help fix this issue?

  79. Howdy! I’m at work surfing around your blog from my new iphone 3gs!
    Just wanted to say I love reading your blog and look forward to all your posts!
    Keep up the outstanding work!

  80. Hi there it’s me, I am also visiting this web site regularly, this website is truly good and the people are really sharing fastidious thoughts.

  81. Its such as you read my thoughts! You appear to grasp so much
    about this, like you wrote the guide in it or something.
    I believe that you could do with a few % to pressure the
    message home a little bit, but instead of that, that is magnificent blog.
    A great read. I’ll definitely be back.

  82. I don’t know whether it’s just me or if everybody else encountering problems
    with your website. It appears like some of the text on your posts are running off the screen. Can somebody else please comment and
    let me know if this is happening to them as well? This could be a problem
    with my internet browser because I’ve had this happen previously.
    Kudos

  83. This design is incredible! You most certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job. I really loved what you had to say, and more than that, how you presented it. Too cool!

  84. I really love your website.. Very nice colors & theme. Did you develop this site yourself?
    Please reply back as I’m planning to create my own personal site and want to find out where you got this from or exactly what
    the theme is named. Cheers!

  85. Wow that was odd. I just wrote an incredibly long comment but after I clicked
    submit my comment didn’t show up. Grrrr…
    well I’m not writing all that over again. Anyways, just wanted to
    say excellent blog!

  86. Wow, incredible weblog structure! How lengthy have you been blogging for?
    you make running a blog glance easy. The whole look of your site is fantastic, let
    alone the content material!
    asmr 0mniartist

  87. An outstanding share! I have just forwarded this onto a colleague who had been conducting a little homework on this.
    And he actually bought me lunch due to the fact that I discovered it for him…
    lol. So let me reword this…. Thanks for the meal!! But yeah, thanx for
    spending time to discuss this topic here on your blog.

  88. I really love your website.. Very nice colors & theme.
    Did you make this amazing site yourself? Please
    reply back as I’m wanting to create my very own website
    and want to know where you got this from or just what the theme is called.
    Thanks!

  89. Excellent post. I used to be checking continuously this weblog and I’m inspired!
    Very helpful info particularly the closing part
    🙂 I deal with such information a lot. I used to
    be looking for this particular information for a very long time.
    Thank you and good luck. asmr 0mniartist

  90. 自動引用通知: generic cialis free shipping
  91. Typically the massage therapist begins the massage with the normal relaxing Swedish massage and after that actually starts to massage the patient using the heated
    stones. But because the volume increases, there will also be low-cost knockoffs available.
    Research has indicated that nurturing touch increases the discharge of oxytocin, a hormone
    that produces a feeling of nurturing and sensation of trust.

  92. 自動引用通知: order sildenafil from india
  93. 自動引用通知: where to order cialis
  94. 自動引用通知: buy sildenafil us
  95. 自動引用通知: buy brand viagra cheap
  96. 自動引用通知: mandy flores viagra australia
  97. I think the admin of this web site is genuinely working hard for his web page, since
    here every material is quality based material.
    asmr 0mniartist

  98. This design is wicked! You definitely know how to keep a reader
    amused. Between your wit and your videos, I was almost moved to start my own blog (well,
    almost…HaHa!) Wonderful job. I really loved what
    you had to say, and more than that, how you presented
    it. Too cool! asmr 0mniartist

  99. Hola! I’ve been following your web site for some time now and finally got the courage to
    go ahead and give you a shout out from Atascocita Texas!
    Just wanted to say keep up the fantastic work!

  100. Have you ever considered creating an e-book or guest authoring on other sites?
    I have a blog centered on the same subjects you discuss and would
    really like to have you share some stories/information. I know my readers would enjoy your
    work. If you’re even remotely interested, feel free to shoot me an e mail.

  101. 自動引用通知: augmentin and amoxicillin
  102. 自動引用通知: amoxicillin 400mg dosage

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。