Order/Invoice/Payment database modeling

I am designing an e-commerce website that has the following scenario:A customer can purchase items and create an order.The order may have unknown fee that will be added after the customerpays the total amount of the items. That is, the customer payscertain amount first. The order adds some fee and changes the total.And the customer pays again for the difference. But the two (ormore) payments are associated with the same order.(Optional) The customer can submit a single payment for multipleorders.Currently, I have an Order table and each order may consist of multiple OrderLi...

Combine two fact tables from two different marts and model in create Tabular model

I have a Fact Table Service1 (open or latest data) from Mart1 and another Fact Table Service2 (historic data) from Mart2. These tables share few common measures and dimensions but the underlying dataset is mutually exclusive. Now the business wants to merge these two facts into one table in Tabular model to do Year over Year comparison. Is it possible to combine these two facts, if so, what should be the approach. Alternatively, do we have to achieve this.Things to note down are,Records in Fact table Service2 will never changeThe Dimension keys between Mart1 and Mart2 is no...

clients in asia, DB in europe. Where should I put the server?

I have an app that is based on data in a european database.It will be used exclusively in Taiwan.Now I have two options where to put the backend server: 1. Europe (fast requests to DB, slow between server and client) 2. Asia (slow requests to DB, fast between server and client)Does anybody have experience with a similar situation? My gut feeling would be to place the server in Europe since there are likely more requests between server and DB than between server and clients. Place the server in Asia beacause this allows for your clients to get faster access also the serve...

Invoicing database design

I created an application few days ago that deals with invoicing. I would like to know how to best integrate a discount to my invoices. Should I put it as a negative item (in the invoice_items table) or should I create a "discount" column in the invoice table ? I would have it as a negative-valued item. The reasons are:With invoicing, it's very important that the calculated value remains contant forever; even if your calculation formula later changes, you can correctly reproduce any given invoice. This is even true if the value was incorrectly calculated at the time - it ...

How can I have the same number count for invoice and credit memo in Magento?

How can I have the same number count for invoice and credit memo in Magento?magento use two different counters, I need an univocal count number for invoices and credit memos.thanksedit: fixed text I wouldn't touch that, those numbers are mean to be different on purpose. My site has far more invoices than credit memos. They're just not the same thing. [XXX]I think the extension Fooman_SameOrderInvoiceNumber should help you. [XXX]I did it, I wrote an observer for change the increment_idpublic function sales_order_creditmemo_save_before($observer) { $creditmemo = ...

Kamailio: How to load balance calls among multiple Asterisk servers based on their IPs

My scenario is:A SIP trunk is connected to a Kamailio server which is connected to multiple Asterisk servers locally and should load balance calls among these asterisk servers. How? There is a mysql database table inside Kamailio server which maps TO part of sip header of incoming calls to one of asterisks' IPs.Kamailio should read sip header and search inside database and after getting IP, forward the call to the proper asterisk server.For example, value of To inside incoming sip header is 123456 so kamailio does query database and finds number 123456 is inside 192.168.1.1...

Scaling in nosql vs rdbms?

I am trying to understand the architectural difference in nosql and relational databases in the context of scalability. My understanding of scalability(horizontal) is that as our data grows, we add more and more server to split the load evenly. In key-value NO-SQL databases, we can add the new machine and split the keys. However, all of examples I have seen so far to understand eventual consistency in NO-SQL databases, they all have master-slave configuration where data is replicated across all the slaves instead of splitting across various machine to achieve scalability....

Displaying data from database based on specific values Codeigniter 3

I don't know how to explain this but i hope you can get the glimpse about my problem.I have list of kode_mtk, if i click the button Input it will direct to view list of student who takes that subject. I want to display that list of student based on kode_mtk and kelas. i tried to put $kode_mtk and $kelas in model and controller but it doesn't works.I hope you can guide me well since i'm newbie in codeigniter.This is my controller :public function display(){ $data['nama'] = $this->session->userdata('username'); $kode_mtk = $this->input->post('kode_mtk'); ...

Use a field or a whole new table?

I could really use some insights on choosing between the following two database layouts.Layout #1 | Layout #2 | CUSTOMERS | CUSTOMERS id int pk | id int pk info char | info char | ORDERS | ORDERS id int pk | id int pk customerid int fk | customerid int fk date timedate | date timedate | DETAILS | INVOICES id int pk | id int pk orderid int fk | orderid int fk date timedate | date timedate description char...

Comparison: DB Full Text search to Search engine (Lucene)

With stackoveflow.com in perspective (team of 2-3 engineers building a website project intended to scale) does it make sense to spend effort early in the process of development to build a search based on Lucene/Autonomy… as opposed to a database based full text search. Pros/Cons:With a mature Lucene implementation like nutch or autonomy, the cost of moving to Lucene (which is inevitable) at a later stage is negligible.In large volumes adding additional index servers (say with nutch) to maintain the growing search index is relatively easy.With a Lucene implementation I’ll m...

Database design for a small CRM/invoicing system

I'm currently developing a small customer relationship and invoice management system for my client. And I have run into some small issues which I would like do discuss.What is the best practice around orders, customers and products. Should my client be able to delete orders, customers and products?Currently I have designed my database around the principle of relationships between order, customer and product like this:CustomerIDName...ProductIDNamePrice...OrderIDCustomerIDOrderDate...Order LineIDOrderIDProductIDLike this I can connect all the different tables. But what if my...

How to dump a tokyocabinet in-memory hashtable database in a file?

Is there a simply way to dump a tokyocabinet in-memory database to a file?I didn't find anything about it in the tokyo documentation.Does anyone know another nosql database that provide with this kind of thing? I'm looking for a very efficient in memory hashtable database, able to insert about 80000 records/sec. Dump to file would occur every 10 seconds.Thanks Disclaimer: I work for VoltDB.While not a NoSQL Database, VoltDB can be used as a KV store and also there is an "export" functionality that you can use to setup continuous movement of data to CSV files. On the othe...

Scalable database technology and architecture

I've been trying to learn more about database scaling in a distributed system, and I am stuck in between RDBMS and NoSQL.Some articles online suggest that NoSQL is the solution to modern Big Data. Others say NoSQL is just a hype and RDBMS can be just as scalable with good design, and it provides good data structure.Instead of reading others' opinions, I'd love to judge the two myself, but I do not understand exactly what is required for a scalable RDBMS and a scalable NoSQL.I've done a bit more readings on RDBMS, and it seems that the solution requires leveraging memcache a...

Can not import csv to postgres (unexpected character found at location 4194303)

When I try to import a csv to my Redshift database, I get this errorMissing newline: Unexpected character 0x75 found at location 4194303 Everything seems to be fine with the csv itself. The stl table tells me the error is on line 70269 of the csv, which contains this string10:00:10,2014-07-28,Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0),Not Listed,Not Listed,Not Listed,Not Listed,multiRetrieve,Not Listed,OS-Preview-logItemUsage,Not Listed,Not Listed,Not Listed,Not Listed,Not Listed,Not Listed,Not Listed,Not Listed,Not Listed...

Finding a PEiD database

Where can I get the latest version of the PEiD database? I know that one version is available in github (https://raw.githubusercontent.com/guelfoweb/peframe/5beta/peframe/signatures/userdb.txt), but it is more than one year old and it has approximately 4000 signatures. If you're looking for the database to use in yara, There's a yara-rules github page here that has a lot of preexisting rules and seems to be quite up to date. hope this helps! [XXX]

Can HTML5 databases and localStorage be shared across subdomains?

I am attempting to share data across subdomains using Safari. I would like to use an HTML5 database (specifically localStorage as my data is nothing but key-value pairs). However, it seems as though data stored to domain.com can not be accessed from sub.domain.com (or vice versa). Is there any way to share a single database in this situation? Update 2016This library from Zendesk worked for me. Sample: Hub// Config s.t. subdomains can get, but only the root domain can set and delCrossStorageHub.init([ {origin: /\.example.com$/, allow: ['get']}, {origin: /:\/\...

Page 1 of 121  |  Show More Pages:  Top Prev Next Last