Suppose I have a table called SerialNumbers which has columns: Id (int) SerialNumber (nvarchar) IsValid (bit) ToBeUsedBy (DateTime) Currently this table is being used by numerous different …
Tag: database-design
How do I keep my “validity” row always updated in relation to my “expiration date” row?
This is my database’s survey table: I learned to use CURDATE() and DATEADD(), so the table can now automatically calculate the survey_date and its expiration_date. But I’d also like to add a value …
Nested Assemblies Database Structure
I’m creating quoting software for the manufacturing business I work for and I’m unsure how to handle assemblies within my MySQL database structure as they are a little like a Russian Doll. Here’s a …
Should I use Effective Date or Start Date and End Date for historical recording?
I am a Business Analyst and have prepared tables/erd for a system we are implementing. The context is essentially an employee management system, an employee can join the company, change positions, get promoted, demoted, terminated etc. All of this is required to be tracked for filtering and reporting purposes. Therefore we require historical tracking of records. My recommendation and original
Housing Society management system database structure
I am designing billing structure for housing society yesterday I googled and gone through banking billing structure and designed my database structure but I am not sure whether this would be correct. So I am putting my billing database structure. Please tell me if I am wrong any where or any changes has to be done in my database structure.
Database design, customers (companies / individuals) in the same table?
Found possible duplicate : Database design, multiple types of customers in the same table Hi everyone. I’m actually looking for a nice way to create a database with 2 kinds of customers : Individuals and Companies. This is for a website and I’m using CodeIgniter framework (not sure it’s important to precise). I will only write the “important” fields to
Database design for InApp Purchases [closed]
I’m struggling with designing a proper database architecture for my problem. What I have: Player with unique playerID and other information (in the database). Items with a unique itemID and other …
Which is more space efficient, multiple colums or multple rows? [closed]
Suppose if i have a table A with 100 columns of same data type and 100 rows. Table B with 2 columns and 5000 rows of same data type of above table columns. Which table takes more disk space to store …
SET CONSTRAINTS ALL DEFERRED not working as expected
In a PostgreSQL 9.3 database, if I define tables a and b as follows: And then do the following: It produces the error below. Why is SET CONSTRAINTS not having the desired effect? Answer Only DEFERRABLE constraints can be deferred. Let me suggest superior alternatives first: 1. INSERT in order Reverse the sequence of the INSERT statements and nothing needs
Modeling a prescription/medicine usage set of database tables
Not sure how to go about modelling medication taken at a point in time in a relational database. Each way I have thought of so far seems to have redundant data. Need to be able to have a user say I …