database-design

What ways are there to store information about an anonymous/guest user in a database?

…衆ロ難τιáo~ 提交于 2020-01-12 07:11:10
问题 Our application has an online shop among other features, and users are normally requested to register before completing a sale, creating a unique customer_ID in the process. When they return, they can log in and their contact details and transaction history are retrieved from the database. We are now exploring what to do in the case of an 'anonymous' or 'guest' customer, opening up the online shop to customers who don't want to register, and also for sales logged in the backend application,

Design of the recommendation engine database?

五迷三道 提交于 2020-01-12 06:20:44
问题 i am currently working on recommendation systems especially for audio files.but i am a beginner at this subject.i am trying to design database first with mysql but i cant decide how to do it.İt is basicly a system which users create profile then search for the music and system recommend them music similar to they liked. which database should i use ?(Mysql comes my mind as a first guess) it is a web project and also then with mobile side.Which technologies should i use?(php,android platform...

Without joins on Google App Engine, does your data have to exist in one big table?

瘦欲@ 提交于 2020-01-12 03:13:07
问题 Since Google App Engine doesn't permit joins, does this mean that I have to take all of the tables in my web app and figure out a way of combining them into a single huge table? 回答1: Just because you don't have joins implemented by the DBMS doesn't mean you can't have multiple tables. In App Engine, these are called 'entity types', and you can have as many of them as you want. Generally, you need to denormalize your data in order to avoid the need for frequent joins. In the few situations

Examples for DynamoDB Materialized Graph Pattern

大兔子大兔子 提交于 2020-01-11 19:48:50
问题 I started looking into DynamoDB, but got stuck reading this part about the materialized graph pattern: Best Practices for Managing Many-to-Many Relationships. I guess I get some ideas, but don't understand the whole thing yet. As far as I understand the pattern the main table stores edges and each edge can have properties (the data-attribute). For example (taken from the shown tables): Node 1 (PK 1) has an edge to Node 2 which is of type DATE, and the edge is of type BIRTH (SK DATE|2|BIRTH).

What is the most efficient way to model the relationship between these entities?

自闭症网瘾萝莉.ら 提交于 2020-01-11 14:20:10
问题 I have a database with entities as follows: 1. User entity 2. Event entity (musical concert etc.) 3. Ticket entity 3. Notification entity The notification entity has a direct relationship with both Ticket and Event (1:N [Ticket/Event : Notification]). Notifications will be stored in a database and user will have access to them via Notification tab. User can be notified with a notification related to his ticket(e.g. "We just sent your ticket to you!") or regarding some event (e.g. "Event xy is

“There can only be one IDENTITY column per table” - Why?

╄→гoц情女王★ 提交于 2020-01-11 05:16:27
问题 "There can only be one IDENTITY column per table" Why is it so? Take a scenario of a vehicle, there exists a chasis number which is unique as well as the registration number which turns out to be unique. To depict this scenario in sql server we need a custom implementation for on of the columns. Conversely, in Oracle you can have as many sequences as you want on a table. Why is there a restriction on the IDENTITY Column, any specific reasons? The scenario of having a vehicle schema is

in a relational database, can we have a table without any relation with the other tables?

孤街醉人 提交于 2020-01-11 05:16:09
问题 in a relational database, can we have a table without any relation with the other tables? 回答1: Yes. The way relations are expressed are with foreign keys. If a table you generate has no Foreign keys, and no foreign keys in other tables point to this table, it has no relationships. It can still be given a relationship later though so don't worry about shooting yourself in the foot. 回答2: Of course. Even you can create a table without fields. 回答3: Yes you can. Tables do not have to have any

Dynamically Creating GridView

旧街凉风 提交于 2020-01-11 04:55:30
问题 I want to create a GridView that displays records for PDF Files. These records can have meta data attached that is customizeable by the user, so they can create their own columns and enter their own information in there. I then want it to be displayed in a GridView, so they can order each column and the column order if the column order is -1 it will not display in the GridView. For example there is a static table DocumentsTable: ID int PDF_Folder varchar UserID int Then there is another table

MySQL - Are “NOT NULL” constraints needed for primary keys?

六眼飞鱼酱① 提交于 2020-01-11 04:32:48
问题 is it necessary to declare "NOT NULL" constraints for primary keys in the MySQL database? A primary key cannot have NULL values because it auto_increments anyway and automatically fills the field record. So am I correct in saying this mean I can remove the "NOT NULL" constraint for my primary keys? 回答1: (As you've tagged your question mysql .) In MySQL, you don't have to do it explicitly. From the manual: A PRIMARY KEY is a unique index where all key columns must be defined as NOT NULL . If

Partitioning a database table in MySQL

江枫思渺然 提交于 2020-01-11 03:41:25
问题 I am writing a data warehouse, using MySQL as the back-end. I need to partition a table based on two integer IDs and a name string. A more concrete example would be to assume that I am storing data about a school. I want to partition the school_data table based on COMPOSITE 'Key' based on the following: school id (integer) course_id (integer) student_surname (string) For the student surname, it is just the first character of the surname that determines which 'partitioned table' the data