35 lines
1.1 KiB
Markdown
35 lines
1.1 KiB
Markdown
# SQL Database
|
|
- Database is a collection of related data.
|
|
- Data is: known facts that can be recorded and have implicit meaning.
|
|
- Database is a collection of values in digital form, organized in a efficient way
|
|
|
|
## Data modeling
|
|
|
|
Data model is a collection of concepts to describe the structure of a database.
|
|
|
|
Structure of a database includes data types, relationships and constraints that apply to the data.
|
|
|
|
- High Level: Conceptual data models
|
|
- Low Level: Physical data models
|
|
- Representational: implementational data models
|
|
|
|
## Conceptual Data Model
|
|
|
|
Conceptual data models use concepts such as: entities, attributes and relationships.
|
|
|
|
An entity represents a real-world object or concept. Examples are: Employee, Product, etc...
|
|
|
|
## Entity
|
|
|
|
An entity contains attributes that have values. For example, an entity Person may have the following attributes: Name, Age, Sex, etc..
|
|
|
|
## Entity Set
|
|
|
|
A entity set is a collection of entities that share the same attributes. The entities within the set are distinguishable from each other because the values that the attributes have differ.
|
|
|
|
|
|
|
|
|
|
|
|
|