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

learn more… | top users | synonyms (4)

0
votes
1answer
41 views

Altering column data SQL [closed]

I have a set of car data, one of the columns represents the registration year. I want to change this column to age. As the data is from 2010 I assume that the following statement should calculate the ...
2
votes
1answer
83 views

Many to many between lots of tables?

TL;DR: How could I set up many-to-many relationship between that many tables and is it viable/recommended? Each body type has its own table Each car in each body type table can has several features ...
1
vote
1answer
40 views

Why does 3NF Normal form allow transitive dependency of prime attributes?

I'm just a beginner in Relational Design, When i came across the definitions of 3NF and BCNF. According to 3NF, Any non-trivial functional dependency X-> A shouldnt exist unless X is a super key or A ...
-1
votes
1answer
33 views

Multiple references to another table, but I don't know how many

I have two tables in a database, folowwing this model: scientists : id (int) | name (varchar) | surname (varchar) | publications (int) publications : id (int) | fulltext (varchar) I would like to ...
0
votes
1answer
38 views

How to create a table in access and automatically fills it with information from a query? [closed]

Is it possible if I create a table that will lookup for a value filtered from a query (consult), in this case is duplicated "Name"s from a Employees registring table and automaticly fills up that ...
0
votes
0answers
21 views

Product Features table for No Sql Databse

I want to design database to save products features. Actually i want to store all features of mobile given on this link http://www.gsmarena.com/samsung_galaxy_j7-7185.php After search on google i ...
0
votes
0answers
54 views

Normalized college database desgin

I am trying to create a college course database. The College offers UG and PG courses in various departments. Departments include program streams like MCA, MBA, and Engineering. MCA courses may be ...
0
votes
0answers
28 views

Modeling a database with UML scheme and every type of relations

Good evening! This is my second database designing, the first one can be found here. I want to find the relational scheme of bridal registry database given in the following French UML graph: I ...
1
vote
1answer
38 views

ON DELETE CASCADE doesn't work even storage table is InnoDb

I tear my hair with the ON DELETE CASCADE Clause. In fact I have two tables I'm on linux and I have installed lamp with phpmyadmin. That's the tables : CREATE TABLE a( Idatable bigint(20) ...
2
votes
0answers
48 views

Looking for suggestions to model a database of Electrical Components

We have a database of electrical components and I am trying to make sure I have a good design. I am not a database designer (my comfort zone is designing with these hardware components), so I am ...
7
votes
2answers
178 views

Normalizing a table with a field that generally uniquely identifies a row, but is sometimes null

forgive me if this has been asked and answered before. I'm roughing out a schema for an inventory management system, to be implemented in PostgreSQL. All of our products and services have a sku. ...
0
votes
0answers
19 views

SQLite text columns

When having a table in SQLite that has a TEXT data type, is there any implication if the length of the contained string differ significantly?
2
votes
2answers
80 views

How do I guarantee inventory numbers are unique across all tables?

I have an assortment of physical objects which need to be inventoried and each type of object has it's own table. For two example objects, let's use 'swords' for the table containing different swords ...
1
vote
0answers
33 views

problem with column oriented dbms features

I am currently looking for a free(or at least low cost) column oriented DBMS with really good compression abilities (at least 10:1 ratio) and fast response time. Having evaluated multiple open source ...
1
vote
0answers
24 views

Database design for different, but related, objects

I'm new to relational databases having enjoyed the flexibility of nosql to date. I want to store data about 'estimates'. An estimate takes a set of parameters that depend on which product it is an ...
0
votes
1answer
47 views

Foreign key as part of composite primary key or not?

I'm designing a relational database. This is what I'm trying to design: I will have production orders and products. A production order will have one product, but a product could be on zero or more ...
0
votes
0answers
23 views

Data Modelling of product and product variations

I want to model product and product variations using mongodb (mongoose) I am really confused with how shall I model both I need to add stock and price to variations. Variation can be of anything (not ...
3
votes
2answers
58 views

Is it a good approach to duplicate data in a database?

I have a program that needs to store traceroutes (among other data). Here is a diagram that depicts the business scenario: My use case right now is to store the traceroutes using the following ...
2
votes
1answer
78 views

Unique key based on many-to-many pivot table

I have to manage artists and albums tables: | artists | | albums | | album_artist | +--------------+ +--------------+ +--------------+ | id | | id | | id ...
3
votes
1answer
41 views

Store the content book in database, so that it would be updated afterwards or store them as document?

I have some books in (urdu) made with Urdu Inpage(tool for making pages in urdu) like this: problem that these document files are difficult to read in php because they gives unread-able characters, ...
1
vote
0answers
19 views

Time series data and utc conversion

I'm storing data in minute, hour, day, month and year buckets. All data is stored in UTC. Let's assume a client is in PDT time (-07:00 UTC) If the client wants to query for the hour sum of 4/23/2016 ...
1
vote
1answer
50 views

Limit the number of records depends on the part of primary key

I created database for football matches. I have 2 tables with a many-to-many relationship, so I also created a junction table: Referee CREATE TABLE referee ( id_referee INT IDENTITY PRIMARY KEY, ...
3
votes
1answer
57 views

How to represent the optionality of a many-to-one mandatory relationship from the Parent to its two Child entity types in an ERD?

I have a Parent entity type with two Child entities, with a relationship cardinality of many-to-one (or M:1) from Parent to Child. The business rules say that: It is mandatory that the Parent ...
1
vote
1answer
44 views

How to design a database for query builder project?

I have this project in which user can create queries using web based UI in which there will be list of columns and applicable operators. Later users can edit these queries, too. So I need to store ...
0
votes
1answer
69 views

Designing table for document annotation with future columns

I am working on a web application that allows students/researchers to annotate PDF documents shallowly by (manually) counting interesting phenomena. Right now, there is a total of about 45 of these ...
0
votes
1answer
63 views

FK Issue with Fact Table

I have a Datawarehouse star schema. One Dim table is 'DimTweet'. This contains tweet details. For a selected date I want to be able to display the number of tweets. However, I have a problem in my ...
2
votes
0answers
47 views

Clustered index on a fact table

I'm trying to work out what field(s) to use for the clustered index of my fact tables (which all have a similar structure). I'll use FactSales as an example: CREATE TABLE dbo.FactSales ( ...
1
vote
0answers
21 views

Varchar PrimaryKey. Clustered or nonclustered? [duplicate]

I am working on a legacy database. The primary key is clustered varchar(128) and the table contains a high volume of data. Does it necessarily help performance if I change the clustered PK to ...
2
votes
1answer
24 views

Count of range on datetime in MySql

I want to group table entries for each userId only if they are consecutive entries in the table. I have a table like this. id userId transactionTime 1 1 2016-04-13 22:15:44 2 1 ...
0
votes
1answer
25 views

Design question

I want to implement an extension to my following table Object table == building in generall +--------+-----------+------+--------------+-----------+-------+------+ | obj_id | obj_ident | name | ...
1
vote
0answers
44 views

Ternary relationship with history tracking

I have the following entities Procedure -> id_procedure , desc_procedure . Status -> id_status , desc_status . Subprocess -> id_subprocess , desc_process . The rules are: 1 ...
2
votes
1answer
31 views

Avoid circular reference with configuration tables

I've got a few tables that define configuration information. This defines what combination are allowed in the system. However, I've got a circular reference on ProjectName which can cause potential ...
3
votes
2answers
159 views

Best fill factor for GUID clustering key

We have a database that uses GUIDs for most of their columns in a data (non sequential). Does anyone have any best recommendations for fill factors on a GUID database in an hgih insert/update database?...
2
votes
1answer
22 views

Multiple columns from one table rely on one single table

I'm working with PostgreSQL 9.2 and have the following relation between 2 tables: The table town stores a list of town codes. The table perimeter stores perimeters denomination. Towns are almost ...
4
votes
1answer
165 views

Storing Friendships: Should I use a multivalued column to retain Friend Identifiers?

Say I have a table called UserFriendList, which has the columns: Id (set as Primary Key) UserId FriendListIds And let us suppose that said table holds the following data: +----+--------+--------...
0
votes
1answer
35 views

DB Design - 1 column for each dataset OR dataset_name AND dataset_value?

I am creating a database table for storing numeric time-series data sets regarding cities that will be accessed via a web app. Primarily annual, quarterly and monthly data will be stored in it. ...
0
votes
1answer
40 views

I'm a beginner, studying Data modelling as part of my course. I'm having trouble understanding Normalisation. How can i improve?

It was difficult to frame the title given the word limit, so apologies for that. Currently I'm studying DBA and Data modelling as a part of my ICT Apprenticeship course in a Web Development team. I'm ...
0
votes
2answers
92 views

Is it OK to use PRIMARY KEYs from one table as NAMEs of other tables?

My case: I have many organisms (for example human, mouse and etc.) and a few models for each one. All models are independent from each other and I will never query them together. Normally I will do ...
0
votes
0answers
22 views

Trying to fix collation mess

In our MySQL database we have set several collations. e.g. Connection collation utf8_unicode_ci Server configured default collation utf8_unicode_ci Database default collation utf8_general_ci Table ...
0
votes
0answers
5 views

What is the advantage of using Spring beans for DB connection?

I am new to java spring and I'm just wondering if placing the db connection in spring beans has a great advantage?
0
votes
0answers
38 views

NEXT VALUE FOR SEQUENCE inside a CASE Statement

I want to use a new SEQUENCE each year (See here: 'Id' with the format: YYYYNNNNNN with the NNNNNN part restarting each year ) However you can not use NEXT VALUE FOR inside a CASE statement. ...
0
votes
1answer
42 views

Storing mail in database, data type

I've found pretty poor informations about mail databases. My need is to archive mail messages downloaded from a normal pop3 or imap account: I am an ordinary user and I do not own the server, but ...
0
votes
1answer
37 views

Table/database design question

Suppose you have these fields to keep track of in records: (first_name, last_name, state_id, stateid_status, day, month, year, id_status, id, criminal_status, charge, plea, sentence, create_time, ...
0
votes
1answer
26 views

logic/design for storing achievments and progress for users

I have a game with a databse of users, I now want to implement unlockable achievments in my game. How would I best go about saving this data for each user? I am still fairly new to using a database. ...
1
vote
2answers
98 views

Bus timetable Database structure

I am creating a database for bus timetable in android app. I have created four tables: stops, route, detail_route and schedule. columns in each table are as follows. Database structure route (id, ...
0
votes
1answer
65 views

Convert OLTP database to OLAP Datawarehouse

(http://imgur.com/p8Gy67E). Basically I need help to convert that OLTP Model to Data Warehouse in order to be used for further OLAP Cubes. I understand well the difference between the Star Schema and ...
5
votes
4answers
236 views

How can I represent discrete ages in a relational database?

I am using PostgreSQL to store data on a Person. I need to store whether each Person is capable of teaching a Child of each age year, from 0-17. The ages are discrete values, and a Person can have any ...
6
votes
2answers
179 views

Creating relationships between tables that where not specified in the given UML diagram

Good evening! I'm working on designing my very first actual database from the following UML class diagram (in French unfortunately): I'm at the point of creating the relational sketch of it which ...
1
vote
1answer
30 views

Keep files in mongo as part of the data

I want to create a news app that works in the following way: The site will contain articles, and each article with have multiple versions. Each version is a docx file and the article itself does not ...
0
votes
2answers
54 views

How can I create a join on three tables, each from a different database?

Here is a simplified example of what I'd like to do: SELECT a.create_time, b.create_time FROM DOB.dob_state AS a JOIN numID.numID_history AS b ON a.create_time = b.create_time; I'd like to join ...