There are several methods for creating geometries in a database.
You can load or insert data in WKT or WKB formats. These formats are defined by the OGC, and all spatial database vendors support them. The database server performs automatic conversion from these formats to geometry types.
You can load data from ESRI shapefiles into a new or existing table. There are a number of ways to do this.
You can execute a SELECT... FROM OPENSTRING statement on a file containing the spatial data. For example:
INSERT INTO world_cities( country, city, point ) SELECT country, city, NEW ST_Point( longitude, latitude, 4326 ) FROM OPENSTRING( FILE 'capitalcities.csv' ) WITH( country CHAR(100), city CHAR(100), latitude DOUBLE, longitude DOUBLE )
You can combine latitude and longitude data to create a coordinate of spatial data type ST_Point. For example, if you had a table that already has latitude and longitude columns, you can create an ST_Point column that holds the values as a point using a statement similar to the following:
ALTER TABLE my_table ADD point AS ST_Point(SRID=4326) COMPUTE( NEW ST_Point( longitude, latitude, 4326 ) );
You can create geometries using constructors and static methods.