1
голосов
3ответов
1460 просмотров

trying to figure out the best database schema

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 s...

3
голосов
5ответов
560 просмотров

Can you provide some advice on setting up my database?

I'm working on a MUD (Multi User Dungeon) in Python and am just now getting around to the point where I need to add some rooms, enemies, items, etc. I could hardcode all this in, but it seems like this is more of a job for a database. However, I've never really done any work with databases befor...

6
голосов
3ответов
3891 просмотров

Best database design for a "sensor system"

I'm doing a schoolwork and.. I have to do a vehicle tracker system. I thought of these three designs. What do you think? My database schemas Opinions?

2
голосов
2ответов
1808 просмотров

Under some circumstances an App Engine "get_by_key_name" call using an existing key_name returns None

I've run into a strange problem that I haven't seen before making a get_by_key_name call using the App Engine ORM. Under no circumstances, one would assume, would the following return None: Model.get_by_key_name(Model.all().get().key().name()) And yet, that's what I've found that certain key...

1
голосов
6ответов
424 просмотров

Database design software for a student?

I am taking a database class and have to draw a bunch of different kinds of diagrams. Specifically, I need to draw ERD and dependency diagrams. The instructor does not want any hand drawn diagrams but does not offer any clue as to what software to use. Does anybody have any suggestions?

3
голосов
3ответов
1392 просмотров

Database Design: Alternate to composite keys?

I am building a database system and having trouble with the design of one of my tables. In this system there is a users table, an object table, an item table and cost table. A unique record in the cost table is determine by the user, object, item and year. However, there can be multiple records...

0
голосов
4ответов
1192 просмотров

Database Design for Document Library

We are attempting to built the Document Library (File Management) as apart of our core apps. It starts with simple one obviously. I need a feed back regarding the database design for this particular module. Initial Design: File table: FileID FileGUID TenantID FileName FileDescription FileIma...

4
голосов
17ответов
982 просмотров

5 separate database or 5 tables in 1 database?

Let's say I want to build a gaming website and I have many game sections. They ALL have a lot of data that needs to be stored. Is it better to make one database with a table representing each game or have a database represent each section of the game? I'm pretty much expecting a "depends" kind of...

4
голосов
11ответов
414 просмотров

Ways to circumvent a bad database schema?

Our team has been asked to write a Web interface to an existing SQL Server backend that has its roots in Access. One of the requirements/constraints is that we must limit changes to the SQL backend. We can create views and stored procedures but we have been asked to leave the tables/columns a...

0
голосов
3ответов
1932 просмотров

model classes in a database with my own enum types

I have an application that I need to query lifetables (for insurance calculation). I was thinking about using XML to store the data, but thought it was a little big, but maybe a little small for using a full-fledged database. So I chose to use SQLite. In my application, I have enums defining a f...

0
голосов
3ответов
437 просмотров

Person -> Details database structure

I have a Domain model: Employee: Id, FirstName, LastName, Sex, BirthDate. Office: Employee, WorkStation, OfficeName, etc.. Contacts: Employee, MobilePhone, EMail, etc... But I`m not sure about my current database structure. How is right: Employees table has a PK EmployeeID, and the Offices a...

0
голосов
1ответов
4471 просмотров

Unable to create column in MySQL database with datatype of TEXT

I'm creating a table to hold items from rss feeds and I need to create a column 'description'. I selected the datatype as TEXT with no limit set with no index on this column. This is the error I'm getting: #1071 - Specified key was too long; max key length is 1000 bytes If I select to index th...

2
голосов
3ответов
1016 просмотров

database design for unread meassages in mysql?

What would be the best way to check unread messages from mysql table... I have two tables one for users and the other for messages... In the users table I am saving the last-login-date column & in messages table the date-added column, but what would be the best way to check whether the user h...

1
голосов
2ответов
2655 просмотров

Venue/Event Booking Database Design

I am task with designing a database for online bookings. I am not looking for a full design as we have had previous exp with online house rental. What i would like to know, is how do we design a db for booking of hotel, travel, events. We have some ideas. Basics... Have all venues/ events (o...

0
голосов
1ответов
67 просмотров

Updating Linking Tables

I've currently adding a bit of functionality that manages holiday lettings on top of a CMS that runs on PHP and MySQL. The CMS stores the property details on a couple of tables, and I'm adding a third table (letting_times) that will contain information about when people are staying at the proper...

0
голосов
3ответов
111 просмотров

Performance benefit in this data model?

I have a MySQL(innodb) table 'items' with the following characteristics Large number of rows, and keeps on increasing. Large number of columns of various data-types including 'text'; primary key 'item_id' is present. There are additional requirements as follows: Need to query items b...

2
голосов
5ответов
994 просмотров

Over Simple Database Schema: Good and Bad points? with example

I apologise for the long-winded, rantyness of this but I'm up at 3am dreading having to go to work tomorrow and deal with this database... it just feels wrong but maybe I'm wrong and just like things done my way... Please tell me what you think. Our database schema looks something like: page: i...

1
голосов
5ответов
1301 просмотров

Database design question regarding multiple one-to-many relationships and foreign keys

In my database there are four databases: Teachers, Students, Parents and Addresses. Teachers, students, parents can have any number of addresses (zero or more). I would like to use foreign keys to link between teachers and their addresses (and between students and their addresses etc). Since ...

14
голосов
3ответов
28003 просмотров

Mysql Datatype for US Zip (Postal Codes)

I am writing a web application, that is US specific, so the format that other countries use for postal codes are not important. I have a list of us zip codes that i am trying to load into a database table that includes the 5 digit us zip code latitude longitude usps classification code state ...

6
голосов
6ответов
3804 просмотров

Multiple yet mutually exclusive foreign keys - is this the way to go?

I have three tables: Users, Companies and Websites. Users and companies have websites, and thus each user record has a foreign key into the Websites table. Also, each company record has a foreign key into the Websites table. Now I want to include foreign keys in the Websites table back into the...

1
голосов
2ответов
1607 просмотров

"Read-Only" Entity Framework? I'm trying to use RIA Services, EF, and Silverlight

I'm trying to present MySQL server data in a silverlight client and my current plan of attack is to use Entity Framework to MySQL with RIA Services providing the data access between the Silverlight Client and Entity Framework. However, I'm only trying to present data to the user and I do not wan...

2
голосов
3ответов
207 просмотров

What is the best way to design the schema for the following?

What is the best way to design the schema for the following requirements? Need to store Countries, States, Counties, and counties can be divided into regions. Regions can then have people with various data points to report on. Regions can also be further divided into divisions which is like g...

3
голосов
9ответов
6083 просмотров

Storing multiple choice values in database

Say I offer user to check off languages she speaks and store it in a db. Important side note, I will not search db for any of those values, as I will have some separate search engine for search. Now, the obvious way of storing these values is to create a table like UserLanguages ( UserID nvarch...

1
голосов
3ответов
6316 просмотров

In symfony/doctrine's schema.yml, where should I put onDelete: CASCADE for a many-to-many relationship?

I have a many-to-many relationship defined in my Symfony (using doctrine) project between Orders and Upgrades (an Order can be associated with zero or more Upgrades, and an Upgrade can apply to zero or more Orders). # schema.yml Order: columns: order_id: {...} relations: Upgrades: ...

1
голосов
1ответов
486 просмотров

Single tenant, multiple application database design?

Most questions about tenancy are centered around multi-tenancy database design issues. I want to know about single tenancy but multiple applications. The software I'm developing allows for a single user to create, from a single code base, multiple applications(I call them "sections"): user coul...

2
голосов
9ответов
345 просмотров

Database design problem

I have a problem creating a database schema for the following scenario: (I’m not creating a dating site but just using this as an example) A user logs on to a dating site and is given a multiple selection for the hair colour they’d like their date to have: This is easy enough to model with th...

0
голосов
2ответов
284 просмотров

Preserve historical data

I am writing a standard database-backed business application. Assume that I work with bank accounts as well as "Decisions". A decision is a choice the user takes of moving money from one account to another. Each decision is taken at a particular date. A decision can have one or more "source accou...

3
голосов
2ответов
385 просмотров

Database modelling or database design: Which comes first?

I would like to know which is the common practice for a domain implementation. Designing the business objects first, that need persistence or the database schema first, generating it from an entity relationship diagram (and afterwards the ORM poco*'s)? I am going to start a solution, but I woul...

2
голосов
1ответов
3243 просмотров

Database design for general web form

I want to build a back end of a general web form which contains questions which the user can answer. There are multiple types of questions. "Normal" text question: the question is answered via a simple text field. Example: General personal info, like the name. Textarea question: the same, but w...

0
голосов
3ответов
234 просмотров

track sales for week/month and find the best sellers

Lets say I have a website that sells widgets. I would like to do something similar to a tag cloud tracking best sellers. However, due to constantly aquiring and selling new widgets, I would like the sales to decay on a weekly time scale. I'm having problems puzzling out how store and manipulate ...