database-design

DB Design Pattern - Many to many classification / categorised tagging.

I have an existing database design that stores Job Vacancies. The "Vacancy" table has a number of fixed fields across all clients, such as "Title", "Description", "Salary range". There is an EAV design for "Custom" fields that the Clients can setup themselves, such as, "Manager Name", "Working Hours". The field names are stored in a "C...

Database design -- does it respect 3rd NF?

Hi I have the following relations (tables) in a relational model Person person_id, first_name, last_name, address Student person_id, matr_nr Teacher person_id, salary Lecture lecture_id, lect_name, lect_description Attendees lecture_id, person_id, date I'm wondering about the functional dependencies of Student and Teach...

application specific seed data population

Env: JBoss, (h2, MySQl, postgres), JPA, Hibernate 3.3.x @Id @GeneratedValue(strategy = IDENTITY) private Integer key; Currently our primary keys are created using the above annotation. We expect to support a large number of users (~million users), what key should be used. Should it be Integer or Long or should I use the unsigned vers...

internal implementation of database Queries

In my experience I have used many queries like select, order by, where clause etc.. in mysql, sql-server, oracle etc For a moment i have thought, 1)how is this internally written to implement the above queries 2) which language do they use? 3) is that programming language? if yes which language? 4)what kind of environment required t...

Pros and Cons for CreatedDate and ModifiedDate columns in all database tables

What are the pros and cons? When should we have them and when we shouldn't? UPDATE What is this comment in an update SP auto generated with RepositoryFactory? Does it have to do anything with above columns not present? --The [dbo].[TableName] table doesn't have a timestamp column. Optimistic concurrency logic cannot be generated ...

Database MySql design - varchar length for utf8 fields :: 1. password 2. username 3.email

Hi, Most of the times I define varchar(255) length auto. But now I thinking how much varchar length should be best to define for utf8 fields: password username email If this fields should be define less than varchar 255, how much performance it will improve? Thanks ...

Recommended book for SQL Server query optimisation

Even if I have made a certification exam on SQL Server Design and implementation, I have no clue about how to trace/debug/optimise performance in SQL Server. Now the database I built is really business critical, and getting big, so it is time for me to dig into optimisation, specially regarding when/where to add indexes. Can you re...

Best way to store this data?

I have just been assigned to renovate an old website, and I get to move it from some old archaic system to drupal. The only problem is that it's a real-estate system and a lot of data is stored. Currently all the information is stored in a single table, an id represents the house and then everything else is key/value pairs. There are a p...

Best datastructure for this relationship...

I have a question about database 'style'. I need a method of storing user accounts. Some users "own" other user accounts (sub-accounts). However not all user accounts are owned, just some. Is it best to represent this using a table structure like so... TABLE accounts ( ID ownerID -> ID name ) ...even though there will be som...

How to edit Parent ListboxItem from seperate Listboxes that are hierachically linked.

I have a rather complicated Binding situation. I have a solution that I created in windows forms for this back in VS2005, but now I am recreating the control using wpf, but I am not doing it in exactly the same way I had done it before. I have a listbox control that has the following DataTemplate: <DataTemplate> <Border CornerRadius=...

Seeking free ODBC database optimization tool for non-experts

I'm a database n00b and am reading as many books as I can. I have been given responsibility for an ODBC tool where the databases were designed by a hardware engineer with some VB experience - which made him a s/w guru in the small firm at that time. Things are running slowly and I suspect that the db could have been designed better. I ...

List of Constraints from MySQL Database

How do I get a list of all constraints from a particular database? ...

Implementing a 'many-to-many' database

Greetings, stack*overflow* In my database, I already have one table, 'contacts' that contains records of individual people. I also have several other tables in my database which represent "skill sets" that contain records denoting a particular skill. 1) Am I correct in plotting this as a "many-to-many" relationship? (each contact can h...

What open source database platform is most easily transferred from my personal machine into a windows server?

I would like eventual interaction with MS Dynamics SL and/or MindTouch Core (running on WMware) for eventual intranet and/or internet display. ...

database modeling for google app engine for multiple revison of entity.

hi, in my application ( kind of wiki clone ) - an article is frequently changing. and i need to track all changes that are done on that article. { text only. } one crude way i have done it, is to add a datetime property and create a new entity everytime something change. which is too much database wasting. { and also un-necessary inde...

2-column table with two foreign keys. Performance/design question.

Hello everyone! I recently ran into a quite complex problem and after looking around a lot I couldn't find a solution to it. I've found answers to my questions many times before on stackoverflow.com, so I decided to post here. So I'm making a user/group managment system for a web-based project, and I'm storing all related data into a p...

designing database tables using JDBC

I am creating a users table using JDBC and mysql, each user has a permissions list that comprises Integer values. I am wondering if I should use an array for storing these values and then have only 1 record for this user in the table, or simply create a new table that comprises 2 columns: user ID and permissions, and then have multiple ...

how to design a db like Facebook where users can update their status and of the fb page as admin

i am designing a database where users can update status messages of theirs and they can create pages groups like facebook fan page and post status like the admin of the page and not as a user. user(id, name..) group(id, name...) group_admin(group_id, user_id) this is my set up. Is this the way to do it. How to post under the group a...

Naming of boolean column in database table

I have 'Service' table and the following column description as below Is User Verification Required for service ? Is User's Email Activation Required for the service ? Is User's Mobile Activation required for the service ? I Hesitate in naming these columns as below IsVerificationRequired IsEmailActivationRequired IsMobileActivatio...

Should I Split Tables Relevant to X Module Into Different DB? Mysql

I've inherited a rather large and somewhat messy codebase, and have been tasked with making it faster, less noodly and generally better. Currently we use one big database to hold all data for all aspects of the site. As we need to plan for significant growth in the future, I'm considering splitting tables relevant to specific sections o...