database-design

How to store Goals (think RPG Quest) in SQL

一个人想着一个人 提交于 2019-12-23 03:07:43
问题 Someone asked me today how they should store quest goals in a SQL database. In this context, think of an RPG. Goals could include some of the following: Discover [Location] Kill n [MOB Type] Acquire n of [Object] Achieve a [Skill] in [Skillset] All the other things you get in RPGs The best I could come up with is: Quest 1-* QuestStep QuestStep 1-* MobsToKill QuestStep 1-* PlacesToFind QuestStep 1-* ThingsToAcquire QuestStep 1-* etc. This seems a little clunky - Should they be storing a query

Search across multiple tables and also display table name in resulting rows

青春壹個敷衍的年華 提交于 2019-12-23 03:04:11
问题 How do I structure an SQL statement to run across multiple flat unrelated tables and display the result with the result of the select and the name of the table where the result came from. The scenario is such that I have several tables with the same column name in each. It is data that I have received from outside parties that I store as it is in different tables. Same tables look like: Table 1: pid, parent_name, student_name, student_number, class_name, columnN Table 2: pid, previous_school,

Database design for incremental “export” to data warehouse

谁说我不能喝 提交于 2019-12-23 02:54:07
问题 Given a 1 TB relational database, currently in SQL Server. The data warehouse needs a "copy" of major parts of the database. The warehouse data should not be more than 24 hours old. The size of the relational database makes it impractical to do a full load every night. How should I design my relational database to support incremental load to the warehouse? A very small portion (<0.1%) of the database changes in a single day, and it is mostly inserts. The intra-day changes are not required,

Should/can one generate a database schema of ones classes?

大憨熊 提交于 2019-12-23 02:45:13
问题 I have designed some classes using Visual Studio class diagramming. Now I would like to persist this data using ORM and maybe other persistence mechanisms. I am wondering if there is a way to generate the SQL based on the properties in my classes, since they fairly well represent the database structure needed. This would save me a lot of manual SQL typing, and give me a nice start. I didn't start with the database model because I want to have my persistence decoupled from the actual "domain

Migrate RDBMS to Cassandra

断了今生、忘了曾经 提交于 2019-12-23 02:36:45
问题 I have a RDBMS database with the following tables: Airport ( iata PK , airport, city, state, country, lat, long) cancellation_cause ( cod_cancellation PK , description) Manufaturer (id_manufacturer PK , manufacturer_name) Model (id_model PK , model_name, id_manufacturer FK ) Airline ( airline_code PK , description) airplane_type (id_AirplaneType PK , airplane_type) engine_type (id_engine PK , engine_type) Aircraft_type (id_aircraft PK , aircraft_type) Airplane (TailNumber PK , id_model FK, id

storing weekly targets in database

谁说胖子不能爱 提交于 2019-12-23 02:35:10
问题 i have the following requirement Sales Officer: Bob Week1 Week2 Week3 ................. Week52 Prod1 10 15 12 ................. 14 Prod2 20 14 10 ................. 17 . . . . . . Sales supervisor will set the targets for each sales officer on weekly basis. Sales officer may enter actual sales on daily basis for each product through a similar grid against the set targets e.g. Edit In the above case Supervisor has set target of 10 units for week 1 Now the sales Officer will enter the sales on

Extending an application design - automatically generating data items from templates already in the DB

Deadly 提交于 2019-12-23 02:26:52
问题 Suppose I'm writing software for party-planners to use. This is what my current database schema looks like: Parties ( PartyId, ClientId, DateTime ) Tents ( PartyId, TentDetails... ) Clowns ( PartyId, ClownDetails... ) SecurityAgentAssignment ( PartyId, AgentId, fromTime, untilTime ) So as you can see, a Party can have multiple tents, clowns, and security agents assigned to it. Now, the party planner often plans parties that are of the same type: most have one tent, one clown, and no security;

Best database design approach to join complex data to ASP.Net Membership tables

大兔子大兔子 提交于 2019-12-23 02:18:41
问题 I'm looking to use a slightly modified ASP.Net Membership Provider to handle the standard user account creation/authentication/etc in a website. We have a fair amount of legacy data that I need to migrate in order to provide continuity with our existing users' saved information (like order history, wishlist, etc). [NOTE: We have to migrate anyway, so this is not the reason we're migrating data] I'm wondering what a sensible approach is for joining this additional data to the asp.net

one article on multiple category

随声附和 提交于 2019-12-23 02:06:46
问题 I need to add article to multiple category for example I have article name 'test article' need to add it to category 1 and category2 need to know how to make relationship between to tables for this note : in the past I make row in article database table name 'category' and add category id like 1,2,3 but this make problem in search and list please help me about that 回答1: You need three tables: One table for articles One table for categories One table linking articles to categories, we might

one article on multiple category

£可爱£侵袭症+ 提交于 2019-12-23 02:06:26
问题 I need to add article to multiple category for example I have article name 'test article' need to add it to category 1 and category2 need to know how to make relationship between to tables for this note : in the past I make row in article database table name 'category' and add category id like 1,2,3 but this make problem in search and list please help me about that 回答1: You need three tables: One table for articles One table for categories One table linking articles to categories, we might