Go | New | Find | Notify | Tools | Reply |
Oh stewardess, I speak jive. |
Agreed. | |||
|
Nullus Anxietas |
The advantage to re-inventing the wheel is you end up with a wheel that works for you I've often thought about developing our own household finances system. The database design part isn't what stops me. What stops me is I utterly hate doing UI design and coding. So I don't "America is at that awkward stage. It's too late to work within the system,,,, but too early to shoot the bastards." -- Claire Wolfe "If we let things terrify us, life will not be worth living." -- Seneca the Younger, Roman Stoic philosopher | |||
|
Member |
Correct, the only thing I had in the Transactions table was the ID and the date. There could be more, but based on how I interpreted your info, that's what I could come up with. | |||
|
Member |
I made a quick attempt to format my earlier post... Hopefully that helps | |||
|
Member |
Download and install Sql Server For Developers (Free). Sql Server Free Download Install takes about 1/2 hour (accept all defaults) then download Sql Server Management Studio (Free) Mangement Studio Download About a 15 minute install. Create a database (right click databases in management studio and select new in the dialog) then right click diagrams under the database you just created and select new. This will allow you to create tables and visually set up foreign key table references. A really quick way to create a simple and small db. It will be production ready and as long as you don't try to install it on a "production" server it will be enterprise ready. Using the diagraming tool really helps you see the table normalization. If you decide to go the Sql Server route here's a script to create 3 tables on any database you create. It consists of 3 tables: Payees, Transactions, and TransactionDetails. Payees would be optional if you want to add a list of predetermined accounts you transact with. This table is simple as hell, it columns for an auto increcmented id, payee name, and address info. Payee name could be used to fill in the name in the transaction detail table. Transactions would be the "header" table of a transaction consisting of 4 columns. An auto incremented id, a Reference (user entered like a check number), a date, and a boolean value for cleared. TransactionDetails would be the child table of the transactions table. It would have an autoincremented id, a transactionid (references id column in transaction table), payeeid (references id from paytable and is optional), payee name (from payee table or user entered), and an amount. Amount can either be positive or negative and would negate a need for a transaction type. Script: CREATE TABLE [dbo].[Payees]( [Id] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](50) NOT NULL, [Address1] [varchar](50) NULL, [Address2] [varchar](50) NULL, [City] [varchar](50) NULL, [State] [varchar](2) NULL, [PostalCode] [varchar](10) NULL, CONSTRAINT [PK_Payees] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO CREATE TABLE [dbo].[TransactionDetails]( [Id] [int] IDENTITY(1,1) NOT NULL, [TranactionsId] [int] NOT NULL, [PayeeId] [int] NOT NULL, [PayeeName] [varchar](50) NOT NULL, [Amount] [decimal](18, 2) NOT NULL, CONSTRAINT [PK_TransactionDetails] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO CREATE TABLE [dbo].[Transactions]( [Id] [int] IDENTITY(1,1) NOT NULL, [Reference] [varchar](20) NOT NULL, [Date] [date] NOT NULL, [Cleared] [bit] NOT NULL, CONSTRAINT [PK_Transactions] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[Transactions] ADD CONSTRAINT [DF_Transactions_Cleared] DEFAULT ((0)) FOR [Cleared] GO ALTER TABLE [dbo].[TransactionDetails] WITH CHECK ADD CONSTRAINT [FK_TransactionDetails_Payees] FOREIGN KEY([PayeeId]) REFERENCES [dbo].[Payees] ([Id]) GO ALTER TABLE [dbo].[TransactionDetails] CHECK CONSTRAINT [FK_TransactionDetails_Payees] GO ALTER TABLE [dbo].[TransactionDetails] WITH CHECK ADD CONSTRAINT [FK_TransactionDetails_Transactions] FOREIGN KEY([TranactionsId]) REFERENCES [dbo].[Transactions] ([Id]) GO ALTER TABLE [dbo].[TransactionDetails] CHECK CONSTRAINT [FK_TransactionDetails_Transactions] GO PS: The create tables should work on any ansi standard db but the foreign keys are a bit iffy on anything but Sql Server | |||
|
Member |
I agree! UI work sucks and takes an incredible amount of thought and work. I find that UI work is not what can X do, but how to make X user friendly (soothing colors, less repitition, fewer mouse clicks, good default values, responsive/usable on a mobile device...). Thankfully I don't have to do much of that, most of my work is done under the hood. | |||
|
W07VH5 |
Just a quickie from diagrams.net. I'm sure I forgot somethings but that's the general idea. Edit - I added the accounts tableThis message has been edited. Last edited by: mark123, | |||
|
W07VH5 |
Thank you. Nothing makes me get something done like someone telling me I shouldn't. Trust me, if there was something out there that does what I need, I'd be using it. I've been looking for 13 years. Let me know if you find something.
Yes, I’ve been forced into my position. There’s really nothing out there that does what I need. I can't imagine that a simple checkbook register will take that much time to complete. Once I've got the database laid out, the rest is just simple CRUD. Then I can add reporting APIs as needed any time after that with a few lines of code.This message has been edited. Last edited by: mark123, | |||
|
His Royal Hiney |
i don't see any reason why you need to have separate tables for the data you're showing. If you have a separate Payee table that has payee exclusive information like address, account #, etc., then yes. If you have business and personal categories, then I can see a separate table that just list category / type - business or personal. You can also add a subcategory column. The category value would have to be unique in any case; you can't have the same category name under business and personal. As far as credit and debit columns, I will note that such columns would apply to standard accounting accounts but Quicken (if you're trying to copy it, it doesn't really do "accounts"). The categories serve as accounting buckets. If you do want to keep separate credit and debit vlues, I would suggest a third column called amount; it would take the positive value of the credit and the negative value of the debit or vice versa. This would enable giving a running balance. As to your question about having more than one transaction in an entry, assuming you may have two separate transactions under the same category (because that's how you split transactions in Quicken), then you need to add another field called "transaction number" so the primary key for the record is Date - Transaction Type - Transaction number. Another option is to use a system generated key and each transaction will be recorded separately automatically. If you want an intelligent numbering system, i like yyyymmddxx, unless you expect to do more than 99 transactions perday, then it would be 3 Xs instead of just 2. in either case, to split transactions for a given date-payee-category, then you do need to add another field. Otherwise, for a given Date-Payee, categories is how you split the transactions. "It did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life – daily and hourly. Our answer must consist not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual." Viktor Frankl, Man's Search for Meaning, 1946. | |||
|
W07VH5 |
I have a copy of Microsoft SQL Server 2005 if that tells you how long ago I’ve done this before. LOL | |||
|
McNoob |
What language are you going to write the front end with? I was thinking you might be able to utilize entity framework in Visual Studio. It will build the database for you. But maybe not something you want to tackle if you haven't used it before. I haven't coded in a few years, not sure what the state EF is today. "We've done four already, but now we're steady..." | |||
|
W07VH5 |
I abandoned ASP.NET MVC back in 2010 when Entity Framework was just gaining traction. It just got too expensive trying to keep up with everything changing and requiring new versions of everything every year. C#, Linq and Visual Studio we’re all amazing but since I wasn’t working in the field anymore, I didn’t think it was practical. I’m working with Python with FastAPI framework and a Postgres database. I’m probably just going to make it work via web browser for the UI. I may add a Kivy app for remote access. Thank you for the offer of help in making the DB. I appreciate it. | |||
|
Member |
Is category a "self referencing" table? i.e. A category can have child categories that can have child categories? If so I think you'll need a ParentId in it. Would one entry have one account or would each transaction have one account? Easy no matter which scenario is true. You just need to add an account table with a corresponding foreign key. You probably don't need Total in the entry table. Would that just be sum(transaction..Debit_amount) - sum(transaction..Credit_amount) entry tables child records? In general calculated fields are a no-no. Looks like you're pretty much there. No doubt a few tweaks will be needed in your development cycles. | |||
|
W07VH5 |
I changed the image above. The child_of may be a bit unnecessary. I’m probably going to leave it out. | |||
|
Baroque Bloke |
UI? For my special purpose database programs the “UI” is a text file form or a terminal prompt for input. And text output to terminal. Or to file(s), subsequently examined with emacs, my text editor. Not fancy, but easy to do and works good. This message has been edited. Last edited by: Pipe Smoker, Serious about crackers | |||
|
Member |
Thirty years ago, I wrote a database for billing for a company. Today there are just to many good programs out there to do it cheap. If your doing it for fun, go for it. If you are doing it for business do quickbooks or one of their competitors. Your time is worth more than $20 a month. Figure your time at whatever your hourly rate would be. For a business this project looses money. | |||
|
W07VH5 |
All you have to do is show me one. | |||
|
I Deal In Lead |
I did GUIs for several hundred different projects and find them pretty easy after all that practice plus I have several years experience programming relational databases but I'll agree with others who have said that you'd be better off buying a commercial product. | |||
|
W07VH5 |
Still waiting for someone to show me an example. | |||
|
Nullus Anxietas |
Yeah... I don't think I'm going to be asking my wife to learn SQL "America is at that awkward stage. It's too late to work within the system,,,, but too early to shoot the bastards." -- Claire Wolfe "If we let things terrify us, life will not be worth living." -- Seneca the Younger, Roman Stoic philosopher | |||
|
Powered by Social Strata | Page 1 2 3 |
Please Wait. Your request is being processed... |