Linked Questions

9 votes
2 answers
2k views

Advice on a basic design, first time database design

I am taking a course to become a Java developer. The course involves using databases but we never really design any, unfortunately. Most of the time we get pre-made databases and we have to ...
Vahx's user avatar
  • 225
5 votes
2 answers
2k views

Best way to linking different entities to a single table

I'm running for office and have created a web app for tracking my door knocks to voters at their homes. The database contains a table called voters that contains all the necessary information about ...
StevieD's user avatar
  • 183
2 votes
2 answers
276 views

Designing a scenario where a primary key could be of two types

I have a table: all_info, where it holds the users identification. The id of this table can be of two types (just one or another, never both), suppose: int and varchar, but one table can't have two ...
Rafael Barros's user avatar
1 vote
2 answers
2k views

How to represent the relationship between artists and albums in an entity-relationship diagram

I'm learning and practicing with the E-R model trying to design a music industry database. With this section of the diagram I have a doubt: I suppose an album can be had by an artist and a band, not ...
dlag's user avatar
  • 17
16 votes
1 answer
7k views

Designing a database for a video game business domain with multiple many-to-many relationships

I am relatively new to database design, and I decided to make my own hypothetical database for practice. However, I am having trouble modeling and normalizing it, as I esteem that there are numerous ...
dpolaristar's user avatar
8 votes
1 answer
3k views

Database schema for entities with two possible owner/parent types?

I'm using PostgreSQL with Sequelize as my ORM. I have one type, User. The second type is Group, which can have any number of users associated with it through a GroupMemberships table. Users can also ...
Jakemmarsh's user avatar
7 votes
1 answer
2k views

How to model a Letter Transportation business context in a database diagram?

I am trying to crate entity-relationship diagram for a transport company database. This database should store information about letters, deliveries, moving letters from one warehouse to another, and ...
Igor's user avatar
  • 173
4 votes
1 answer
489 views

Is this a sane model for a network provisioning system?

I'm sketching out a model for a network setup, where I have the following conditions: There are multiple nodes which contains a number of switches each. Each switch has multiple services, which may ...
ChristianF's user avatar
3 votes
1 answer
3k views

Supertypes and subtypes

I am trying to design a database that has supertype/subtypes. I have the following users: - basic user - business user - administrator (super user). All three users share a common table (users) ...
Cristian's user avatar
  • 203
1 vote
1 answer
101 views

How to make Event (like a Party) Sources mutually exclusive?

I'm designing an entity-relationship diagram (ERD) for a marketplace of events. An event can be created by a user, in which case the Event table must have owner_id or we pull it from an API in which ...
Seio's user avatar
  • 11
0 votes
1 answer
148 views

Foreign Key Referencing ID of One of 2+ Other Tables

Given 3 tables — e.g. posts, comments, and tags — is there a way of having a foreign key in one of them referencing a primary key of one of the other two? CREATE TABLE IF NOT EXISTS posts ( id ...
psygo's user avatar
  • 121
0 votes
1 answer
63 views

complex normalisation problem

I am transfering a managment application from Access to SQL Server and from vba to .net. Still in study and learning phase. I am wondering if one of the solutions I developped previously can not be ...
Andre Gotlieb's user avatar
1 vote
0 answers
691 views

Modelling an entity-relationship diagram for a scenario involving companies, services, and clients

I am creating an entity-relationship diagram (ERD) for managing workflow and other details of Company X in which I am maintaining details of the following objects: Employees of Company X Services ...
Sharad Gaur's user avatar
1 vote
0 answers
439 views

How to create entity-relationship diagram for tables that can potentially be united by an "IS A" relationship?

I have this schema: create table hall( building-id int, hall-id int, capacity int, primary key(building-id, hall-id) ); create table semester( sem-id char(5), start-date date, eend-...
Yos's user avatar
  • 195
1 vote
0 answers
95 views

Designing a database for the academic activities of individuals or departments

I have a database which stores the academic activities in which some individuals or departments are involved. An activity could be any among some of these types: article (written) course (imparted) ...
raguchi's user avatar
  • 15

15 30 50 per page