Database design is the process of specifying the logical and/or physical parts of a database. The goal of database design is to make a representation of some "universe of discourse" - the types of facts, business rules and other requirements that the database is intended to model.

learn more… | top users | synonyms (2)

0
votes
2answers
202 views

How to model medium.com paragraph comment

If you have used medium.com, I am interested to know more about how to model readers' paragraph comments in database. Specifically, how connections between these comments and paragraphs are modeled? ...
0
votes
5answers
57 views

Database with only text fields

I started working on an existing SQL Server Database System in which most of the fields are stored as text. Except some IDs all fields are varchar (phone numbers, zip codes, Dates, addresses, monetary ...
11
votes
5answers
927 views

Why does a UNIQUE constraint allow only one NULL?

Technically, NULL = NULL is False, by that logic no NULL is equal to any NULL and all NULLs are distinct. Shouldnt this imply that all NULLs are unique and a unique index should allow any number of ...
-5
votes
0answers
39 views

Roomwise track of beds sql server table design [on hold]

Well I am bit confused. I am a new student of SQL database. Today, I conceived of a system to track accommodation status in my hostel. I do not know how to plan the database field and constraints - ...
1
vote
1answer
80 views

Calculating a running balance to store with transactions

I need to put a read-only copy of balance and transaction data from a legacy system, which will only be used to view/print statements. Balance | id | member_id | product_id | balance | | 1 | ...
2
votes
1answer
117 views

Peer Review of Database Design

I'm working on a movie inventory database. This is a personal side project for me. I can use what I have, but I would like to make it the best design that I can while learning more about databases and ...
2
votes
4answers
67 views

Can't finish my ER diagram

I am trying to create a database for a small book library. This is not a professional project, just an exercise of my own. This is my first time to try this ( I am self-taught ) and I am encountering ...
-1
votes
2answers
37 views

How is SQL used from an end-user perspective? [on hold]

So I've been learning database manipulation and design and using SQL, but surely a secretary of a company wouldn't be using SQL to directly enter things into the database, so how does that work? For ...
1
vote
1answer
55 views

use of crows foot or chens notation to draw an extended ER diagram

I am trying to understand if we can use crows foot or chens notation to get an extended ER diagram. or does extended ER diagram has its own notations that should be used ? From what i understand, ...
1
vote
2answers
130 views

How to make a better Data model

I am creating a database system using MySQL for a group in my school (a University). I am new to MySQL and its usage.I have started with the data modelling process, since this process will be the main ...
0
votes
0answers
27 views

DB Model for Small requiremnt [on hold]

I have created below DB model. Could you please validate if this is proper. This is restaurant app where waiter takes order and gives it to chef.Before placing order she does have information of ...
-2
votes
1answer
31 views

Oracle Concurrent Insertion

We have simple case like Create table t1 (c1 number primary); session1: insert into t1 values (1); //session1 do not commit transaction session2: insert into t1 values (2); Will Session2 ...
0
votes
2answers
105 views

How to represent foreign key in an ER diagram?

Suppose I have a 'Transactions' table which has a column 'Customer ID' (Foreign Key) and a Customer Table having 'ID' (Primary key). How do I show the relation between the two tables and showing that ...
1
vote
3answers
31 views

Study material for Advanced Databases module inc SQL, Relational Model, ERM & TM [on hold]

For my next module in my masters, I am planning on studying Advanced Databases. (Long story short, the masters is designed for people with NON-CS degrees, so I have never studied databases, therefore ...
3
votes
1answer
282 views

Removing “duplicates” within a time range

I have a table that contains number plate data with a date and time stamp, collected by a plate-reading CCTV camera at a site entrance. Vehicles stopping at the site entrance will create multiple ...
1
vote
1answer
74 views

Reviewing relational database tables

I am building a database, but I am a little bit confused with my table relationships. I wish someone could help review my table relationships below for me and tell me where I am going wrong. I have ...
0
votes
0answers
56 views

Suitable database to store GPS track data

I have a network of vehicles. Each vehicle is equipped with a GPS sensor sending data over 3G to my FTP server. As a first solution to test the sensors, each vehicle sensor sends a .csv file to the ...
1
vote
1answer
56 views
4
votes
2answers
162 views

Group_by and having vs Joins when table is self joined 5-6 times

Now the situation due to which this question came to me. Schema is Table User_Read_Book user_id | book_id Now I want to get users who have read certain books. Say give me users who ...
0
votes
1answer
49 views

A question regarding the performance of normalization

I am sorry this is such a newb question, but it is one thing I am having a difficult time wrapping my mind around, and after an evening spent reading I finally just decided to ask for some ...
-3
votes
0answers
31 views

Design a queue and table in SQL Server as per below data [closed]

Design a queue that holds messages (varchar(100)) for any number of users. Each message also has a priority of 1, 2, or 3, with one being highest priority. When a user gets a message (DEQUEUE), they ...
1
vote
1answer
147 views

Enforce a constraint problem

This business model is for a case management database. This is closely modeled on the idea of a file folder representing the phase and a sequential checklist representing the stages. A case consists ...
0
votes
1answer
110 views

Duplicate Relationships in Rails/MySQL Healthcare Application

Overview of the Application I am building a Ruby on Rails application to organize medications, using MySQL. The goal of this application is to provide dosage specific treatment recommendations, and ...
2
votes
1answer
157 views

Database design for a table with both bulk insert and single row insert

I have to design a table where records will be inserted in two ways. Bulk insert from a batch process from a delimited text file between 2 - 3 million rows in a short burst. Later the same records ...
2
votes
1answer
328 views

How to normalize my db schema for a quiz application?

I am putting together a quiz application. (I'm calling each quiz a "challenge") I have a "challenge" table and a "challenge_question" table which is pretty straightforward. challenge table: id ...
1
vote
1answer
84 views

CRM Address table and it relation

Hi I want to ask about I have this DBD for my CRM I am trying to have the addresss in one table(customer and Employee Address) and both customerID and Employee ID are guid I have in address table FK ...
4
votes
1answer
458 views

Database table design question

Firstly, database novice here. I'm trying to create a system for processing Sales Orders into Purchase Orders and then split the Purchase Order into Shipping Containers. The systems needs to be able ...
1
vote
1answer
30 views

Question about the workflow/design process/tools used by professional database designers

I hope this in the right place, as it's really more a question about database design software than the philosophy and practise of database administration. I'm a masters student doing an "introduction ...
2
votes
2answers
45 views

Best practice design when expecting large data in a table

I have come across a way that kind of works for me, and was just wondering if it would have any side effects, or, if I'm just thinking about this the wrong way. I first had this idea when I was ...
1
vote
0answers
35 views

triggers vs views [on hold]

I have a mysql database with the following tables Penalties Scores player_instance When penalties is updated/deleted then it will update scores (via a trigger). Also when a player-instance row is ...
0
votes
1answer
30 views

Should there be a temporary table to hold Order and OrderItems? [closed]

After trying out a few open-source restaurant POS, I still couldn't decide if there should be a temporary to hold Orders and OrderItems? I was initially thinking to have temporary tables and ...
0
votes
1answer
494 views

Storing multidimensional array in MongoDB

I am attempting to convert a large MySQL database of product information (dimensions, specifications, etc) to MongoDB for flexibility and to move away from the restriction of a column based table. I ...
1
vote
0answers
18 views

Multidimensional aggregates

Suppose one wanted to cache simple aggregate data over a table or grouped parts of a table, one could simply make a table with the aggregated results. If the original table is only appended to, it is ...
1
vote
2answers
52 views

Dimension or Degenerate Dimension?

I am taking a course on data warehousing. Currently, I am reading through Ralph Kimball's Data Warehouse Toolkit. I understand that a degenerate dimension is a dimension key that is stored in a fact ...
0
votes
0answers
19 views

Best cassandra data model for implementing newsfeed [closed]

I am trying to implement newsfeed( similar to facebook). My application is running on geographically distributed AWS instances. Cassandra (2.1) seems to be the ideal candidate (Please suggest ...
0
votes
1answer
74 views

Text Storage and Database Design Optimization in a SQL Server Database

Given a database with a number of columns (c), where some of these columns contain text that is one of multiple values due to a set CONSTRAINT on the columns, what is the most efficient way to ...
1
vote
1answer
22 views

Saas MySQL Multiple Databases or One Database [closed]

I am using MYSQL so Database is the Schema, sorry if not using right terminology. I currently have a Saas product which has multiple databases one for each client with a main databases which we ...
2
votes
1answer
205 views

SQL table architecture

I'm looking for a SQL architecture solution for the following problem. The idea is that I have a validation form that contains the client's data. Each client can log in to his account and edit his ...
0
votes
1answer
24 views

Does the creation of constraints affect the views that have been created earlier?

Does the creation of constraints(foreign key) affect the views that we have created earlier? create view allreservations (fno, customer) as SELECT f.flight_number, customer_number FROM flight f, ...
2
votes
0answers
20 views

CouchDB and document versioning

I'm currently working on a wiki-esque application using CouchDB and am trying to implement a document versioning scheme. The way I see it there are two ways of doing this: Store each version as a ...
0
votes
2answers
24 views

about giving same column name in every table of database

I have a database with 5 tables. In every table there is a column for checking status. If i give the name to that column which is same in all the 5 tables; What will happen? Is it correct according ...
2
votes
1answer
609 views

Designing a reservation system schema

I am not sure if this has been asked before, however I am tasked with designing a new reservation system for my organization We have an older system which simply stored the booking in a table, and it ...
0
votes
3answers
401 views

Rent weekly cost database design

I have a database which contains a table BUILDING with in each row details about some building, another table BUILDING_UNIT contains rows with details about a single building unit which refers with a ...
0
votes
0answers
10 views

Database & Structure for SaaS reporting software

I'm building a SaaS application to allow users to upload data and perform reporting and analytics on it. The reporting and analytics would be quite simple like grouping and aggregating. This has ...
0
votes
0answers
30 views

How to select column names that contains specific value from other table's column

Suppose I have table items and logs. Both tables have col1, col2, col3, col4... col(n). col1.. col(n) in table items simply specifies key name (col1 = "beef", col2 = "chicken", col3 = "bacon") ...
0
votes
1answer
35 views

Postgres table contains 1 column, and that column is PK. How to insert new record?

In my application, I have an abstract base class, and 2 derived classes. The number of derived classed will probably not increase. If it does, it won't be more than a few. The class structure looks ...
1
vote
2answers
56 views

Help in designing mysql table for large project

I am planning to create a website which allows different Companies to register in it. It will have Employees module. Each company will have a CompanyId. How do I maintain the Employees table, since in ...
4
votes
1answer
793 views

Designing a database for a site that stores content from multiple services?

I'm building a site that implements David Allen's Getting Things Done that pulls in your email, Facebook newsfeed, tweets from those you follow on Twitter, and more services are planned. The problem ...
0
votes
1answer
33 views

ERD Design for Employee Leave

I found the following ERD design: Which trying to capture as much information about employee leave (i.e sick, travel, etc). What am trying to understand is what does the columns: Table : ...
0
votes
1answer
53 views

ORM for Image model

I'm uncertain as to how a certain table should establish relationships, and I feel as if the solution I came up with is incorrect. The images table is used to store an absolute path on a server ...