技術情報
- 2020年02月14日
- 技術情報
Introduction To Database & DBMS systems
Today I will talk about database and DMBS systems. Lets take a look.
Database
The database is a systematic collection of data. Databases support data storage and manipulation. Databases facilitate data management. Let’s discuss some examples.
A Hospital would use a database to store patient’s name, age, diseases, contacts etc.
Consider also facebook & Instagram. You need to store, manipulate and present data related to members, your friends, member activities, messages, announcements and much more.
We can provide countless examples of database usage.
Database management system (DBMS)
The Database Management System (DBMS) is a collection of programs that allow its users to access the database, manipulate data, inform / represent data.
It also helps control access to the database.
Charles Bachmen’s Integrated Data Store (IDS) is said to be the first DBMS in history.
Over time, database technologies evolved a lot, while the expected use and functionality of databases has increased tremendously.
Types of DBMS
Hierarchical
This type of DBMS uses the “parent-child” data storage relationship. This type of DBMS is rarely used today. Its structure is like a tree with nodes that represent records and branches that represent fields. The Windows registry used in Windows XP is an example of a hierarchical database. Configuration settings are stored as tree structures with nodes.
Network DBMS
This type of DBMS supports many to many relationships. This generally results in complex database structures. RDM Server is an example of a database management system that implements the network model.
Relational DBMS
This type of DBMS defines database relationships in the form of tables, also known as relationships. Unlike network DBMS, RDBMS does not support many to many relationships. Relational DBMSs generally have predefined data types that they can support. This is the most popular type of DBMS in the market. Examples of relational database management systems include MariaDB, Oracle and the Microsoft SQL Server database.
Object-oriented relationship DBMS
this type supports the storage of new types of data. The data to be stored are in the form of objects. The objects that will be stored in the database have attributes (i.e. gender, ager) and methods that define what to do with the data. PostgreSQL is an example of an object-oriented relational DBMS.
Summary
- – DBMS stands for Database Management System.
- – We have four major types of DBMSs namely Hierarchical, Network, Relational, Object Oriented.
- – The most widely used DBMS is the relational model that saves data in table formats. It uses SQL as the standard query language.
I will talk about SQL programming next week.
By Yuuma
yuuma at 2020年02月14日 10:30:18
- 2020年02月13日
- 技術情報
CakePHP テーブルクラスとエンティティクラスについて(その2)
今回は前回作成したテーブルクラスおよびエンティティクラスに、コントローラークラスからアクセスをおこない、データベースに保存されているレコード内容をビューに表示する方法の説明をおこないたいと思います。
続きを読むnishida at 2020年02月13日 10:00:25
- 2020年02月07日
- 技術情報
MVC Architecture
Today I will talk about what is MVC architecture with some PHP sample codes.
MVC means model, view, controller:
Model: refers to the data structure.
View: refers to the user interface (UI), with what the user sees and interacts.
Controller: is an “intermediate processor” located between the model and the view.
How it works: the user interacts with the view (UI) to enter some inputs. The controller processes the user’s request, works with the data model. Finally, the controller will update the view to show the results.
Model
It is the representation of information or data that you want to display to user. Model have classes (If you have heard or used Object oriented programming you might have heard about Class). Model gets all these data from database and data can be read, updated and deleted.
View
It is all the front end code via which the website is presented in front of the user (UI/UX). It includes all the CSS, HTML and JavaScript. Also Ajax calls are included. Using view, the user interacts with the website.
Controller
It contains all the logic of your website. Controller also has class with the all methods and application logic. It does as the interface between the Model and View. Most of the application codes are written in this part.
Check out the PHP sample codes below.
<?php
//Model Part
class Model
{
public $text;
public function __construct()
{
$this->text = 'Hello world!';
}
}
//View Part
class View
{
private $model;
public function __construct(Model $model)
{
$this->model = $model;
}
public function output()
{
return '<h1>' . $this->model->text .'</h1>';
}
}
//Controller Part
class Controller
{
private $model;
public function __construct(Model $model)
{
$this->model = $model;
}
}
//initiate the model class
$model = new Model();
//controller and the view share the model
$controller = new Controller($model);
$view = new View($model);
echo $view->output();
These are some popular PHP MVC frameworks.
- – Laravel
- – Symfony
- – Yii 2
- – CakePHP
- – CodeIgniter
- – Zend Framework
- – Phalcon
- – Slim Framework
- – FuelPHP
By Yuuma.
yuuma at 2020年02月07日 10:30:22
- 2020年02月06日
- 技術情報
CakePHP テーブルクラスとエンティティクラスについて(その1)
nishida at 2020年02月06日 10:00:25
- 2020年01月31日
- 技術情報
How Programming Works
Today I will give you an abstraction about how programming works.
The computer only understands the instructions in machine language code.
But it is more difficult to write a program in machine language code.
So, we have to write programs in higher level languages such as Java, PHP, Python and etc. But we cannot execute this source code (high level language code) directly on the computer.
Therefore, we must convert them into machine language code to be able to understand for computers. We need some special translators that are programs written basically in machine language code.
And these translators are called language processors.
There are 3 types of language processors.
Compiler
It is used for higher level language.
Read and run the entire program at once and then throw errors if one occurs.
The top-level languages that compilers use is: C, C ++, C #, Java etc.
Assembler
It is used for assembly level language (mnemonic codes).
Read the assembly level language instructions for the given entry.
Interpreter
It is used for higher level language.
Read and execute the source code line by line and throw an error after each line if one occurs.
The top-level languages that use interpreters are VB Script, Python, Perl etc.
Now you will have a general understanding of how programming works.
By Yuuma.
yuuma at 2020年01月31日 10:30:44