0
votes
1answer
27 views

Create one-to-many to two fields in different table

I have a database where I am trying to figure out how to join a table that contains an object called ModelType. The calibration table contains two fields (EffModel and BkgModel) that are based on a ...
0
votes
1answer
33 views

Attempting to identify transitive dependency

Hello I am attempting to identify a transitive dependency in the following diagram. I think that possibly the determinate of "Subtotal" is "Quantity" and "Price Charged" but I'm not sure if "subtotal" ...
-1
votes
2answers
52 views

What are the possible risks involved in partitioning large database tables? [closed]

There has been much talk about the benefits of table partitioning in Relational DBMS. I would like to know: Are there any risks to table partitioning ? What measures are there to take to minimize ...
2
votes
1answer
45 views

What Happens when Cartesian Product is applied to Relations with same attribute name

I understand that the Cartesian product(X) operation on two databases does not need to be UNION compatible.So,if there is a same attribute called name in the two relations R and S where name in R is ...
1
vote
0answers
28 views

How to join the tables in mysql to get wall messages and comments with name of person ? Only user and his friends messages

I have four tables in my mysql database as shown in the image url provided. I want to select data from the tables without duplication. I want to show messages and comments on wall according to the ...
0
votes
1answer
63 views

Database Designing Issue

I have a database having Millions of records in three tables. Now i want to split these three tables in multiple tables to reduce redundancy and data duplication. A lot of records(Persons) have ...
0
votes
0answers
18 views

Junction table for peer entities and uniqueness for a link [duplicate]

In my database I have two tables: for peer entities (e.g. Persons) and for links between them (e.g. Friendship). Obviously, the latter table contains at least two references to the former table (e.g. ...
0
votes
1answer
111 views

tables for different sources of payments

Selling software products. I have a table "licences". Each software licences is created due to a payment. I am creating tables to accept payments from different sources (e.g. manual or PayPal.) I'm ...
2
votes
1answer
158 views

Relationships between subtypes of an entity

I have a very big (hundred of milions rows) table which represent an entity (event) having many subtypes (different kind of recorded events). Each row is identified by an id (obj_id) and has an ...
0
votes
1answer
41 views

is-a relation(ERM) to tables

i try to design a database with an is-a relation: Vehicles have some general attributes and the SubVehiclesX have some specialized Attributes. SubvehicleX is a Vehicle And a Person has a Vehicle ...
2
votes
2answers
109 views

How to establish a Two-to-One table relationship (PK-FK-CK)?

My question is about DB design and its principles. I am working on a Python application where objects are mapped to database tables. I have Projects and People objects, mapped to their respective ...
3
votes
2answers
111 views

Can relationships have relationships?

I have the following requirements (as part of a larger system). In the database, I need to maintain a list of parts, suppliers who sell those parts. Many suppliers can sell the same part and each ...
0
votes
1answer
148 views

Advantages of middle tables in one-to-many relationships

Entities: Lists Leads What I am trying to achieve is a scenerio where in the relationship between lists and leads the following constraint is applied: A list can have many leads, but a lead can ...
2
votes
2answers
74 views

Several stays: many-to-many relationship

Could you please help me with the following problem? I'm a total novice in DB design. I have a table with researchers who visit our university. They come for some period of time (from, till). Now, ...
0
votes
1answer
80 views

Index optimization

I'm building a 'tag' system for my blog posts. Currently my tags table has columns tagid - MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY and tag VARCHAR(30) NOT NULL UNIQUE. And I have another table ...
1
vote
1answer
123 views

Separating tables vs having one table

At the moment I have a table setup that looks somewhat like this: create table tbl_locationcollections ( id int(11) PRIMARY KEY IDENTITY, --(Primary Key), name varchar(100) not null, ...
0
votes
1answer
107 views

Is it better to use multiple one-to-many relationships, or polymorphic?

I've got the following tables: Clicks table Websites table Ads table Both Ads and Websites have many Clicks (i.e. both models have a one-to-many relation with Clicks). In such cases, is it better ...
0
votes
1answer
125 views

Foreign Keys with Composite Key

Imagine I have a table with the following dependency: (Name, BoughtFrom, TimeBought) --> Cost Where the three attributes in bold form a composite primary key for the table. Now then, I want to ...
1
vote
1answer
192 views

Record with variable number of columns?

I am trying to model a cable mapping for devices. Each device has multiple cards, and each of those cards has multiple ports. Since both the number of cards and ports vary, I am confused on how to ...
1
vote
1answer
396 views

Modeling a ticket system based on a set of disparate kinds of tickets?

I'm working on a project that allows for the creation of "support tickets." These are not confined to something that needs fixing, however, so in a way they could more accurately be called "jobs." ...
-1
votes
1answer
112 views

What is the real-world purpose of an optional 1:1 relationship?

I know that one-to-one relationships can be used to split data into multiple tables for performance or security and that it is used to create a is-a-relationsship. But aside from that things, what is ...
7
votes
2answers
330 views

Best relational database structure for this data

I'm in the process of creating a database scheme for the following scenario: There are users Users have roles (such as "Developer" or "CEO") Roles have applications (such as "Topdesk") Applications ...
2
votes
3answers
468 views

Database Design Relationship for Patient Visit in MS Access

I am designing a database to store records for research purposes, and I am having trouble picturing how I can create a relational database based on the information I have. There are a total of 6 ...
7
votes
3answers
172 views

Arbitrarily ordering records in a table

A common need when using a database is to access records in order. For example, if I have a blog, I want to be able to reorder my blog posts in arbitrary order. These entries often have lots of ...
1
vote
1answer
150 views

Database Relational Design for Multiple Categories

I am building a database for participants who are grouped into studies. There's a total of 5 different studies - A, B, C, D, and E. The participants may be in more than one studies, and participants ...
1
vote
1answer
52 views

Correct data model for users with clients

I have an application where users are granted access. Part of the system allows users to have their own 'clients'. I have a users table ******************************** users ...
7
votes
3answers
2k views

How to have a one-to-many relationship with a privileged child?

I want to have a one-to-many relationship in which for each parent, one or zero of the children is marked as a “favorite.” However, not every parent will have a child. (Think of the parents as ...
0
votes
1answer
85 views

Looking for a scalable relational database [closed]

I'm looking for a database that achieves the following: fully ACID. relational with joins. has transactions. allows the administrator to specify sharding rules (for example: users from Europe should ...
0
votes
2answers
235 views

Relationships in a school database

I am designing database for a school app. Student is the main entity in the database. Student has relation with Parent & Guardian. I am confused as where to store references. As will student ...
4
votes
1answer
149 views

How should I model a worflow of status/activities ? (rules like “if is 3 go to 4, if is 4 go to 5” etc)

I'm trying to model a workflow (status and activities) to create "rules". Let me give you an example. The main "object" let's say are "vehicle requirements", I will have this table: idRequirement, ...
1
vote
1answer
97 views

Can I place the attribute in the Entity, when the foreign key is also already present?

I am using DBdesigner Fork for generating ER diagram. I have the 'Company' as an entity for which can I place the attribute of 'idShares', despite of having the foreign key of Shares Entity in the ...
2
votes
2answers
719 views

Database Design - One table for different types of transactions

Considering a procurement system as an example. Would it make sense to have one single table for the following: Quote, Order, Invoice and Credit Memo? There will be some details that are different. ...
1
vote
2answers
88 views

Table Design - Identical tables for different statuses

I am developing a transactional System and the below is a simplified scenario of my problem. Users enter JOBS in a system. A User first enters a JOBS with a DRAFT status (and the Job is given a ...
1
vote
1answer
902 views

How to model entities in an entity relationship diagram?

I'm a beginner Database designer and wondering if anyone can help me understand this. Let's say we want to design a system that has, among other entities, an entity called Vehicle, and another one ...
3
votes
1answer
362 views

Applying user-defined fields to arbitrary entities

Currently we have an old (rather crude) system that has user-defined fields, which are mapped against rows in arbitrary tables. This was an after-the-fact modification based on a customer request, and ...
2
votes
0answers
1k views

Schema for an RBAC (Role-based Access Control System)

I want to implement an RBAC, Flat based. I've decided to base my system on the NIST standardization model. Although all fine and well, I have an inclusion to that design. Instead of a hierarchy ...
4
votes
1answer
1k views

Designing a user authenication (Roles & Rights) module

I am trying to model a User Authentication module for a MS SQL Server database that will be the back end to a Delphi UI Application. Basically, I want to have user accounts where the user belongs to ...
3
votes
2answers
137 views

Which tables to create according to relations

We are planning a new system with a new DB (MS SQL Server). We have the following entities and the following relations: Entities: Clubs, Chains, PaymentTypes, etc... Relations: Clubs-Chains (M-M); ...
4
votes
1answer
117 views

unique constraint on a set

With reference to this SO question, what would be a correct way to implement Unique tag Combination Constraint in SQL Server 2005? To illustrate the problem, I make an example: A tag_bundle consists ...
1
vote
1answer
219 views

What is the correct way to store a list and its items in this instance?

The app I'm working on revolves around projects. Each project can contain several lists, and each list is made up of several items. Each list relates to a single project. Is it better to have one ...
4
votes
1answer
130 views

How can I improve this design?

I'm creating an event planning PHP/MySQL web application as a learning project. The whole app revolves around the idea of the event and its various components (participants, groups, lists, etc.) I ...
4
votes
1answer
399 views

How to use a relational database to store all users who belong to a group, and all groups which a user belongs to?

This is a beginner question: A user can belong to many groups, and a group can contain many users. Let's say the two tables look something like this: user_id user_name user_email group_id ...
5
votes
1answer
279 views

Database structure, relational or data warehouse?

Good morning, Im having some issues with how my database should be laid out and would appreciate some guidance. I have several tables (rainfall data), each containing the following columns: Date ...
5
votes
4answers
238 views

Database Design for updatable sequential records

I am working on creating a data model for storing data related to production tracking. I work for an engineering firm that models and analyzes data for our clients. There are several steps in the ...
6
votes
2answers
1k views

Is one-to-one relationship normalized?

Consider we have a large set of statistical data for a record; e.g. 20-30 INT columns. Is it better to keep the entire set in one table as they all belong to a record OR creating a another table ...
2
votes
3answers
322 views

Express union which is dependent on other results

I would like to make a union of two tables that are actually in a hierarchical constellation. How would I write that in relational algebra? Say table A is the parent of B in a 1:n relationship. ...
4
votes
1answer
357 views

Would appreciate some suggestions on how I should model this data

I am setting up a website that will have users. Users can search for songs and (if signed in) save them to a playlist or their library of songs. I want it to be like iTunes in that all the songs on ...
6
votes
2answers
260 views

Definition for “logical difference”?

I'm currently reading "SQL and Relational Theory" by C.J. Date. And although I'm quite far in the book, I've got a few basic questions. I want to know what the term "logical difference" means, The ...
6
votes
3answers
938 views

How to normalize Time Sheet data?

I am having a terrible time finding an appropriate way to store this data in a database. The current excel (simple) version looks something like this: http://i.stack.imgur.com/BEZOw.png Staff and ...
1
vote
1answer
218 views

How to design relationships for variant data?

Help me define the table relationships for data with multiple structures. I need to track leads. Leads come from multiple sources. Each lead source has its own data structure. I need advice ...