Data Schema and Blobs

The schema gives the organization of data. It says what the data means. In the previous example, the 'contact' column had the contact of a person and not an ID. That's what is given by a schema, in addition to the table-structure itself.

Often, changes in schema require expensive migration - not only in the database, but also all applications that are using the database. As we saw in the previous example, we needed to change the country to an economic zone, but all zones were not ready to move at once.

How can we reduce the burden of migration? Let's examine a few ways:

  1. Build some wrappers over the database. So when the structure of the database changes, we can still convert back to the old data.
  2. Retain the country and relate it to the region in a separate table: In this way, whoever needs the country can refer to that, and whoever needs the region will access it. This is a clever way that relies on modeling like the real world.
  3. Change the organization of the data to be hierarchical.
Let's examine the last option a little better. A common way to express hierarchical data is to use JSON. For example, our data could be organized as follows:
{
  "country": "India",
  "ECG":
  {
    "equipmentID": "EC9323239"
  }
}


Such records don't have a fixed structure. That means we could have another record that reads:
{
  "region": "CW",
  "ECG":
  {
    "equipmentID": "EC1112342"
  }
}

So a migration could handle a few records at a time.

Which one do you think is the best way? Enter your thoughts below...

Comments

  1. Car glass repair is something that most car owners will need at some point in their vehicle's life. Windshields are an essential component of a car and are crucial to a driver's safety on the road. In this blog post, we will discuss why car glass repair is important, how to identify damage, and what to do if you need repairs.
    Importance of Car Glass Repair
    The windshield of a car serves several purposes, including protecting drivers and passengers from the elements and providing structural support to the vehicle. A damaged windshield can compromise the safety of the vehicle and its occupants. In the event of an accident, a damaged windshield may not be able to provide adequate protection, leading to more severe injuries.
    Identifying Damage
    There are several ways to identify damage to a windshield. Chips and cracks are the most common types of damage. Chips are small dents on the windshield caused by rocks or other debris. They are usually small and do not require the windshield to be replaced. Cracks, on the other hand, are more severe and can spread across the windshield if not repaired in a timely manner. Scratches are also a common type of damage, but they are usually minor and do not require repair.
    What to Do if You Need Repairs
    If you notice any damage to your windshield, it is essential to take action immediately. Even small chips and cracks can quickly become larger and more dangerous. In some cases, small chips can be repaired with a resin injection. However, more significant damage may require a full windshield replacement. It is always best to seek professional help when it comes to car glass repair.
    Final Thoughts
    Car glass repair is a vital aspect of vehicle maintenance that should not be ignored. Any damage to the windshield can compromise the safety of the vehicle and its occupants. If you notice any chips, cracks, or scratches on your windshield, seek professional help immediately. By taking care of your windshield, you can ensure safe driving and prevent more significant damages in the long run.

    ReplyDelete
  2. When it comes to website designing, bookmarking is a feature that allows users to save and easily access their favourite pages or content on a website. Here are some tips on creating content that is conducive to bookmarking:
    Make content easily scannable: Users are more likely to bookmark content that is easy to read and understand. Use headings, subheadings, and bullet points to make your content easy to scan.
    Use clear and concise language: Use language that is easy to understand and free of jargon. This will make your content more accessible and increase the likelihood of it being bookmarked.
    Provide valuable information: Users are more likely to bookmark content that provides value. Make sure your content is informative and provides practical solutions to problems.
    Use visuals: Use images, infographics, and videos to break up your content and make it more engaging. Visuals can also make your content more memorable and increase the likelihood of it being bookmarked.
    Make it easy to share: Include social media sharing buttons on your website so that users can easily share your content with others. This can increase visibility and encourage bookmarking.
    Offer downloadable content: Consider offering downloadable content such as ebooks, guides, or whitepapers. This can provide added value to users and increase the likelihood of your content being bookmarked.



    ReplyDelete

Post a Comment

Popular posts from this blog

Relationships in a Relational Database

JavaScript data-types