Go Back   CodingForums.com > Web Projects and Services Marketplace > Career, job, and business ideas or advice

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-25-2011, 03:12 PM   PM User | #1
knick
New to the CF scene

 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
knick is an unknown quantity at this point
Is it difficult to learn databases?

A little while back I had an idea for a useful piece of software. Since then I have been using a lot of my spare time to learn software development. So far I have learnt;
- UML
- OOP concepts (inheritance, polymorphism, etc)
- The basic OOP design patterns (strategy, decorator, etc)
- C# programming language
- Some of the basics of the .NET libraries (collections, etc)
- Unit testing in visual studio
- Currently reading a book on Domain Driven Design

So, I'm well and truly past the "hello world" stage and I think I might even be ready to start coding my application. There is just one thing which I think might hold me back... persistence. My application will have some pretty complex domain logic, and I will need some way of preserving the state of domain objects between sessions. This poses a problem, since I currently have no experience with databases - and I would prefer to keep it that way if possible! I don't really want to have to learn databases upfront. If possible I would prefer to pay someone else to add persistence at a later stage when I have the rest of the software up and running.

So, my questions are;
1) Do I need to learn databases upfront? Or can I develop my domain logic now, and then add persistence later (almost as an after-thought)? Would this be easy to do, or will I completely have to tear up my code to make it work?
2) How much time will it take to learn databases? If it took me a month of my spare time to learn UML, and 2 months to learn C# & .NET basics... how long should I expect to spend on learning databases? Looking in from the outside, databases appear to be quite a complex subject.

Any advice from someone who has experience in building persistence into domain logic would be greatly appreciated!
knick is offline   Reply With Quote
Old 07-25-2011, 04:50 PM   PM User | #2
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Well do you need a database? You don't necessarily need one to persist program settings; depends what your application is doing and what data you need to store.

There are two distinct things to learn about databases, SQL and actually designing a good schema. If you make a bad schema it will make using the database much harder and it will be harder to expand it with additional columns or tables later.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 07-26-2011, 12:27 AM   PM User | #3
knick
New to the CF scene

 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
knick is an unknown quantity at this point
Do I need a database? Good question. What is the alternative? Writing data to an .ini file, .XML file or some other proprietry format?

I've already learnt a little bit of LINQ and I'm hoping that might shield me from having to learn SQL. So I guess its more the schema design that concerns me.
knick is offline   Reply With Quote
Old 07-26-2011, 12:50 AM   PM User | #4
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Those are all options yes, I would say an XML file is your best bet between the three. If you are using .NET, it is pretty easy to work with XML files. And if you are lazy you can always use the XSD tool that comes in the SDK to create classes from a schema that are serialize-able.

But it depends how much data you will be storing and how you will need to access it. If you are going to want to do lots different searches on the data, using a database will be easier.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Users who have thanked oracleguy for this post:
knick (07-26-2011)
Old 07-26-2011, 01:57 PM   PM User | #5
knick
New to the CF scene

 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
knick is an unknown quantity at this point
oracleguy: I don't know what XSD is but I will definitely look into it - thanks for the tip.

indiadatacentre: thanks for your estimate. At least it gives me some idea of what I am getting myself in for.

I still haven't received any feedback about whether it is feasible to forget about persistence for now and add it later. What is the normal process? Is this likely to get me into trouble? Would an experienced developer design persistence in right from the beginning?
knick is offline   Reply With Quote
Old 07-26-2011, 03:20 PM   PM User | #6
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
In general, if a feature is not required, i.e. your system works without it, then you can leave it out of version one. If your system doesn't work without a feature, then you need to design and build your system with that feature included from the start.

Also keep in mind your first project is not going to be great. It may even suck. But that's the way it goes... your second project is going to be better than your first, and so on. You will learn from each experience and figure out how to build things better.
__________________
Fumigator is offline   Reply With Quote
Old 07-26-2011, 05:04 PM   PM User | #7
knick
New to the CF scene

 
Join Date: Jul 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
knick is an unknown quantity at this point
Fumigator,
Yes, I have considered the very real possibility that my first attempt is going to suck quite badly. My background is in designing electronic hardware. When I look back at the first PCBs I designed 7 years ago, I have to conceed that they are 'less than ideal'. If I were to do those projects over again I would certainly do things differently this time around.
But in some respects I think software is more forgiving. The first piece of hardware I designed is still in service today, in its original 'sub-optimal' form. Whereas some of the early software projects (matlab) that I worked on exist today in a nicer refactored form. I guess what I'm saying (or hoping) is that improving design and fixing mistakes is much cheaper in software engineering than many other disciplines. When I come to the realization that my first attempt sucks, I will keep refactoring until i get it to an acceptable level of suckiness
knick is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:28 PM.


Advertisement
Log in to turn off these ads.