The concept of the coastline is key in coastal studies. However, its definition depends on the purpose and scale of the study. To determine the shoreline position, a set of criteria has to be chosen to define its position: the high tide mark, the base or top of a ridge, or cliff line, for example. Usually, these criteria are site-specific and often forgotten after digitisation. In this paper, a methodology is described for generating a multipurpose line within a spatial database. Here, the term 'multipurpose line' refers to a digital map structure holding diverse coastal data (natural and anthropogenic) digitised by a user and easily convertible into a single line after application of feature selection criteria. A data model is defined for the database design, which gives robustness to the database and facilitates the data entry, updates and data exploitation. This allows the generation of three shorelines (physiographic, erosion or simplified shoreline), which can be easily extracted from the spatial database. To illustrate the methodology, the development of the Andalusian multipurpose line (southern Spain) is explained in detail. An example of data exploitation is also given, generating different environmental indicators (shoreline length by type, beach width, etc.) that may lead to further research or to assist coastal managers and decision makers at the coastal zone.