mirror of https://github.com/nocodb/nocodb
Pranav C
3 years ago
12 changed files with 511 additions and 15 deletions
@ -0,0 +1,420 @@
|
||||
--- |
||||
title: 'Abstract Types' |
||||
description: 'Abstract Types' |
||||
position: 12 |
||||
category: 'Setup and Usages' |
||||
menuTitle: 'Abstract Types' |
||||
--- |
||||
|
||||
## Available Abstract Types |
||||
|
||||
| Type | Description | |
||||
|---|---| |
||||
| [ID](#id) | Primary column of the table | |
||||
| [LinkToAnotherRecord](#linktoanotherrecord) | Has Many or Many To Many columns | |
||||
| [ForeignKey](#foreignkey)| Belongs To relation | |
||||
| [SingleLineText](#singlelinetext) | For short text | |
||||
| [LongText](#longtext) | For lengthy string content | |
||||
| [Attachment](#attachment) | File attachment column | |
||||
| [Checkbox](#checkbox) | Boolean value | |
||||
| [MultiSelect](#multiselect) | Multiple options can be selected once | |
||||
| [SingleSelect](#singleselect) | Single option select | |
||||
| [Date](#date) | Date selector | |
||||
| [Year](#year) | Year selector | |
||||
| [Time](#time) | Time selector | |
||||
| [PhoneNumber](#phonenumber) | Phone number field | |
||||
| [Email](#email) | Email field | |
||||
| [URL](#url) | Valid URL field | |
||||
| [Number](#number) | Any type of number | |
||||
|[Decimal](#decimal)| Fractional number | |
||||
|[Currency](#currency)| Currency value | |
||||
|[Percent](#percent)| Percentage | |
||||
|[Duration](#duration)| Duration | |
||||
|[Rating](#rating)| Rating | |
||||
|[Formula](#formula)| Formula based generated column | |
||||
| [Count](#count) | | |
||||
|[DateTime](#datetime)| Date & Time selector | |
||||
|[CreateTime](#createtime)| | |
||||
|[AutoNumber](#autonumber)| | |
||||
|[Geometry](#geometry)| Geometry column | |
||||
|[SpecificDBType](#specificdbtype)| Custom DB type option | |
||||
|
||||
|
||||
|
||||
|
||||
## Database Types |
||||
|
||||
|
||||
### ID |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|_All types are available_|int| |
||||
|**PostgreSQL**|_All types are available_|int4| |
||||
|**SQL Server**|_All types are available_|int| |
||||
|**SQLite**|_All types are available_|integer| |
||||
|
||||
|
||||
|
||||
### LinkToAnotherRecord |
||||
|
||||
|
||||
|
||||
|
||||
### ForeignKey |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### SingleLineText |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**||| |
||||
|**PostgreSQL**||| |
||||
|**SQL Server**||| |
||||
|**SQLite**||| |
||||
|
||||
|
||||
|
||||
### LongText |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|char, varchar, nchar, text, tinytext, mediumtext, longtext|text| |
||||
|**PostgreSQL**|char, character, character varying, text|text| |
||||
|**SQL Server**|char, ntext, text, varchar, nvarchar|text| |
||||
|**SQLite**|character, text, varchar|text| |
||||
|
||||
|
||||
|
||||
### Attachment |
||||
|
||||
#### Available Database Types |
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|json, char, varchar, nchar, text, tinytext, mediumtext, longtext| text | |
||||
|**PostgreSQL**|json, char, character, character varying, text| text | |
||||
|**SQL Server**|char, ntext, text, varchar, nvarchar| text | |
||||
|**SQLite**|character, text, varchar|text| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Checkbox |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|int, smallint, mediumint, bigint, bit, boolean, serial, tinyint|tinyint| |
||||
|**PostgreSQL**|bit, bool, int2, int4, int8, boolean, smallint, int, integer, bigint, bigserial, char, int4range, int8range, serial, serial2, serial8|bool| |
||||
|**SQL Server**|bigint, bit, int, tinyint|tinyint| |
||||
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8, boolean|| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### MultiSelect |
||||
|
||||
#### Available Database Types |
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|set, text, tinytext, mediumtext, longtext|set| |
||||
|**PostgreSQL**|text|text| |
||||
|**SQL Server**|text, ntext|text| |
||||
|**SQLite**|text, varchar|text| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### SingleSelect |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|enum, text, tinytext, mediumtext, longtext|enum| |
||||
|**PostgreSQL**|anyenum, text|text| |
||||
|**SQL Server**|text, ntext|text| |
||||
|**SQLite**|text, varchar|text| |
||||
|
||||
|
||||
|
||||
|
||||
### Date |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|date, datetime, timestamp, varchar|varchar| |
||||
|**PostgreSQL**||character varying| |
||||
|**SQL Server**||| |
||||
|**SQLite**|date|varchar| |
||||
|
||||
|
||||
|
||||
|
||||
### Year |
||||
|
||||
#### Available Database Types |
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|year|year| |
||||
|**PostgreSQL**|int|int| |
||||
|**SQL Server**|int|int| |
||||
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Time |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|time|time| |
||||
|**PostgreSQL**|time, time without time zone, timestamp, timestamp without time zone, timestamptz, timestamp with time zone, timetz, time with time zone|time| |
||||
|**SQL Server**|time|time| |
||||
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|time| |
||||
|
||||
|
||||
|
||||
|
||||
### PhoneNumber |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|varchar|varchar| |
||||
|**PostgreSQL**|character varying|character varying| |
||||
|**SQL Server**|varchar|varchar| |
||||
|**SQLite**|varchar, text|varchar| |
||||
|
||||
|
||||
|
||||
|
||||
### Email |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|varchar|varchar| |
||||
|**PostgreSQL**|character varying|character varying| |
||||
|**SQL Server**|varchar|| |
||||
|**SQLite**|varchar, text|varchar| |
||||
|
||||
|
||||
|
||||
|
||||
### URL |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|text, tinytext, mediumtext, longtext, varchar|varchar| |
||||
|**PostgreSQL**|character varying, text|character varying| |
||||
|**SQL Server**|varchar, text|varchar| |
||||
|**SQLite**|varchar, text|varchar| |
||||
|
||||
|
||||
|
||||
|
||||
### Number |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|int, smallint, mediumint, bigint, bit, float, decimal, double, serial|int| |
||||
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|int8| |
||||
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|int| |
||||
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric, real, double, double precision, float|integer| |
||||
|
||||
|
||||
|
||||
|
||||
### Decimal |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|float, decimal, double, serial|decimal| |
||||
|**PostgreSQL**|double precision,float4,float8|decimal| |
||||
|**SQL Server**|decimal, float|decimal| |
||||
|**SQLite**|real, double, double precision, float, numericdecimal| |
||||
|
||||
|
||||
|
||||
|
||||
### Currency |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|decimal| |
||||
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, money', 'float4, float8|decimal| |
||||
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|decimal| |
||||
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|double precision| |
||||
|
||||
|
||||
|
||||
|
||||
### Percent |
||||
|
||||
#### Available Database Types |
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|double| |
||||
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|double| |
||||
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|double| |
||||
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|double| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Duration |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|int| |
||||
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|int8| |
||||
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|int| |
||||
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|integer| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Rating |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|float| |
||||
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|float8| |
||||
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|float| |
||||
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|float| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Formula |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Count |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|int, smallint, mediumint, bigint, serial|int| |
||||
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, smallint, smallserial|int8| |
||||
|**SQL Server**|int, bigint, smallint, tinyint|int| |
||||
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|integer| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### DateTime |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|datetime, timestamp, varchar|datetime| |
||||
|**PostgreSQL**|timestamp, timestamp without time zone, timestamptz, timestamp with time zone|datetime| |
||||
|**SQL Server**|datetime, datetime2, datetimeoffset|datetime| |
||||
|**SQLite**|datetime, timestamp|datetime| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### CreateTime |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|
||||
|Database| Types| Default Type| |
||||
|-----|----------|----------| |
||||
|**MySQL**|datetime, timestamp, varchar|datetime| |
||||
|**PostgreSQL**|timestamp, timestamp without time zone, timestamptz, timestamp with time zone|datetime| |
||||
|**SQL Server**|datetime, datetime2, datetimeoffset|datetime| |
||||
|**SQLite**|datetime, timestamp|datetime| |
||||
|
||||
|
||||
### Geometry |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|Database| Types| |
||||
|-----|----------| |
||||
|**MySQL**|geometry, point, linestring, polygon, multipoint, multilinestring, multipolygon| |
||||
|**PostgreSQL**|polygon, point, circle, box, line, lseg, path, circle| |
||||
|**SQL Server**|geometry| |
||||
|**SQLite**|text| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### SpecificDBType |
||||
|
||||
#### Available Database Types |
||||
|
||||
|
||||
|Database| Types| |
||||
|-----|----------| |
||||
|**MySQL**|_All types are available_| |
||||
|**PostgreSQL**|_All types are available_| |
||||
|**SQL Server**|_All types are available_| |
||||
|**SQLite**|_All types are available_| |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,70 @@
|
||||
--- |
||||
title: 'Table & Columns' |
||||
description: 'Table and Columns Creation' |
||||
position: 11 |
||||
category: 'Setup and Usages' |
||||
menuTitle: 'Table and Columns Creation' |
||||
--- |
||||
|
||||
|
||||
## Table Creation |
||||
|
||||
Once you have created a new NocoDB project you can open it, In the browser, the URL would be like `example.com/dashboard/#/nc/project_id`. |
||||
|
||||
Now you can start creating new tables, so let's begin the table creation by simply clicking one of the following options. |
||||
|
||||
![table_create](https://user-images.githubusercontent.com/61551451/126771744-063f22da-6def-43fe-b9ef-1744d104db9d.png) |
||||
|
||||
On click, it will popup a table create a modal popup, in which you can enter the table name alias and table name. Enable/disable default columns and finally click the `Submit` button. |
||||
|
||||
![table_create_modal](https://user-images.githubusercontent.com/61551451/126772859-5a301c45-d830-4df2-a05a-43b15dd77728.png) |
||||
|
||||
> You can't disable the `id` column since we need a primary column for the table. |
||||
|
||||
After the successful submission, the table will create and open as a new tab. |
||||
|
||||
![image](https://user-images.githubusercontent.com/61551451/126773614-c945f654-cba8-4dd6-bd5e-d74890543d11.png) |
||||
|
||||
## Column Creation |
||||
|
||||
Adding a column is simple, you have to click the `+` icon on the right corner of the table. |
||||
|
||||
![Step 9](../../static/s3/9.png)![Pasted_Image_23_07_21__4_39_PM](https://user-images.githubusercontent.com/61551451/126773798-4470d632-69e0-4f5f-803b-e3597715fe22.png) |
||||
|
||||
After the click, it will show a menu and you can enter the column name and choose the column type ([Abstract type](./abstract-types)) from the column type. And finally, you can click the save button to create the new column. |
||||
|
||||
![image](https://user-images.githubusercontent.com/61551451/126774157-ae9af236-e1ad-4a54-adb7-1b96775cae57.png) |
||||
|
||||
> For more about Abstract type [click here](./abstract-types). |
||||
|
||||
|
||||
Finally, we have our new column as part of our table. |
||||
|
||||
|
||||
![Pasted_Image_23_07_21__4_43_PM](https://user-images.githubusercontent.com/61551451/126774276-e947f510-2fe1-4595-afc1-a31d2c35a69a.png) |
||||
|
||||
|
||||
## Row creation |
||||
|
||||
For adding new values to the table we need new rows, new rows can be added in two methods. |
||||
|
||||
### Using Form |
||||
|
||||
- Click the `+` icon in the toolbar of the table tab. |
||||
|
||||
![Pasted_Image_23_07_21__5_40_PM](https://user-images.githubusercontent.com/61551451/126783882-abd7e1dc-f13f-49bf-b44d-e66a06aacf5d.png) |
||||
- Now it will open a modal Form to enter the values, provide the values and press the save button. |
||||
|
||||
|
||||
![Pasted_Image_23_07_21__6_22_PM](https://user-images.githubusercontent.com/61551451/126784347-b82f9dfd-4c6d-4d65-be07-80e051ff19de.png) |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Using Table Row |
||||
|
||||
|
||||
|
Loading…
Reference in new issue