1
vote
1answer
16 views

Duplicate Data from two column

i have a table which has only two column one is pid(Photo ID) and another one is tid(Tag ID) +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | ...
0
votes
3answers
69 views

MySQL vs. Microsoft Access [on hold]

I'm trying to aggregate about 500-1000 MS Excel files that deal with various small business issues (inventory, purchase orders, etc) and I'm currently trying to decide what kind of RDMS I should use. ...
0
votes
0answers
31 views

Efficient way to fetch/update X records in a loop

What I need is a simple process that handles requests. I have setup a simple table as follows: CREATE TABLE Requests ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, request_param VARCHAR(250) ...
0
votes
0answers
26 views

Need help with data model

Schema does not list all fields, but only the relevant ones User adds credits/funds to his account using paypal or Internet Banking (which has to be verified manually, and approved, so the 'status' ...
0
votes
1answer
61 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
28 views

Alphanumeric field in MySQL

I need to create a character field with some rules, they are, Field name: contract_number. Rules: Contract Number Contract number must be alphanumeric. Contract number must be unique. Contract ...
0
votes
1answer
37 views

Fetching User Recent Status

I am running mysql with MyISAM storage engine to store user status(user updates data). To load user recent updates data i am using this query: $limit = 20; $uid = 3; SELECT * FROM userstatus WHERE ...
0
votes
1answer
21 views

How do I “link” two or more rows of the same table with a unique “link” id?

I am looking for a better way to create a link between two or more rows of the same table, but the link itself must have a unique ID. What I am currently doing seems rather convoluted. I have a ...
0
votes
0answers
37 views

Conceptual data model for a billing system

I am working on existing MySQL database, my task is to create a new data model for a billing system on that existing application, I have created a conceptual data model, as given below, My ...
0
votes
1answer
20 views

Database structure for product attributes on orders

I'm making a POS and currently kind of stuck on the order proccess due to the product attributes. As of now the DB looks something like this: tbl_products tbl_attributes (attr id, name, extra ...
-1
votes
0answers
5 views

mysql workbensh/ synchronize model

i try to synchronize model my script sql show that SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET ...
0
votes
1answer
28 views

Single MySQL DB contains both push and pull data. Recommended path to replication?

We have a single deployed (MySQL) database that contains both user tables and product tables (currently in the same DB). The product tables are "pushed to production" data -- they are generated in ...
0
votes
1answer
42 views

How can I Automate MongoDB schema design from existing MySQL Database and Logs?

I am working on the project which will automatically generate sample MongoDB schema analyzing existing MySQL database and logs. I am looking for help regarding the below questions. Please, share your ...
1
vote
1answer
41 views

Is there any way MySQL can list relationship cardinality between two entities?

I am working on the project where I have to analyse the MySQL schema. As a part of schema information, I want to list down relationship cardinality between different relations. Does MySQL stores ...
0
votes
2answers
26 views

MYSQL Indexes when looking up on alternating sets of columns

I have a table that looks like: CREATE TABLE `connections` ( `connection_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `service_id` smallint(5) unsigned DEFAULT NULL, `parent_id` bigint(20) ...
0
votes
1answer
43 views

MySQL DB structure with Main category and several nested sub categories

I am looking to create a set of fields on my webpage identical to what eBay uses on their category selection page when you are selling something. For my purposes I am doing motorcycles, power sports, ...
1
vote
1answer
53 views

Best approach on storing/displaying sanitized data

Surfing the web I find two approaches on storing data in databases. Approach 1: Store data in the database with the html-specialcharacters sanitized $userdata = $_POST['field']; ...
2
votes
0answers
49 views

How to model (a many to many) to many relationship

Hello i am facing the following scenario. I have a student table with the following structure. Student id(PK), matriculation number, first_name, last_name, email A student can have more than one ...
0
votes
1answer
57 views

Help With MySQL Computed Columns/Auto Updating Field Based On Average

I am currently building a social network type application on-top of MySQL and have run into a problem I can't wrap my head around. In my web application each user has a field called "weight" and this ...
0
votes
2answers
67 views

Is a temporary table a good solution for importing temporary data into a database

i am facing the following scenario. I have a student database in which exam results are stored. Every now and then i get a list with the names of certain students for which i need to find out how well ...
0
votes
1answer
40 views

How to structure a database to show data for each USA State and Canada Territory on a Per user basis?

I need to build a PHP/MySQL application. I am a bit confused on how to do the database for a project like I am about to explain though. The end result will be a Map of the USA and Canada. Each ...
0
votes
1answer
44 views

Digital content eCommerce schema advice? [closed]

I don't have much experience designing databases, I'm looking for some advice on my design from more seasoned designers/developers. I'm developing a digital content eCommerce store which will be ...
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 ...
1
vote
1answer
5 views

Source control makes sure my code is never lost, how do I make sure my users/orders database is never lost?

Everyone is recommending the use of git, automated tests, continuous integration, automated deployment and so on, to reduce human error during all stages of web development. I have yet to come across ...
8
votes
4answers
298 views

eCommerce orders table. Save prices, or use an audit/history table?

Im designing my first eCommerce schema. I've been reading around the subject for a little while, and am a bit confused about the relationship between an order_line_item and a product A product can ...
0
votes
0answers
30 views

Using MySQL As A Graph Database, Can It Be Done Efficiently?

So I am currently working on a startup idea with a friend and we've come a long way, it's somewhat functional and I've tried to not let database design decisions slow the progress of the site. As of ...
0
votes
1answer
55 views

How to model complex database role relationships

The purpose of my application is the creation, viewing and editing of articles. The problem I have is that users will have different roles for an article or group of articles. In addition, the role ...
0
votes
1answer
322 views

MySQL count multiple columns and sum the total occurrence

I have the following table, say, MyDRAW ... DRAWNO PRIZENO FIRSTD SECONDD THIRDD FOURTHD M123/14 8458 8 4 5 8 M123/14 7214 7 2 1 4 M123/14 1640 1 6 4 0 ...
0
votes
1answer
35 views

String templating technique

I am working on a fitness app that is going to deliver notifications to the user. I intend using MySQL events to populate the necessary tables, and then using an Ajax timer or Websockets or whatnot to ...
1
vote
1answer
46 views

Best way to handle column that doesn't conform to one particular type

I have a Settings table: CREATE TABLE `Settings` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Code` varchar(100) NOT NULL, `Name` varchar(250) NOT NULL, `Description` text NOT NULL, `Default` ...
0
votes
1answer
74 views

Relation between multiple hierarchical taxonomies linked to a single entity

I am working on an online test application which supports multiple choice questions. I have created schema for taxonomy (classification) system to be used with questions. taxonomy(id, name, slug, ...
0
votes
0answers
52 views

Same table for real persons and fictional one

In my application stores both real and fictional persons (from movies, etc.) as well as stage names and alter egos. These entities have almost the same properties and are often referenced via foreign ...
0
votes
0answers
32 views

Best practices for ranking records in flexible way

Suppose we have 10000 records of any product. User search on our website with his given criteria. so we output search results based on given criteria. Now Admin want to rank products in search. so ...
4
votes
3answers
80 views

StackExchange clone: where should I add my indexes?

I'm creating an open source stack exchange clone and the following is my schema. What should I add indexes on for it to be optimal? Here is the schema in Rails format (SQL format below as well): ...
1
vote
0answers
38 views

Schema for yearly data models

I am developing a school management system. Most data will not be reused after the end of the school year. I am contemplating using schemas to separate data in various school years, however I am ...
0
votes
0answers
42 views

Inserting and updating on same table

I am currently working on a database that aims to provide information regarding the amount of time people stay in a company's car-park premises. This is done using a table called "tbl_stay" which has ...
1
vote
1answer
47 views

Is it more efficient to store 0 and 1 for a binary value or just empty and 1 in MySQL

Is it more efficient to store 0 and 1 for a binary value indicating whether a flag is up or down or just empty and then set 1 for rows where the flag is up. Using MySQL. E.g. Flag 0 1 1 0 0 Or ...
0
votes
1answer
85 views

facebook group alike database scheme

Here are my requirements: one user can have many tasks one group can have many task one group can have many users only invited user by a user can be added into a group Does this db design appear ...
0
votes
0answers
52 views

MySQL: Error 1118 using create table select and barracuda file format

We want to create the equivalent of some materialized views in a read-only slave for really performant reporting. The queries used to generate these tables span 19 tables with a fair number of ...
0
votes
0answers
92 views

MySQL Workbench entity-entity relations and ENUM data type

So I'm creating an EER model diagram using MySQL Workbench. I have a table task_types with only one column task_type_id, where I store a list of different types type A, type B,... That may be updated ...
0
votes
1answer
78 views

Date of birth saving to MYSQL DB with timestamp or date column type [closed]

i am using MYSQL database and would like to know which of this is a good practice. way 1 - use column type in DB as timestamp. i.e will contain values like 2012-11-13 00:00:00 way 2 - use column as ...
1
vote
1answer
103 views

Precautions when designing database schema if tables are going to have billons of rows

I am about to start work on telephone dictionary kind of project. Its confirm that there are going to be billions of records in dictionary table, and each entry from this dictionary table may have ...
0
votes
0answers
492 views

Database design to track inventory?

Would this be a good starting point for tracking inventory with several warehouses? If yes what is the best approach to sum quantity when displaying stock by warehouse/type/general? mysql structure ...
0
votes
2answers
129 views

avoiding unique key collisions across tables

This might be related to the idea of data warehousing, but i'm not sure, though it is extreme theory. We have a table where records get written to first, let's call it tbl_recording which looks like: ...
0
votes
1answer
50 views

How to check how the table structure effects the performance of my query

I want to check how the table structure of a certain table effects the performance of a delete query. This is not a generalised question, I have a table, with currently 2.2 million records ...
1
vote
1answer
53 views

Accessing MySQL Database

I am designing a database for an application, which will be accessed by different front end programming languages, such as php, asp.net, android applications and iphone applications. I am confused, ...
0
votes
2answers
65 views

Table Design Cardinality

I am designing a database for an application, in that I need to consider both BUYER (BUYER_ID) and VENDOR (VENDOR_ID) as a USER (USER_ID). I have designed this logic in a following design. USER ...
1
vote
0answers
57 views

MySQL: What criteria should I base my table column order/arrangement/grouping on?

Does the order, arrangement or grouping of columns with large (such as long text descriptions) and small (such as bit and tinyint) field types have any noticeable impact on MySQL (InnoDB engine) ...
1
vote
2answers
81 views

Foreign key constraint based on conditional column

I'm trying to figure out the best way to handle this situation: I have a table set up as follows: LEARNING CONTEXT ================ LearningContextID - INT - Surrogate Primary Key EntityID ...
0
votes
1answer
357 views

Table Design - User Management

I have designed a database design for a simple User Management System, this system consist of the following things, User - A user may be a Vendor / Employee / Buyer. User - A user may have more than ...