[DB/SQL] terminology of RDBMS
What is DataBase?
A database is a collection of information that is organized so that it can be easily accessed, managed and updated. Computer databases typically contain aggregations of data records or files, containing information about sales transactions or interactions with specific customers.
In a relational database, digital information about a specific customer is organized into rows, columns and tables which are indexed to make it easier to find relevant information through SQL or NoSQL queries. In contrast, a graph database uses nodes and edges to define relationships between data entries and queries require a special semantic search syntax. As of this writing, SPARQL is the only semantic query language that is approved by the World Wide Web Consortium (W3C).
from https://searchsqlserver.techtarget.com/definition/database
There are many type of DB and SQL, but I am going to learn RDBMS and MySQL.
Settings
I used GCP SQL instance
- make VM instance and DB instance at GCP
- make VM instance open for 3306 port(access for mysql-server)
- install mysql-client at VM instance
$ mysql -h [your db ip] -P 3306 -u root -p
Schema
- Database can have more than one Schema.
- Schema can have objects like Table, Data Type, Function, Operator.
- No conflict although different Schema have the same object name.
- Schemas are not diveded rigidly
you can group objects by logically.
Table
basic data storage units consisting of row(record, tuple) and column(field, item).
Relation
Table that stores about one entity.
Attribute
We call it field or column.
Tuple
Rows
Degree
Number of attributes
Cardinality
Number of tuples
Domain
Set of values that can be attributes
NULL
Absence of Information
Data Types
- Numbers
- INTEGER(4BYTE)
- FLOAT(4BYTE)
- NUMBER(22BYTE)
- String
- CHAR(MAX TO 255BYTE)
- VARCHAR(MAX TO 65535BYTE)
- Date
- DATE(3BYTE)
- TIME(3BYTE)
- TIMESTAMP(4BYTE)
The end
댓글남기기