Since the invention of the computer, we have been eager to find systems that can manage and store large amounts of structured data..
It's a tool for users to delete or post, get, patch the data. Nowadays, we can deal with the data efficiently(etc backup, safety, concurrency controle, data integrit). Every data stored into database.
store data as differnt type of data instead of table.
It has flexible data structure
MongoDB
there are the numerous of Database, but relational Database is the most porpular database in the world.
table
table for data
this is consisted with rows and cols
cols
attribute of data
rows
information of users
schema is the blue-print defining database structure.
table
- basic unit for storage
column
- An attribute
type : string boolean
constraint : PRIMARY KEY, NOT NULL, FORERIGN KEY
Database :
System which store the data and structurise.
storage unite for logical data
Database Management Systems
RDB process
writing query by Sql syntax
user query => DBMS
DBMS accesss/ dealing data
return the result to user
Before desigining a database, it is essential to understand the relationships between data.
At the moment, we could adopt the concept of of Entity-Relationship Model to visualize the structure of the system. This modele shows the relationships between enitity and Attribute in real world.
It is independence existence to express data.
It is mapping with table
Attribute is unique character of entity. it is located in cols in table.
1 to 1 relation
An instance in enitity has a relationship with an instance in other enitity.
student --- seat
1 to many
An instance of enitity has a relationship with several instance in other enitity.
student --- major
many to many
instances of an enitity has a relationships with other instances of enitity.
booking the seat for flights