This car dealer company has many branch offices. In each of these branch offices, some sales people are working whose job is selling cars to customers. You need to define your branch offices in your diagram. And also, you need to define sales people who are working in these branch offices.
- This company sells cars, so you must store car...
I'm doing something different but this is an easier to understand example. Think of the votes here. I add these votes to a separate table and log information about them like by who, when and so on. Would you also add a field to the main table that simply counts the number of votes or is this bad practice.
...
I haven't gotten into ORM frameworks much yet, and could use some input from experienced practitioners. Some of these questions may be naive. Please bear with me.
In mapping objects to relations, do these frameworks also suggest indices that may be necessary for the queries to execute efficiently?
The queries generated by ORMs, are the...
i want to know which data structure(AVL, B-Tree, etc...) is used in most popular relational databases. and also in what way the data structure is superior than other in-class data structures? if possible a small comparison could help me a lot! thanks in advance!
...
i wanna have a Users details stored in the database.. with columns like firstname, last name, username, password, email, cellphone number, activation codes, gender, birthday, occupation, and a few other more. is it good to store all of these on the same table or should i split it between two users and profile ?
...
So you have a relational database and you define some foreign keys for reference integrity. But now, what's the better way to leverage them? Assume we are going to delete a row in a table with foreign keys to other tables.
Use them as a garbage collector - Set all constraints to cascade. So in your application, you first check if the t...
I would like to match patterns inside an IN expression like this:
... WHERE ... IN ('%alma%','%sajt%')
Is it possible somehow and if not, how could I achieve this some other way?
...
I have a few models which are not in the default cakephp format
user(id, name....)
1 Harsha ...
2 John ....
dishes(id, name, price ...)
1 "Cheese Pizza" 6
2 "Zinger Burger" 3
restaurants (id, name, .....)
1 "KFC" ...
2 "Pizza Hut" ...
module(id, name) values (User, Dishes, Restaurants)
1 "Users"
2 "Dishes"
3 "Restaurant"
i...
please help me with my simple cakephp application.
i have a products_warehouses table:
--
-- Table structure for table `products_warehouses`
--
CREATE TABLE IF NOT EXISTS `products_warehouses` (
`id` int(5) NOT NULL auto_increment,
`product_id` int(5) NOT NULL,
`buyprice` decimal(8,2) NOT NULL,
`sellprice` decimal(8,2) NOT NU...
Hi guys,
I have several tables in my ERD which which I would like to combine in a relational manner.
I have several use cases, but I completely lost track of what kind of relations to use between the tables.
Every user can work on multiple projects.
Every user has one specific role per project (Manager, Contributor, User)
Every proje...
Hello everyone!
This question is about how to design a SQL relationship. I am pretty newbie in this matter and I'd like to know the answers of (way) more experts guys...
I am currently migrating a ZopeDB (Object oriented) database to MySQL (relational) using MeGrok and SqlAlchemy (although I don't think that's really too relevant, sinc...
Let me illustrate this question with a simplified example. Assume I am building a project using python with a PostgreSQL relational database. In my database I have two tables "parent" and "child" which are N to M related through the table "parent_child". I want to be able to retrieve some data about a specific child owned by a specific p...
The idea being that sometimes you don't know the characteristics of your data all that well so deciding which objects to fetch in their entirety is just an educated guess, and could vary depending on network conditions, etc.
A good first approach at deciding what object links to follow and load from the database in a particular scenar...
I have a homework that I wanna present neatly.
...