Linked Questions

0 votes
1 answer

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
1 vote
2 answers

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
1 vote
0 answers

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

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

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
1 vote
1 answer

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
14 votes
2 answers

Modelling a database structure for multiple user types and their contact information

I'm designing a database that will store users of varying types. Predominantly (but not exclusively) they will be Actors, Directors and Writers. Currently there are just four user types that are of ...
verism's user avatar
  • 241
9 votes
2 answers

Developing a database for a funds transfers business where (a) people and organizations can (b) send and receive money

In the business context of relevance, both members and organizations need to have an account for funds. Funds can be transferred from member to member, from member to organization, from organization ...
aarnes's user avatar
  • 93
0 votes
1 answer

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
7 votes
1 answer

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
17 votes
2 answers

How to model an entity type that can have different sets of attributes?

I’m having some trouble in recreating a database with a one-to-many (1:M) relationship between Users and Items. This is pretty straightforward, yes; however, each Item belongs to a certain Category (e....
user5613506's user avatar
16 votes
1 answer

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
7 votes
3 answers

SQL - Many-to-Many relationship with same table and with relationship constraint

I have a SellerProduct table. Each row within the table represents product information as offered by a seller. The SellerProduct table has the following columns: id (serial, pk) productName (nvarchar(...
user4321's user avatar
  • 215
5 votes
2 answers

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
11 votes
2 answers

What are the practical reasons behind learning relational algebra?

Learning how to formulate query-like expressions in relational algebra is a traditional part of many, perhaps most, "Introduction to Databases" courses. This is usually justified by the assertion ...
Gordon Royle's user avatar

15 30 50 per page