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

learn more… | top users | synonyms (4)

0
votes
0answers
38 views

How to map this ER model to actual tables?

Suppose we have an ER-design problem like this: A pharmaceutical company sells its products throughout a country. For the ease of sales, the entire country is divided into some Areas. Areas have ...
0
votes
0answers
16 views

Please help modeling this basic scenario

I've already asked in stackoverflow but I think I was not clear enough and I couldn't get the answer I was looking for I'm trying to modelate a situation and I have a lot of doubts about wheter the ...
1
vote
1answer
33 views

Multiple increments in table

Let's say I have a table which stores different bills. There are multiple departments using this database and every department needs to use their own incremental numbering for the bills. I do not ...
3
votes
2answers
51 views

How can I get dates that wrap around new year from non-datetime columns?

I have a table in my MySQL database that stores daily data (an entry for each day of the year), but does not use a DATETIME column for this. This is because the data is the same for every year (it's ...
2
votes
2answers
54 views

Understanding relations

Since english is not my first language i find hard to understand this paragraph that i'm reading from "Database Fundamentals" book. I'm trying to figure out, in practice, real world, what this ...
2
votes
0answers
41 views

Any drawbacks to referencing multiple tables from a single column?

I'm working on a system with the following entities: Projects Sections Activities There is one important constraint that needs to be enforced: Activities are always part of one project. ...
0
votes
0answers
58 views

Database design for storing historical stock exchange Level2 (depth) data

I am developing C# software using embbeded SQLite Database which shows historical level2 (market depth - asks/bids) stock exchange data graph. Example Simply speaking, there are 25 asks (price, ...
1
vote
1answer
50 views

SQL Schema Change; Modification of Existing Table vs Creation of New

We are planning the data schema for our project. Currently we have a table with classifications, but there is the possibility of a new classification in the future which would require a new field to ...
1
vote
1answer
41 views

Need help on database design

I have a huge database of library system but I have a problem on how to design tables on this database. This is because I have under one entity (for example AUTHOR) a lot of repeatable fields. So I ...
0
votes
1answer
48 views

How would you design a table for approval system between User and Sports Club

I am currently learning database modelling and struggling to model the following requirement. I have a user and sports_club table. User can only join a sports_club if three existing users of the club ...
0
votes
1answer
64 views

SET or VARCHAR for list of tags in a MySQL photos table?

I just discovered the SET column type for MySQL tables. I have a photos table with ARIA engine where I want to store tags/keywords for each photo. Now I use a VARCHAR type and then find the photos ...
0
votes
0answers
16 views

build users availability report/Table (using sql)

I got a question from our product team to build a "Table availability of customer service representatives (user)". f For example : user_A was available to accept a call from 12:00 to 12:03, so I have ...
0
votes
0answers
19 views

Structure of an SQLite database for storing analytics with counters and hits

Before making this post, I referred to this and this which contain extremely complex solutions and hence, this question: I am building a spam filtering app that takes posts from a feed and deletes ...
0
votes
1answer
18 views

How can I differentiate between a Multivalued Attribute and an Entity?

While designing ER Diagrams, how can we differentiate between a Multivalued Attribute and an Entity? How can we know that, what we are considering as an 'Entity', isn't actually an entity but a ...
0
votes
1answer
57 views

Normalization from UNF to 3NF

I keep getting confused trying to normalize this data. A company makes and sells a product online. There are ten types of Products, each having a code and price. Their Sales Order department takes ...
0
votes
0answers
13 views

ER diagram when having a condition

Can someone explain to me or point me to to the link on how to draw diagrams that have conditions. Example : you got a booking website that allows regular people to book or rent a room at some hotel ...
0
votes
1answer
45 views

Single-Table vs. Multi-Table design

I'm trying to come up with a database schema which is going to be used for a social network similar to that of Facebook. Now for posts I have two schemas in mind which are as follows: Single-Table ...
0
votes
2answers
41 views

Define a db before coding

I'm starting to code time tracking application to replace the monthly excel sheets my company is requiring. Its purpose is standard : to centralize all data about the time spent by different(or same) ...
-1
votes
2answers
46 views

MySQL Server Disappeared

I haven't used my MySQL local server in over a year. Today I tried to get in to it, and the server seems to have just vanished. I've been searching a troubleshooting all day and have gotten nowhere. ...
1
vote
1answer
152 views

Hotel Management database

I need help with the design of my schema. I'm almost new at this and I'm not sure whether my relationships between the tables ROOM, GUEST and RESERVATION below are correct. Also, I have problems ...
3
votes
1answer
175 views

Best way to model a single user with multiple usernames

So I'm looking to write a website where a user will login with their email address and password, but can have multiple usernames. The context is a social gaming website. This may result in a user ...
0
votes
1answer
21 views

Should i separate ContactInfo (sub-entity) from MyTable (main-entity) or Not?

I am designing a database of a school management system. I have one to one relationship of MyTable with ContactInfo table. I am confused whether I separate contactinfo from MyTable or not. ContactInfo ...
1
vote
2answers
79 views

charindex wrong result

Charindex returns no record if only one letter is provided. If parameter matches the whole word it shows the record. Why??? USE [database] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER ...
1
vote
0answers
21 views

DATE - Normalization, a multiple ranged query, multiple inserts and multiple update

I have a booking system, airbnb style. TABLES -> prices, house, available_date A house has available days and not available days, but sometimes the days have different prices. A weekend is more ...
0
votes
1answer
32 views

Data model Reference and schema

I just started to learn MongoDB database and for my project. I am trying to implement a MongoDB reference schema. In my Menu table I would have a food ingredients attributes where it will store the ...
1
vote
0answers
29 views

Understanding Normalisation [closed]

I have a test coming up regarding the 1,2,3 and BCNF Normalisation. The biggest problem understanding I have is from how to convert from 3 -> BCNF. Firstly how to know if the tables are already in 3NF ...
3
votes
2answers
137 views

Is this in 1NF?

I'm an A-level Computer Science student, and my teacher can't explain how to get me from UNF to 1NF. I've researched a little, but I'm not sure as to whether this table (below) is in 1NF or not. I've ...
1
vote
1answer
73 views

Social network DB model in MongoDB

I am building a story site for pre school The basic functions are students will be posting stories and others will be able to like/comment on that story Below is the model of the DB Stories ...
2
votes
2answers
201 views

Relational Design - One table, two foreign keys or Two tables, one foreign key each

Looking for some advice related to optimal design in the following scenario. There is a Cases table (represents cases of inventory) There is a LocationInventory table (represents locations with ...
2
votes
2answers
118 views

Best data modeling approch to handle redundant foreign keys in relational model

I am looking for advice on the best relational modeling approach to store surveys, questions, and responses. I am looking for which of the two approaches below looks best, or an alternative approach ...
0
votes
1answer
103 views

Hi-Level, Beginner Question About Snapchat Database organization

I am a high school student who is interested in developing apps and learning more about databases and servers, so please bear with me if this is the wrong place to ask or if it's a obvious answer. I ...
0
votes
1answer
52 views

multi valued attribute as primary key

I am designing a database system for my current project and got this situation. I am having a functional dependency as D -> E Here D is multi valued attribute. D can be(i,j,k) or (i,j) or any ...
0
votes
1answer
85 views

Derived classes with same base class and class specific ids

I have three classes in my project. One base class and two derived classes. public class Animal { public long Id { get; set; } public DateTime Created { get; set; } public string Name { ...
1
vote
1answer
58 views

Really big LOG backups on a DB with Image field

Normally, our log backups has < 10MB size In a big database with a lot of transactions per hour ). But now we have a database, that is storing Images on a Image field. the problem is, the ...
1
vote
3answers
76 views

Is it a good idea to use a personal number as a primary key for a customer table?

We are designing a new system to handle customers at our firm and me and another developer are split on wether we should use the customers personal numbers as a primary key. My preference would be to ...
0
votes
0answers
45 views

Parse - Database structure for a users added friends/contacts

Sorry if this is a very basic question but I'm new to databases. I've built an Android application that uses parse as a backend to store data, I'm able to register new users, log in, log out etc. The ...
0
votes
1answer
37 views

possible/available appointments table

I am building an appointments web app...the user will be able to see available/closed appointment slots for a business entity. I am trying to use this schema here In it, there is a possible ...
0
votes
0answers
43 views

How much normalization is too much

I am working on designing a database for a site I am trying to build, I created what I believe to be the best normalization strategy, to limit the size of particular tables, and the number of tables ...
0
votes
0answers
19 views

How can I organize this data?

I have been working in a system but don't know how to represent some of the data and its relations. There are three warehouses and a four shops working with the system and until this moment we can ...
2
votes
1answer
79 views

Is it ok to have 'view count' column in the same table?

Let's say I have a website similar to YouTube where I'm storing and displaying the 'view counts' for each video. It is ok if I'm storing the view count column in the same table as the actual view ...
2
votes
1answer
26 views

Can i pair multivalued attribute with an entity?

If i have the following scenario. Every doctor can diagnose a disease for different patients. A diagnose holds a date and disease(multi valued attribute). So the patient has testing that need ...
0
votes
0answers
46 views

Design for a multi-tenant multi-version database

I have a separate restaurant POS (point-of-sale) databases for each brand (where brands are: Pete's Burger Bar, Stan Seafood Palace etc) that I want to combine into a single multi-tenant database. For ...
1
vote
2answers
46 views

Update a table after insertion to another table in PostgreSQL?

Let's say that my database has 2 tables (Person & Car): Person (personID, number_of_cars) Car (carID, owner) where the owner attribute in Car refers to the personID in the Person table. Now, ...
0
votes
1answer
39 views

table design for display content

In my previous work station, I saw them have a table design across all website they have worked on displaying editor content like this: column|page_id| title |content_1|... |content_n| lang ...
2
votes
1answer
34 views

Class- and instance- type rows

I have a problem, which I expect is very common, but I am not sure what to search for, as it can be explained in many different ways. I am designing a database structure for managing invoices, ...
1
vote
0answers
24 views

Which Azure Storage / Database Technology to make use of for large scale logging

I am looking into making use of Azure hosting services in order to develop a logging service for our company. Azure has a number of storage options available (I have listed links below). However I am ...
0
votes
0answers
19 views

Database design: history - transactions, states, durations?

I have not delved into this type of db info before, and it seems foreign to me what I need to do. So I would ask if this seems familiar to you, and is there a way this is generally done? (And would ...
0
votes
1answer
29 views

Storing shipping details in orders table

Have orders table and among columns the following: shipping type, shipping service provider, delivery type and shipping address. Let me explain what these are. User can choose between two shipping ...
3
votes
1answer
62 views

Designing Contacts

I've to create a DB structure which involves users, contacts, organizations and vendors. To break it down: We have a system with users (employees who use the the system). then these users add ...
1
vote
0answers
30 views

Relational Model

I would really appreciate if you could check my answer for a relational model question. I just started learning. So please bear with me and please guide me through the right process. Consider the ...