database-design

Database Design for Storing Checklists and Results

倾然丶 夕夏残阳落幕 提交于 2019-12-23 02:00:53
问题 I've already read these questions but the answers are either irrelevant or unsatisfactory. I have a number of checklists that are used as a guide for frequently repeated procedures. The checklists evolve slowly over time as each procedure is refined and improved. What I'm looking to do is store a number of distinct Checklists that each contain an arbitrary, ordered number of Tasks to complete. Users of the system would be able to create a new Instance of a Checklist and tick off Tasks as they

Best way to store huge log data

走远了吗. 提交于 2019-12-23 01:53:35
问题 I need an advice on optimal approach to store statistical data. There is a project on Django, which has a database (mysql) of 30 000 online games. Each game has three statistical parameters: number of views, number of plays, number of likes Now I need to store historical data for these three parameters on a daily basis, so I was thinking on creating a single database which will has five columns: gameid, number of views, plays, likes, date (day-month-year data). So in the end, every day for

How To Store Game Data Without An Online Database

谁都会走 提交于 2019-12-23 01:52:56
问题 I am working on a game that is intended to be played off line. For the past I had done games which required an online connection. We would store all relevant data online in a database, and I would fetch the database data, parse the data into objects, via JSON, and access them as needed. For my offline environment, I'm not sure how I can best replicate storing all the types of game data. I really preferred the organization of the database and I don't want to create a whole bunch of game files

Adding information, xml column or new table?

妖精的绣舞 提交于 2019-12-23 01:52:12
问题 We want to extend our database to create Multilanguage support but we are unsure how to do this. Our database looks like this: ID – Name – Description – (a lot of irrelevant columns) Option 1 is to add an xml column to the table, in this column we can store the information we need like this: <translation> <language value=’en’> <Name value=’’> <Description value=’’> </language> <language value=’fr’> <Name value=’’> <Description value=’’> </language> </translation> Does the trick and the

Store multiple email addresses in database for different user types

一笑奈何 提交于 2019-12-23 01:51:11
问题 Quick question about the most efficient was to handle this, I have a database which has a tree structure of user types, system --- 1 to m --- account --- 1 to m --- customer All three types can have multiple email addresses, I was wondering what would be the best way to handle this in a database, all user types have auto_id as their primary key so having a table with address identified by there related primary key wont work as there will be potentially 3 of each. e.g. email with key 2 , will

How to store custom entity properties in a relational database

女生的网名这么多〃 提交于 2019-12-23 01:16:15
问题 I'm designing a database for a application I'm developing. I have two tables where the entities can have custom application properties that will define how the data from each entity is used. Each entity can have zero to many properties and i want to know what the best way is to structure such data in a relational way. Should i have one table with foreign keys to each table and key/value columns or is there some better way to do it? 回答1: You are speaking of "Entity Attribute Value" tables.

trying to figure out the best database schema

有些话、适合烂在心里 提交于 2019-12-23 01:14:09
问题 I want to come up with a generic schema (if possible) to use for a number of different events that I am managing. These events can be weddings, birthday parties, etc. So far I have 3 main tables: Contact Table - the usual info like address, phone, etc. Events Table - a list of events with some info like date, location, etc. EventInfo Table - contains the following fields (not complete but you should get the point): EventID ContactID NumberofAdultsInvited NumberofChildrenInvited Responded (yes

How to model multilingual entities in relational databases

青春壹個敷衍的年華 提交于 2019-12-23 01:13:32
问题 If we are going to develop a multilingual application, shall we store translations in resource files or the database ? Suppose we choose to do it in the database. Is there a standard way to model multilingual entities in the Relational Model ? 1. One Big Translation Table We can store all the translations in one table and use language-neutral keys for the attribute values. Person ( SSN , FirstName, LastName, Birthday) Translation ( key , langid , translation) 2. One Translation Table For Each

how to design the DB table and Class?

别来无恙 提交于 2019-12-22 20:46:12
问题 Following is a table structure in my system. The scenario is, system has Clients. Clients can be many type, for exampel: a Person, a Company, a Bank or etc. I have come with a database design as follows. TABLE : CLIENT =============================== | ID | NAME_CODE | TYPE | ------------------------------- | 1000 | Martin | PERSON | | 1002 | George | PERSON | | 1003 | Max_Group | COMPANY | ------------------------------- TABLE : PERSON ================================================== | ID

Implementing inheritance in MySQL: alternatives and a table with only surrogate keys

主宰稳场 提交于 2019-12-22 18:56:14
问题 This is a question that has probably been asked before, but I'm having some difficulty to find exactly my case, so I'll explain my situation in search for some feedback: I have an application that will be registering locations, I have several types of locations, each location type has a different set of attributes, but I need to associate notes to locations regardless of their type and also other types of content (mostly multimedia entries and comments) to said notes. With this in mind, I