DEV Community

Cover image for Basics SQL - CREATE Database
Anne Quinkenstein
Anne Quinkenstein

Posted on

5 1

Basics SQL - CREATE Database

Words

DBMS (Data Base Management System): software for creating and administering databases.
RDBMs (Relational Data Base Management System), such as MySQL, PostgreSQL, Oracle, etc.
Database container for storing, managing and retrieving data inside structured tables.
Table element of a database containing data that is grouped by common properties, which allows for structure and organisation.
Field property that characterises data in a table.
Primary Key This is a unique identifier that allows you to quickly identify a record.
Tuple (or record) values ​​in a table.

The data structure (tables, fields, relations...) that defines how the data will be organized. The creation of the database and its tables, but also the manipulation of the data (reading, adding, modification, deletion), are performed via queries sent to the DBMS, written in a particular
language called SQL (Structured Query Language).

Install SQL Server

on Ubuntu

Get started

  1. Create a Database
    mysql > CREATE DATABASE my-database;

  2. Move onto Database
    mysql -u root -D my-database -p

  • load a file
    mysql -u root -D my-database -p < file.sql

  • create table

CREATE TABLE `wizard` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `firstname` VARCHAR(100) NOT NULL,
  `lastname` VARCHAR(100) NOT NULL,
  `birthday` DATE NOT NULL,
  `birth_place` VARCHAR(255) NULL,
  `biography` TEXT NULL,
  PRIMARY KEY (`id`)
);
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay