The logical model and/or physical design of a database.

learn more… | top users | synonyms (4)

-1
votes
0answers
27 views

Normalizing compound surnames

On the road of generating a unified Individual (person) database within a framework that admitted same person to become several IDs I've come to the the not so discussed dilemma of the compound ...
0
votes
1answer
63 views

How to use a table when the user identifier can be one of two fields

Recently we've started developing Github like organisation system for our service. We have both free and payed plans. There are users. Also there should be the owner for organisation and the owner ...
0
votes
1answer
35 views

Database extensions vs migrations [closed]

When using of database specific features (instead of 3rd party solutions) is justified, especially on the beginning stage of the project? Example: Postgres has full-text search, which do not support ...
0
votes
1answer
55 views

I Need Help With My Database Design for Product Management

I'm designing a MySQL database and the front end for my work. The database will store all of the products that we sell on our marketplaces and their relevant data. We will be able to lookup products ...
2
votes
0answers
57 views

Anchoring values for a rating or likert scale

I am designing a schema for an interview system as per the suggestion in this answer. I need to store several different types of questions: Questions with a free-text response Multiple choice text-...
1
vote
1answer
25 views

SQL Server Table Design for Report - Is OLAP Schema Suitable

A work colleague is developing SQL Server database tables for a reporting project. Basically, the only activity on the table will be populating it from a ETL process (SSIS). He insists on creating a ...
1
vote
1answer
59 views

Questions and answers database design for Core Data

I am designing database for a question and answer projects , and I am stuck. I do not know how to do it. Here is information: There will be many users There will be many questions Each question ...
2
votes
2answers
55 views

Database design - summary table vs always counting over tables

Imagine a system where a user can make a whole lot of different actions, like: Making a purchase Liking something Opening a specific view (pretty much every click) Inviting a friend ... The ...
1
vote
1answer
52 views

How to deal with a chain of several linked 1:n:n*m:n*m*k “join” explosion?

I have a domain model, where I have a "manager" which has 1:n relation with another resource (A). A has 1:n with B, and B has 1:n with C (it makes sense as a relation). However I'll need a lot of ...
-4
votes
1answer
74 views

How does indexes work in a database? [closed]

If I have a list of name that are all different and I have to find a specific name,how could indexes help.thi research?How does index work in a database?I have read other discussion but I haven't ...
0
votes
1answer
53 views

Set indexes for database used for login and register actions

I am thinking on how to set indexes to improve performance of a database for register and login actions.I have seen that alphabetical indexes are not good so I don't know how to do...Can you help me?...
4
votes
6answers
377 views

Database design for an exam

I am designing database for an exam, and I am stuck. I do not know how to do it. Here is the relevant information: Student answers 10 questions. Each question has 3 options (answers) and student ...
1
vote
1answer
37 views

Simple Database Design - Many to many? - First database (newbie)

This is my first database I am designing. However I am getting confused on the many to many relationships. I have a products table, each product can have inventories in many different warehouses. So ...
3
votes
3answers
176 views

Database architecture

I am in the early stages of designing a database, and I have little (none) database design/planning experience. The database is part of a job tracking engine.. As jobs are created, they are assigned ...
1
vote
1answer
23 views

Using Case with no column result

I made this solution but it continues not returning any value If the user not exists. select case when TypeId = 1 then 1 when TypeId = 0 then 2 when count(1) < 1 then 3 ...
1
vote
2answers
41 views

How to model that several variants of a merchandise item may affect its price?

I am an absolute beginner to relational data modelling. I hope my question will be acceptable here nevertheless. Let’s say there’s a merchandise. An item of merchandise may have variants. (While it ...
1
vote
2answers
37 views

Best practice for parent child relation

Suppose, there are some tasks and some sub-tasks under those tasks For example: Task 1 Sub task 1.1 Sub task 1.2 Sub task 1.3 Sub task 1.4 Task 2 Sub task 2.1 Sub ...
2
votes
1answer
57 views

What is the cardinality of entity relationship between Employee and Department?

Recently, a friend of mine asked me this question about the cardinality between a Department and Employee entities, I replied many to many, then he, my friend, showed me drawings from the internet ...
3
votes
0answers
106 views

Inputting auto-incrementing, grouped, unique hashes?

Alright, here's what I've come up with so far: SET @id=(SELECT IFNULL(MAX(id) + 1, 0) FROM leads); UPDATE leads SET id=@id WHERE id IN ( SELECT id FROM (SELECT * FROM leads) AS something WHERE ...
1
vote
1answer
38 views

Booking database design with a twist

I'm wanting to find a way to how I can implement a booking system that lets users put a start date on the booking and generate the end date whenever. Lets take a house renting example. Say I wanted ...
3
votes
1answer
27 views

How to decipher entity relationships in a Physical Data Model given the corresponding Logical Data Model

Can someone use the entity relationships in this Logical Data Model (LDM): to explain the entity relationships in this Physical Data Model (PDM): and how to specify the foreign keys in the PDM?
1
vote
0answers
14 views

does insert “logs or traces” into RDBMS (example log4j) makes sense? What are pros and cons?

Our developers are inserting Java logs into a table. This table can grow very much (for example debug logging enabled) and I need to to truncate table. Our database is for OLTP. > desc ...
3
votes
1answer
44 views

How would i create a report involving multiple many to many relationships

Lets say table A has a many to many relationship with table B, and table B has a many to many relationship with C. Two junction tables are created for AB and BC to form the many to many relationships. ...
4
votes
2answers
42 views

Database Design (how to handle subclass & superclass)

I'm wondering what is the best approach to this type of problem (I'm a highschooler so don't have practical knowledge on the subject): Let's say I want to store information about employees at a zoo. ...
1
vote
1answer
29 views

Design: How to account for a custom product in a transaction item table

This question is related to Database Design: inventory and sales system? So for example a burger is a Product which is made up of Component bun, meat, cheese, pickles etc. When this burger is sold it ...
0
votes
0answers
25 views

one Comment table for all content types or many tables for each content type

I have a very similar question with this stack overflow link but since its not answered I had to post it again. I have many place which people can place comment: file download, biography, blog and etc....
1
vote
2answers
30 views

Bridge table question

Should be a simple questions, I just want to make sure. If I had 2 tables I want to bridge, for example food (food_id, foodname, ...) and a plate (plate_id, platetype, ..). When the tables are ...
0
votes
0answers
32 views

Final Unique Index for Person and Companies?

I am creating a persons schema where the the person table must be very simple because it will be father of other tables that completes it, but a person can be fisical or legal, so I wont put any ...
1
vote
0answers
53 views

How does one map nested multi valued attributes?

Let's say one has an Entity E. E has a multivalue Attribute M1 and a simple attribute A1. However M1 consists again of a multivalue Attribute M2 and a simple Attribute A2. How would one map this ...
2
votes
1answer
60 views

SQL Server 2008: how do I hide data from a DB Maintainance User?

Our organisation employs a third party company to do maintenance on our database. To be honest, currently they act as our DBA's since we do not have one. In order to do the maintenance work, they ...
3
votes
2answers
46 views

Table with N associations

Suppose I have three tables: meta_tags, users, posts. (just an example) Users and Posts both could have tags, so my meta_tags table could be structured like meta_tags - user_id - post_id - ...
1
vote
2answers
140 views

Efficient workflow/queries to save unique information?

I am saving company information in a database. There is a single table with an auto-incrementing key that is unique to each company. There are separate tables for emails, websites, phone numbers, and ...
-1
votes
1answer
71 views

What are static tables & dynamic tables?

I heard the term "static table" when I'am learning about dirty reads in database. Can anyone explain what is a static table and what is a dynamic table ? Thanks in advance.
0
votes
1answer
43 views

Database design for changing data

I'm trying to design a database to store information about an entity. This entity will pass through 5-6 stages. In every stage may happen some property modifications. It is necessary to have access to ...
0
votes
0answers
46 views

Should I make a new table to store date?

I want to store date on which users sign up on my site. Since on a given date several users will be signing up, there will be repetition of data. Should I make a new table to store date to make it ...
3
votes
2answers
246 views

Non unique one to many relationship

I am a noob to database design so bear with me. I have two tables in Microsoft Access: Table 1: | ID | Field1 | Field2 | |:---|--------|:-------| | 1 | A | 1 | | 2 | A | 2 | | ...
3
votes
1answer
101 views

How can I avoid this circular relation?

I based my account/user table design following this article. So I have set my table relationships to look something like this: User <- Memberhip -> Group -> Account With this design, a ...
1
vote
1answer
41 views

News Database Design for a Desktop Application

I am making an application that will process a big chunk of information. This information was retrieved using some web crawlers and is about news, containing data such as News Title, URL, Publication ...
2
votes
0answers
87 views

Choosing database for large set sum and difference

I am creating application, with one server node and multiple clients. Each client holds Set of Strings, that will need to be stored in their own local database. Once a day, all clients will send all ...
0
votes
1answer
21 views

Multi-level confirmation process

My problem: I'm designing a system, that will have multiple administrators with different administrator levels (level 1,2, ...). When a user logs in and creates something (eg. organisation), all of ...
1
vote
1answer
77 views

Are Database duplication and Mirroring one and the same? [closed]

I am going over the concepts of Distributed database management system. I read about duplication and replication. Then there is also something called Mirroring. I googled to find if duplication is the ...
1
vote
1answer
82 views

Database Design question

I am currently interning and one of my tasks is to design a relational database model for a wedding firm that plans and handles weddings. There is a user log in, and the users will be bride, groom, ...
1
vote
2answers
73 views

How to decide that a new table is needed?

This might seem a vague question but I am going through a bit of a dilemma here. How do you people decide when a new table will be need? For example, when creating a table for storing user ...
16
votes
2answers
412 views

Using MAX text or more specific, smaller type

Someone was reviewing my DDL code for creating tables and suggested, when they saw I saw using VARCHAR(256) fields for text I expect to be pretty small, like a first name or whatever, that I should ...
2
votes
1answer
65 views

Unusual database design - any benefits?

I've started working with an application that has an usual design: In addition to the tables that contain the actual data, there is one metadata table that contains all the information about the ...
0
votes
2answers
48 views

Should every table in my database include store id?

I am designing single database for multiple stores. Every store may have different products and stock. should i have to include store_id in every table in database. my database looks like this
1
vote
2answers
32 views

Best practice for multiple 0,1 to many relationships

I'm an application developer without a ton of database design experience and I'm wondering if someone can suggest a design/implementation for relating one table to one or more other tables. For ...
16
votes
8answers
3k views

Why would a primary key value change?

I have been researching the concept of ROWGUID's recently and came across this question. This answer gave insight, but has led me down a different rabbit hole with the mention of changing the primary ...
1
vote
0answers
33 views

Storing Business Logic in Tables rather than Stored Procedure or Application

The requirement is that once the product has been delivered, user can update the logic as he wants. An example of logic I have is follows- An institute teaches English has following requirements - ...
15
votes
3answers
570 views

Implementing subtype of a subtype in type/subtype design pattern with mutually exclusive subclasses

Introduction In order for this question to be useful for future readers I will use the generic data model to illustrate the problem I face. Our data model consists of 3 entities, which shall be ...