All Questions

Tagged with
Filter by
Sorted by
Tagged with
-2
votes
0answers
19 views

See the list of 10% of most sellers [closed]

I would like to know how I could display the list of 10% of the top selling products. My column look like this. I rewrote the columns in English products_product_id, orders_order_id, ...
-2
votes
1answer
17 views

Need Database design / structure for dynamic form builder mysql [closed]

I am stuck in database structure for dynamic form builder. I need for text, textarea, radio buttons, checkboxes only. Can add more functionality is also there. Need some DB expert advice who can ...
0
votes
1answer
44 views

Designing an ad banner tracker

I'm creating an ad banner tracker for the ad banners on my website by using PHP. The tracker would track unique impressions, total impressions, unique clicks and total clicks of each banner. The ...
0
votes
2answers
68 views

Most performant design for each member to manage his/her own news list?

Say a news website has news categories such as Politics, Business, Society, Education, Health, Tech, Celebrity, Lifestyle, ... etc. The number of categories may be more than 20. New categories may be ...
0
votes
0answers
63 views

Need an efficient mysql database schema to store points/ratings

I have four main tables- 1.user(user_id, name,...) 2. post(post_id, description, ...) 3.comment(comment_id,user_id,comment,...) 4.reply(reply_id,user_id, reply,...) and 5.user_post(user_id,...
1
vote
1answer
276 views

How to open a file in MySQL event scheduler?

I am currently creating my first event in MySQL: CREATE EVENT check_for_uploads ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE ON COMPLETION PRESERVE DO // I would like to open a .php file ...
1
vote
1answer
2k views

Store arrays in table

I'm not sure if this is the best SE section to ask my question. If not, I kindly ask you to help me to find out the best one. Developing a web application in php and MySql I'm in doubt how to store a ...
1
vote
2answers
2k views

What's the best database design for implementing categories and tags? [closed]

For example, a news website might have "categories" such as Politics, Business, Entertainment, Sports, Lifestyle, Tech, Science, Health, ... etc. Each article belongs to only one category, but can ...
0
votes
1answer
257 views

SQL Database, how to set up users saving favorite songs

I'm setting up a web page and database for SQL practice where a bunch of songs will be saved in one database table, and there will be a table of 'users' (all just be testing however...) of the site. I ...
0
votes
1answer
472 views

How to copy auto-increment id value from one table to another?

I have a database with two tables, A and B. Table A contains the title of a book and has an auto-increment column, book_id, that I declared as primary key. In table B, I want to retain the price ...
1
vote
2answers
87 views

Storing Recurring Datasets

I'm trying to store the following arrays into a database, but due to my inexperience, I don't know how to set it up. It's for a scheduler. A day entry holds three arrays: The 1st array holds the ...
0
votes
2answers
341 views

How can I model a database structure to retain student information?

I am completely new to databases and SQL. I have generated a database in myphpAdmin consisting of a table with the columns (name, student number, grade). Basically this database will hold the grades ...
3
votes
1answer
34 views

Replicating data for ease of access

I have a table, lets call table a, that I allow users to enter data into. They can enter data as many times as they want, and based on some constraints, I only use the most recent entry. My question ...
1
vote
0answers
1k views

Database design for a multiple choice question website

So I want to design a database schema for MCQ website in which I have several sections ,Lets say 3. and these section will have many sub-sections each. I want to store the questions, choices and ...
0
votes
1answer
377 views

Optimising Marksheet Database [closed]

I am trying to design a database for mark sheet data of a school having different types of exams of different levels or class. Is it possible to have single table where I can store data in string (...
0
votes
1answer
143 views

RDS or Object DB for 99.99% static data of 25 million rows in one table

I have important data that consists of approx 25 million rows and will grow year on year. This dates back to 1995 and is split into yearly CSV files. Example: 1995.csv, 1996.csv and so on up to 2016....
0
votes
1answer
3k views

How to connect MS sql database and php using xamp

I am trying to connect MSsql database and php using xamp. But i am unable to connect. bellow is my code. Please help me to find this. <?php $myServer = "x.x.x.x"; $myUser = "xxx"; $myPass = "xxxx";...
3
votes
0answers
218 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
2answers
182 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
vote
1answer
333 views

Best way to create searchable and sortable product database

I'm pretty good with coding but I'm a noob at database design. This is a common problem but I didn't see an exact answer so I just want to confirm before I start coding everything. I have a shopping ...
2
votes
0answers
100 views

Is this user-storage database system efficient, effective and secure?

I am using: PHP Version 5.2.17-MIT-BACKPORT-GnuTLS SQLite 2.8.17 I have a database called users, which currently has a table called root. There will be others, once I get all the rows for root ...
1
vote
1answer
57 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 ...
0
votes
1answer
52 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 |...
0
votes
0answers
85 views

How to selecting data from two queries using union?

I have three tables. I am trying to taking the data with two times interval after then subtracting from first two second for every possible row and getting the ledger report. Solution is given by: ...
0
votes
1answer
718 views

Database-design for a small filter / search tag function

I'm building a search function in php for a database with 1k to 4k articles. It's going to be built on a tag system. I've been reading some tutorials, blog posts, q&a etc about it. Most important ...
1
vote
2answers
146 views

professional services (consultants) resource allocation system

I am developing a resource allocation system using PHP and mysql. I have consultants and projects and I need to allocate the consultants on to various projects for various periods of time on various ...
0
votes
1answer
54 views

What should be the structure for a person-to-person store database

I am going to create a person-to-person store with Laravel, a website whose users can share and sell their product or their mobile, TV, Computer, Shoes, Shirts, Books ,Cars, Bags, Animal etc. I am ...
1
vote
1answer
8k views

Transpose MySQL rows as column names - DYNAMIC

My goal is to be able to calculate the time difference between the ticket timestamp being created and closed and if reopened Add time from being reopened to closed again etc.. I have an existing mySQL ...
0
votes
2answers
1k views

1 million strings and exact match search

I need to chose the best solution (software and algorithm) to solve my problem. I need to store up to million strings and data associated with them. Strings are search queries and data is cached ...
0
votes
1answer
30k views

Inserting data into multiple tables

For my system, students are required to create a user account by completing a registration form (personal, contact and course details; also username and password). I need to collect registration data ...
1
vote
1answer
148 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 ...
2
votes
2answers
496 views

Keywords - column or separate table

I am building a website on MySQL with php, and I have 400+ products in a table. I have three columns with comma separated values, each has 1-3 values separated by commas in each row. I was wondering ...
2
votes
1answer
116 views

Peer review database design for various reports

I'm currently trying to redesign a poorly thought out database for a peer review system that we use internally at my workplace. Employees can log on and submit a review about another employee who ...
0
votes
1answer
1k views

desing the database for survey app with various types of answers

I have to create a survey app for which answers should be stored in the database. I created an html form containing some questions (about 30) with various types of answers (check boxes, radio buttons, ...
1
vote
2answers
830 views

JOIN on variable number of columns

I have the two tables courses AND something_about_courses: courses course_code course_session course_type something_about_courses course_code course_session some_description To ensure that I ...
1
vote
1answer
50 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 | +----...
6
votes
3answers
25k views

Database design to track student attendance

I was having a doubt regarding the design of a database table to track students' attendance. Currently, my table students have atleast 4000 students. Creating a database for attendance to track their ...
0
votes
1answer
3k views

User roles and permissions

Look at the attached graphic. I'm trying to keep this as simple as possible. Basically I want to have multiple admins(or superusers) who own regular users who own sites. Admins can give regular ...
1
vote
1answer
1k views

good practices of creating tables in mysql [closed]

Hi I was thinking of developing an web apllication using php and mysql. Application will give a professor the required data about the student. i want to design application considering Engineering ...
0
votes
0answers
156 views

Database Schema/Structure advice

Well i am reconstructing an already created application and was looking to improve this, especially with in the database structure. I want to start off with probably the biggest section and that is ...
3
votes
1answer
279 views

What is the right way to manage users data?

I'm trying to create a simple register login script with user profiles, I created a table with the following structure: +------------+---------------+------+-----+---------+----------------+ | Field ...
3
votes
3answers
540 views

Database design for changing number of fields

Google Contacts lets you to enter more than one phone number, or email address for a contact. You can add as many as you want. I don't know if there is a limit, other than practical list size. To ...
1
vote
1answer
545 views

MySQL table locks solution -> InnoDb / Partitions

I'm experiencing many table locks in a MyISAM MySQL table that is pretty big (Constx10xGB and 15M rows). It's mainly caused due many heavy inserts. My current thoughts to optimize: Changing to ...
1
vote
1answer
128 views

keeping database columns consistent with documentation

For a project, the client wanted to be able to add fields to any item and have them be searchable. To make them searchable, that would require the fields to take a column, but that would make the ...
0
votes
1answer
329 views

What would be the best way to design a table in Mysql that handles read items in an RSS feed reader?

I'm working on an RSS feed reader, it is mostly functionnal. But after some time beta testing it, I noticed that its very slow running some queries on a table that handles all the items that have been ...