Questions tagged [relational]

526 questions
-1
votes
2 answers

Projection of 2 tables in Relational Algebra

Considering these 2 tables: Cd (cd_id, title, no_tracks, date, position, weeks) Band (band_id, band_name) The task is: List all the band names and cd titles in Relational Algebra. I wrote it this way: Π band_name (Band) AND Π title (Cd), however…
Charles David
  • 202
  • 2
  • 11
-1
votes
2 answers

Need guidance on SQL query

So the problem is: fan(fanID: integer, fanName: string) band(bandID: integer, bandName: string) likes(fanID: integer, bandID: integer) bandMember(memID: integer, memName: string, bandID: integer, nationality: string) (a) List the names of the bands…
david
  • 69
  • 2
  • 9
-1
votes
1 answer

Database design decision translating requirements to relational models

So I've volunteer to create a Registering system for my local church's education ministry. It should be able to register new students and keep track of their progress. Here are the requirements I've managed to gather: The educational institution…
ecr
  • 391
  • 1
  • 3
  • 7
-2
votes
1 answer

Diff in days(month / year) - Laravel

The question is how is it possible to get difference in days from before to today and knowing this difference is happened in the past?
Mahdi Rashidi
  • 411
  • 3
  • 8
-2
votes
1 answer

Sequence of or and and in if block not working correctly

CCMT c = new CCMT(); c.ccd = null; Optional cType = Optional.ofNullable(ccmtRequest).map(CCMT::getCcd).map(MOEH::getDestCtry); System.out.println(cType.isPresent()); // false if(cType.isPresent() &&…
tusharRawat
  • 719
  • 10
  • 24
-2
votes
1 answer

Database Design: When should I use multiple database?

Background: I'm trying to build the backend services of an app. This app has rooms where a user can join in to. When a user joins a room, s/he can exchange some data with other users through socket. Outside of the room, the user can view the…
asdf04
  • 9
  • 2
-2
votes
1 answer

Determine if a measure is aggregable or not in data-warehouse

Can someone please tell me a 'general use', step-by-step method to find out what are the non-aggregability fields in a datamart. Here an example I found: Notes: italic means 'key', bold identifies 'shortenings', 'column' is an alias for…
DDS
  • 2,340
  • 16
  • 34
-2
votes
1 answer

i have univarsity sechema as mention following and now i want to add new table but it shows erroe? help me

//University DDL statements create table classroom (building varchar(15), room_number varchar(7), capacity numeric(4,0), primary key (building, room_number) ); create table department (dept_name …
-2
votes
1 answer

Do I have too many columns in my MySQL table?

I'm a junior doctor and I'm creating a database system for my senior doctor. Basically, my senior Dr wants to be able to store a whole lot of information on each of his patients in a relational database so that later, he can very easily and quickly…
-2
votes
1 answer

Best Relational Database Diagrams

I am looking for good-designed and real life relational database diagrams. Could you offer any book or other sources? I prefer books. Thank you.
akadal
  • 21
  • 7
-2
votes
1 answer

Database relational schema

I'm working for a database project that my professor gave to me and now i'm designing the relational schema of database. I have three entity types album, photo and video that means an album can contain both of them, but I have no idea how to tie…
-2
votes
1 answer

Retrieve data in combobox from SQL Server in VB.NET

I have a database column, Province=(Punjab, Sindh, Blochistan, Sarhad) and other database table City=Fsd, Lahore, Multan, etc, and I have another database table city=Chiniot, Khushab, Tando, Adam, Khan, etc. Also another two more columns of city…
-2
votes
2 answers

Relational algebra operations

I'm stuck with relational algebra. I mean, how can I express functions like "SUM(), COUNT()," etc in RA? Thanks, any help will be kindly appreciated
-4
votes
3 answers

is there a simpler way to do: if(num1 > num2 && num1 > num3), for bigger list of variables to compare?

I'd like to know (just for knowing) if there is a way to execute the following instructions with simpler code: (C++) if(a > b && a > c && a > d) is it possible to replace it with something like this: if(a > b, c, d)
YaRmgl
  • 356
  • 1
  • 6
  • 19
-4
votes
3 answers

Relational operator in C while using real variables

Why the output is not as expected? #include void main(){ float a,b,c; b=0.7; if( b<0.7 ) printf(" It should NOT be here"); else printf("It Should be here"); }
1 2 3
35
36