Questions tagged [database-design]

Creating a database design involves outlining the structure and logical components of a database. The main objective behind this process is to develop a blueprint that represents a specific domain or subject area, encompassing various types of data, business rules, and necessary functionalities that the database aims to capture.

What is the most effective method for storing large volumes of data on a daily basis that can be categorized for statistical analysis?

I am currently creating a unique tracking tool tailored for marketing campaigns. This specialized tool acts as a mediator between advertisements and landing pages, responsible for recording all user data including user-agent information, IP addresses, clic ...

What is the best method for extracting information from multi-valued attributes in a relational database?

I have a database with 4 tables (Student, Course, Module, Instructor) and I want to confirm if this database is correct. If it is, how can I retrieve data from the tables using student ID as shown below. What are the modules for student 10122342? >>Expec ...

PHP Dynamic booking system with multiple date and time options

We have a complex booking system that connects with multiple partner sites to facilitate bookings. Each partner site provides information on their availability for customers to use our platform for making reservations. For every partner, we require detail ...

What criteria should I use to determine if a post has been favorited by a user using Mongoose?

Creating a function for users to like posts has been my recent project. Each post is stored as an object in my MongoDB collection with a specific schema. { title: String, text: String } On the other hand, users have their own unique schema as well. ...

optimal method for managing lists that are both stationary and able to grow

Here is the structure of my database: 'Article' title text user_id language_id 'User' id language_id 'language' id language name Is it best practice to store a list of languages in a MySQL database? I am a desig ...

An API request was successfully completed with security measures in place; if not

I am facing a challenge with managing two tables, one for users and the other for user roles. The user role table is used to store multiple roles for each user. I have created two APIs to handle deleting a user - one API deletes the user based on their use ...

Tips for effectively handling databases containing a small volume of data

Hey there! I'm currently working on building a social network using Dreamweaver, with PHP and SQL as my server languages. To host my website, I've decided to go with GoDaddy.com, which offers unlimited MySQL databases, each capped at 1gb. My plan is to ...

Tips for storing a searchable and queryable JSON file in Postgres?

How can I effectively model a person's profile received in JSON so that every value is searchable? Additionally, how can I make it queryable for specific criteria such as finding all persons who like Tarantino movies? While a relational model with one-to ...

Laravel 8 - utilizing two foreign keys referencing the users table

I have an idea for an application that allows two people to create a meeting room, but I'm unsure of how to create the schema in Laravel. This is my attempt so far: Schema::create('appointments_tables', function (Blueprint $table) { ...

Improving search performance based on popular content hits

I've been searching high and low for a solution to my issue, but so far, I haven't had any luck. Maybe someone here can help steer me in the right direction. I currently have a website that houses a vast amount of content within a MySQL databas ...

Using a primary key in a relational database is crucial when utilizing an ORM tool such as Sequelize

As of now, I am involved in a nodejs project that involves utilizing Sequelize ORM to communicate with a Postgres database. When working with ORM like sequelize, should I utilize custom fields as primary keys in the database tables or stick with autogenera ...

Developing a data frame using a list in Pandas

Struggling to convert the data I have into a Pandas DataFrame. It should be an easy task but I can't seem to crack it. I have the headers and the web data, but transforming it into a list for the DataFrame function is where I'm stuck. from selenium impor ...

The specified data type is Schema.Types.ObjectId, and it triggers an error stating "ReferenceError: Schema is not

As I was creating a database schema and trying to reference the userschema, I encountered an issue while writing the following code: postedBy: { type: Schema.Types.ObjectId, ref: 'User' }, type: Schema.Types.ObjectId, ^ ReferenceE ...