planning my first RDC app, and have a few questions...

Cableguy

Expert
Licensed User
Longtime User
as the title says:

I am to create the my own DB solution, but I still only have an "idea" of what I want to accomplish...
SO...

1- Should I first create the Entry/Query forms and then create the DB with the relations I see fit, Or the other way around? (remember I still only have an "idea" of what I want)

2- On the logical side of the DB, is there such a thing as "too many tables"?
How do you guys do it? Keep the tables to a very minimum, with tons of fields, or "explode" the data into several tables, like 20ish tables?

Thanks in advance
 
Last edited:

lemonisdead

Well-Known Member
Licensed User
Longtime User
My opinion only : organize your database the most logical it is for you and thinking about any "stored procedures" (if any) or "data restriction" (edit: and way to select the data combination). If they are a lot of data to manage and if the database engine allows them, think about the indexes (way to speed the access to the data) you could eventually need. They are limits in the data structure but I think you will not immediately reach them.
But remember that you will be able to alter tables in the future if required.
About the creation process : it is better to start thinking about the data schema before creating any form (but again in my opinion only).
I hope to have fully understood the question (I am not good at English those days)
 

KMatle

Expert
Licensed User
Longtime User
I've created many databases/tables at work (1 billion rows). Think about it as objects/classes (like you develop your app). If you handle customers then there will be a table called "customers". Very easy. Create unique identifiers like "cutomer number". If it's about to place orders, create another called "orders" with this id (customer with id 12334 did an order 5643). Split some tables in "order" / "order details" to get fast access to one order.

Start with the tables (you can add/remove culumns in a second). Enter some data to see, of it works. After that do the developing.

Fact: If it runs slow or if it's complicated to get the data, it's a design mistake. If it is, change it. See it as a playground.

I would not use RDC because the credentials are stored inside the app. PHP is much better and safe.

Please feel free to show your design. We weill have a look at it :)
 

Cableguy

Expert
Licensed User
Longtime User
I tried to google "stored procedure" and the returned result points me to some kind of automatisation functions like replicating records or backup the DB... is this a correct "reading" of what a stored procedure is?
And, where is it "stored"???

[EDIT] I might go with ABMaterial as a framework....
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
A stored procedure is stored in the "database schema" by itself (it is not on any "outside" program). What you read is correct : see it like a way to ease your work.
For example, if you have a table to store the details of an order "ORDERS" (order number, detail (product A, product B)), another table for the prices "PRICES" ([product A, price A],[product B, prince B]), you can imagine storing in another table only the total price of the orders "TOTALS" (order numbers, total of the order).
So when the data is inserted in "ORDERS" you immediately get the total in "TOTALS". Doing like this is quicker and easier (but you could have of course inserted the sums by yourself in the "TOTALS" table). It grants not to change the sum of an order even if the prices of product A or B changed (but this is by design, other methods could have done the same result of course).
About archieving : if you have a column with a timestamp. You can for example "clear" rows after an interval each time you add new data to a table. You can make backups, etc, etc :)
 

Cableguy

Expert
Licensed User
Longtime User
Thanks for the explanation... but one last idiot question pops up... how and where do I define/store a "stored procedure"?
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
how and where do I define/store a "stored procedure"?
There is no "generic" reply : it depends from the database you chose and the tools you have : for example you can create with the console terminal directly connected to the database or phpMyAdmin, even SQL Server Management Studio for MS SQL
So that is not an idiot question :)
 
Top