https://github.com/kenresoft/relational_database
Relational Database Management Demonstration with SQL and Entity Relationship Diagrams.
https://github.com/kenresoft/relational_database
database erdiagram mysql queries reporting sql
Last synced: 3 months ago
JSON representation
Relational Database Management Demonstration with SQL and Entity Relationship Diagrams.
- Host: GitHub
- URL: https://github.com/kenresoft/relational_database
- Owner: kenresoft
- License: mit
- Created: 2023-04-17T21:20:16.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-27T05:48:38.000Z (about 3 years ago)
- Last Synced: 2026-03-28T00:36:37.927Z (3 months ago)
- Topics: database, erdiagram, mysql, queries, reporting, sql
- Homepage:
- Size: 621 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# relational_database
## Relational Database demonstration with SQL
A Relational Database is a form of database that stores and organizes data elements with established relationships in order to provide quick access.
### Entity
In a database, an entity is essentially a container for storing and separating information relevant to the project's objectives.
### Property/Attribute
The characterizing features or properties that identify all objects belonging to a specific category and are applied to all cells in a column are known as attributes.
### Domain Integrity
Domain integrity is established by the permissible values of an attribute, which ensures that all data in a field is valid.
### Relationship Hints
1:1 = One to One Cardinality
1:M = One to Many Cardinality
M:N = Many to Many Cardinality
TP = Total Participation
PP = Partial Participation
### LIST OF TABLES
- candidates
- categories
- electorates
- locations
- parties
- polling_units
- positions
- registrations
- votes
### Database setup
```sql
DROP TABLE IF EXISTS `Candidates`;
DROP TABLE IF EXISTS `Electorates`;
DROP TABLE IF EXISTS `Categories`;
DROP TABLE IF EXISTS `Locations`;
DROP TABLE IF EXISTS `PollingUnits`;
DROP TABLE IF EXISTS `Parties`;
DROP TABLE IF EXISTS `Registrations`;
DROP TABLE IF EXISTS `Positions`;
DROP TABLE IF EXISTS `Votes`;
CREATE TABLE `candidates` (
`candidate_id` int(11) NOT NULL,
`candidate_name` varchar(255) NOT NULL,
`gender` varchar(255) NOT NULL,
`age` int(11) NOT NULL,
`position_id` int(11) NOT NULL,
`party_id` int(11) NOT NULL,
`category_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```
### Tools
- JetBrains Datagrip
- Apache MySQL Server
- PHPMyAdmin
- Database Designer