Curbside Coder

"Tech blog for code newbies, wizards and ninjas!"

,

Coding Basics: Database

1K Blog Marathon: Day 60

When I was starting to learn programming, I didn’t know a Database. So when saving data, I am using a text file, I create it dynamically (if not existing), read the text inside, and update if needed. On the second semester, our instructor teach us MS Access – so that’s when my question is answered!

Definition of Terms

Database is a collection of data in digital format. Think of it as a warehouse, but instead of a building, it resides in a computer. It is composed of one or many tables, which is composed of fields or columns. This columns are defined by data types.

Table is a group of fields.

Field is a table column (vertical) that handles one type of data, ex. String, numbers, datetime, etc. You can also refer to it as column header.

Entity is a table row (horizontal) that handles the actual data. An entity is one item in a table. It is a collection of information about an item defined by the field, ex. A person entity is composed of (name) Ian, (age) 27, (gender) Male.

CRUD – Create, Read, Update and Delete.

DBMS – Database Management System, a software that the user is interacting with the database via front user interface.

Types of Database Model

Hierarchical – the table-field-entity relations are organized in a tree-like structure, with branches and nodes. This requires the child record should have only one parent. In contrast, the parent can have one of more child records.

Object-Oriented – database that represent data in the form of objects and classes, like in object-oriented programming. Each item is treated as object, with properties like Polymorphic, Inheritable, Encapsulate able, and Abstract.

Network – Unlike Hierarchical, Network Database Model allows a record or entity to have multiple parent and multiple child records. In real life, multiple records can be updated by multiple users, forming a web-like structure.

Relational – This structure allows a table to have a “relation” to other tables using a linking field called “keys”. Primary Key is a unique field that is similar in the two tables, Foreign Key is a key from other table linking to a table. For example, In Table Employee, EmpID is used as Primary Key to link or form relation to another table, Table Salary.

NoSQL– Literally “No SQL”, or uses limited SQL if possible. Unlike tabular database models, NoSQL is a more flexible model because it is “horizontal” in essence – there is no hierarchy, not very restrictive compared to regular databases.

“And that’s one blog, stay hungry!”

You can have data without information, but you cannot have information without data

Daniel Keys Moran

3 responses to “Coding Basics: Database”

  1. cheriewhite Avatar

    Wow! I like this post! I would love to learn how to program and have full control of my blog and website. Unfortunately, there aren’t any classes for it in my area. Thank you for your blog! Following!

    Liked by 1 person

    1. Christian Foster Avatar

      Thank you very much @cheriewhite! Yes, I think its the best time to learn how to code, this Pandemic gives us more time! If you want to learn more in web programming, build your own website and have full control over it, I recommend that you start with https://www.w3schools.com/. Also, I am dropping bits of coding basics here, ^_^.
      Thanks again and happy coding!

      Liked by 1 person

      1. cheriewhite Avatar

        Oh, thank you so much, Christian! 🙂

        Liked by 1 person

Leave a comment

Navigation

About

Hello world! I’m Christian Foster, your Curbside Coder! Welcome to my corner of the internet. Let’s make a dent in the universe!

Design a site like this with WordPress.com
Get started