Skip to main content

Questions tagged [relations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
54 votes
2 answers

Is it a bad practice to have several mutually exclusive one-to-one relationships?

Say, a table car has one-to-one relationship to tables electric_car, gas_car, and hybrid_car. If a car is electric_car, it can no longer appear in gas_car or a hybrid_car, etc. Is there anything ...
Arthur Tarasov's user avatar
15 votes
1 answer

Database design for products with bundles of products

I am building a database system for my retail business. I have set some tables which are: Product Purchase Sales Balance All are connected one another and are able to show my inventory level. The ...
shandery's user avatar
  • 151
2 votes
1 answer

Database relationship inheritance [closed]

I have a vehicle sales store. In my store I sale many kind of vehicles for example cars and boats. And I would like to keep track of the sales. My vehicles has some attributes as: Arrive on store ...
Lin's user avatar
  • 123
2 votes
3 answers

Contacts table with multiple entries?

Here is a part of our Database: Table: Users ID INT First Name VARCHAR Last Name VARCHAR Email Address VARCHAR ... Table: Contacts ID INT User_id INT (Foreign Key)...
Raghav's user avatar
  • 21
1 vote
1 answer

How to filter multiple many to many relationship based on multiple tags?

I've a scheme of two main tables: problem and tag and a relation (which is a many to many connector) table: problem_tags which excerpt of them is like: Problem table: ----+---------------------------...
Masked Man's user avatar
1 vote
1 answer

Need Help With BCNF Decomposition Problem

I'll try and keep it as quick and concise as I can: I'm currently a novice developer who's super eager to learn Database Normalization and Optimization so I can up my skill in Full-Stack development, ...
MacDadddy's user avatar
0 votes
1 answer

In a school database, do I need to have repeating data when a student can also be a teacher?

I've seen lots of ERDs of schools, teachers, and all the junction/associative tables. They always have three tables: Teachers Students Associative table betweeen them, maybe subjects of something ...
johnny's user avatar
  • 612